]> granicus.if.org Git - libvpx/commitdiff
convert copy16x16 to rtcd
authorJim Bankoski <jimbankoski@google.com>
Wed, 10 Oct 2012 00:09:08 +0000 (17:09 -0700)
committerJim Bankoski <jimbankoski@google.com>
Wed, 10 Oct 2012 00:09:08 +0000 (17:09 -0700)
Convert copy16x16 from invoke to rtcd.  The first in a long
string of converts.

Change-Id: I296b0aa32f40e9fb649f7a3cb914a4e5300cad63

vp8/common/generic/systemdependent.c
vp8/common/onyxc_int.h
vp8/common/recon.h
vp8/common/reconinter.c
vp8/common/rtcd_defs.sh
vp8/common/x86/recon_x86.h
vp8/common/x86/x86_systemdependent.c
vp8/encoder/encodeframe.c
vp8/encoder/firstpass.c
vp8/encoder/temporal_filter.c

index 32b5e5a6c052e43060bc78eb416f10f033dc5a57..3d315dafdeb961b406e4637fd790f194d0f4c578 100644 (file)
@@ -36,7 +36,6 @@ void vp8_machine_specific_config(VP8_COMMON *ctx) {
 #if CONFIG_TX16X16 || CONFIG_HYBRIDTRANSFORM16X16
   rtcd->idct.idct16x16    = vp8_short_idct16x16_c;
 #endif
-  rtcd->recon.copy16x16   = vp8_copy_mem16x16_c;
   rtcd->recon.copy8x8     = vp8_copy_mem8x8_c;
   rtcd->recon.avg16x16    = vp8_avg_mem16x16_c;
   rtcd->recon.avg8x8      = vp8_avg_mem8x8_c;
index 7c6093b41e2269daec3dd73b540bd5eba4bcf9c0..a8cfdf8d2677e6daf44a007fa49f9e6973e2b1a9 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "vpx_config.h"
 #include "vpx/internal/vpx_codec_internal.h"
+#include "vpx_rtcd.h"
 #include "loopfilter.h"
 #include "entropymv.h"
 #include "entropy.h"
index 0bb5c8863e62fb5418986d9ab7d3ea87ec7e22a1..54d133b85a38a6c63c9bc8d59900a141dbc0d515 100644 (file)
@@ -44,11 +44,6 @@ struct vp8_recon_rtcd_vtable;
 #include "arm/recon_arm.h"
 #endif
 
-#ifndef vp8_recon_copy16x16
-#define vp8_recon_copy16x16 vp8_copy_mem16x16_c
-#endif
-extern prototype_copy_block(vp8_recon_copy16x16);
-
 #ifndef vp8_recon_copy8x8
 #define vp8_recon_copy8x8 vp8_copy_mem8x8_c
 #endif
index 647b3ada7122523ecc43e63c4875d88314014a4f..5b50b03351d4fd73382e93046b706373b05f10cf 100644 (file)
@@ -662,8 +662,7 @@ void vp8_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd,
                                 (ymv.as_mv.row & 7) << 1,
                                 dst_y, dst_ystride);
     } else {
-      RECON_INVOKE(&xd->rtcd->recon, copy16x16)
-          (ptr, pre_stride, dst_y, dst_ystride);
+      vp8_copy_mem16x16(ptr, pre_stride, dst_y, dst_ystride);
     }
 }
 
index 66029f88e3160100c8e64fc286c34e12e80c83f1..6667c65621541adba7a9e3f9ab241f7f54da4cfc 100644 (file)
@@ -5,6 +5,8 @@ EOF
 }
 forward_decls common_forward_decls
 
+
+
 prototype void vp8_filter_block2d_4x4_8 "const unsigned char *src_ptr, const unsigned int src_stride, const short *HFilter_aligned16, const short *VFilter_aligned16, unsigned char *dst_ptr, unsigned int dst_stride"
 prototype void vp8_filter_block2d_8x4_8 "const unsigned char *src_ptr, const unsigned int src_stride, const short *HFilter_aligned16, const short *VFilter_aligned16, unsigned char *dst_ptr, unsigned int dst_stride"
 prototype void vp8_filter_block2d_8x8_8 "const unsigned char *src_ptr, const unsigned int src_stride, const short *HFilter_aligned16, const short *VFilter_aligned16, unsigned char *dst_ptr, unsigned int dst_stride"
@@ -19,3 +21,12 @@ if [ "$CONFIG_GCC" = "yes" ]; then
     specialize vp8_filter_block2d_8x8_8 sse4_1 sse2
     specialize vp8_filter_block2d_16x16_8 sse4_1 sse2
 fi
+
+
+#
+# RECON
+#
+prototype void vp8_copy_mem16x16 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch"
+specialize vp8_copy_mem16x16 mmx sse2 media neon dspr2
+vp8_copy_mem16x16_media=vp8_copy_mem16x16_v6
+vp8_copy_mem16x16_dspr2=vp8_copy_mem16x16_dspr2
index fe0f8f0bc79247ac20aa1282b4dac5e3a908f28e..c0180cc560b5eef17fe08696be3442a80710d5f2 100644 (file)
@@ -36,9 +36,6 @@ extern prototype_copy_block(vp8_copy_mem16x16_mmx);
 #undef  vp8_recon_copy8x4
 #define vp8_recon_copy8x4 vp8_copy_mem8x4_mmx
 
-#undef  vp8_recon_copy16x16
-#define vp8_recon_copy16x16 vp8_copy_mem16x16_mmx
-
 #endif
 #endif
 
index 2c66d9fb7088511d9b1be19602c43ab699a6f632..c5077852135db6858f3c9490885aa915c63631c8 100644 (file)
@@ -44,7 +44,6 @@ void vp8_arch_x86_common_init(VP8_COMMON *ctx) {
     rtcd->recon.recon       = vp8_recon_b_mmx;
     rtcd->recon.copy8x8     = vp8_copy_mem8x8_mmx;
     rtcd->recon.copy8x4     = vp8_copy_mem8x4_mmx;
-    rtcd->recon.copy16x16   = vp8_copy_mem16x16_mmx;
 
     /* Disabled due to unsupported enhanced interpolation/high_prec mv
     rtcd->subpix.sixtap16x16   = vp8_sixtap_predict16x16_mmx;
@@ -80,7 +79,6 @@ void vp8_arch_x86_common_init(VP8_COMMON *ctx) {
   if (flags & HAS_SSE2) {
     rtcd->recon.recon2      = vp8_recon2b_sse2;
     rtcd->recon.recon4      = vp8_recon4b_sse2;
-    rtcd->recon.copy16x16   = vp8_copy_mem16x16_sse2;
 
     /* these are disable because of unsupported diagonal pred modes
     rtcd->recon.build_intra_predictors_mbuv =
index 584570da9577a553bf96212b4ceb3f7c7d5e2aec..6e788784e1bdaedf6199f619fedd2df3d7ae6ccf 100644 (file)
@@ -309,9 +309,7 @@ static void build_activity_map(VP8_COMP *cpi) {
       recon_yoffset += 16;
 #endif
       // Copy current mb to a buffer
-      RECON_INVOKE(&xd->rtcd->recon, copy16x16)(x->src.y_buffer,
-                                                x->src.y_stride,
-                                                x->thismb, 16);
+      vp8_copy_mem16x16(x->src.y_buffer, x->src.y_stride, x->thismb, 16);
 
       // measure activity
       mb_activity = mb_activity_measure(cpi, x, mb_row, mb_col);
@@ -579,9 +577,7 @@ static void pick_mb_modes(VP8_COMP *cpi,
     xd->dst.v_buffer = cm->yv12_fb[dst_fb_idx].v_buffer + recon_uvoffset;
 
     // Copy current MB to a work buffer
-    RECON_INVOKE(&xd->rtcd->recon, copy16x16)(x->src.y_buffer,
-                                              x->src.y_stride,
-                                              x->thismb, 16);
+    vp8_copy_mem16x16(x->src.y_buffer, x->src.y_stride, x->thismb, 16);
 
     x->rddiv = cpi->RDDIV;
     x->rdmult = cpi->RDMULT;
@@ -767,9 +763,7 @@ static void pick_sb_modes (VP8_COMP *cpi,
   xd->dst.v_buffer = cm->yv12_fb[dst_fb_idx].v_buffer + recon_uvoffset;
 #if 0 // FIXME
   /* Copy current MB to a work buffer */
-  RECON_INVOKE(&xd->rtcd->recon, copy16x16)(x->src.y_buffer,
-                                            x->src.y_stride,
-                                            x->thismb, 16);
+  vp8_copy_mem16x16(x->src.y_buffer, x->src.y_stride, x->thismb, 16);
 #endif
   x->rddiv = cpi->RDDIV;
   x->rdmult = cpi->RDMULT;
@@ -967,9 +961,7 @@ static void encode_sb(VP8_COMP *cpi,
     xd->dst.v_buffer = cm->yv12_fb[dst_fb_idx].v_buffer + recon_uvoffset;
 
     // Copy current MB to a work buffer
-    RECON_INVOKE(&xd->rtcd->recon, copy16x16)(x->src.y_buffer,
-                                              x->src.y_stride,
-                                              x->thismb, 16);
+    vp8_copy_mem16x16(x->src.y_buffer, x->src.y_stride, x->thismb, 16);
 
     if (cpi->oxcf.tuning == VP8_TUNE_SSIM)
       vp8_activity_masking(cpi, x);
index 1e54371f74f2910bd4f2681271b54152601265ac..18333e64c1258b052c8126f9986b68204421fb8d 100644 (file)
@@ -528,7 +528,7 @@ void vp8_first_pass(VP8_COMP *cpi) {
       xd->left_available = (mb_col != 0);
 
       // Copy current mb to a buffer
-      RECON_INVOKE(&xd->rtcd->recon, copy16x16)(x->src.y_buffer, x->src.y_stride, x->thismb, 16);
+      vp8_copy_mem16x16(x->src.y_buffer, x->src.y_stride, x->thismb, 16);
 
       // do intra 16x16 prediction
       this_error = vp8_encode_intra(cpi, x, use_dc_pred);
index d57613bd5568ebe9daf7fcc008393f6da023bc22..6bc24a01f082ffdd8dd9d7b9d99de254fa82ebed 100644 (file)
@@ -59,7 +59,7 @@ static void vp8_temporal_filter_predictors_mb_c
     xd->subpixel_predict16x16(yptr, stride,
                              (mv_col & 7) << 1, (mv_row & 7) << 1, &pred[0], 16);
   } else {
-    RECON_INVOKE(&xd->rtcd->recon, copy16x16)(yptr, stride, &pred[0], 16);
+    vp8_copy_mem16x16(yptr, stride, &pred[0], 16);
   }
 
   // U & V