]> granicus.if.org Git - libvpx/commitdiff
clean out some of the rtcd code.
authorJim Bankoski <jimbankoski@google.com>
Sun, 18 Nov 2012 20:33:18 +0000 (12:33 -0800)
committerJim Bankoski <jimbankoski@google.com>
Sun, 18 Nov 2012 20:33:18 +0000 (12:33 -0800)
This removes functions that are no longer needed and cleans up some warnings.

Change-Id: I292a4c3694e9c1d68ce99cea390905b198434719

vp9/common/rtcd_defs.sh
vp9/encoder/generic/csystemdependent.c
vp9/encoder/mcomp.c
vp9/encoder/picklpf.c
vp9/encoder/variance.h
vp9/encoder/x86/x86_csystemdependent.c

index 813e93af30edda6eaffff16d2d8290bcf11eed37..db389500c9dc98df601438b0d8972d88f8ef3bad 100644 (file)
@@ -378,22 +378,22 @@ specialize vp9_sad8x8x8 sse4
 prototype void vp9_sad4x4x8 "const unsigned char *src_ptr, int  src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array"
 specialize vp9_sad4x4x8 sse4
 
-prototype void vp9_sad32x32x4d "const unsigned char *src_ptr, int  src_stride, const unsigned char* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
+prototype void vp9_sad32x32x4d "const unsigned char *src_ptr, int  src_stride, const unsigned char **ref_ptr, int  ref_stride, unsigned int *sad_array"
 specialize vp9_sad32x32x4d
 
-prototype void vp9_sad16x16x4d "const unsigned char *src_ptr, int  src_stride, const unsigned char* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
+prototype void vp9_sad16x16x4d "const unsigned char *src_ptr, int  src_stride, const unsigned char **ref_ptr, int  ref_stride, unsigned int *sad_array"
 specialize vp9_sad16x16x4d sse3
 
-prototype void vp9_sad16x8x4d "const unsigned char *src_ptr, int  src_stride, const unsigned char* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
+prototype void vp9_sad16x8x4d "const unsigned char *src_ptr, int  src_stride, const unsigned char **ref_ptr, int  ref_stride, unsigned int *sad_array"
 specialize vp9_sad16x8x4d sse3
 
-prototype void vp9_sad8x16x4d "const unsigned char *src_ptr, int  src_stride, const unsigned char* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
+prototype void vp9_sad8x16x4d "const unsigned char *src_ptr, int  src_stride, const unsigned char **ref_ptr, int  ref_stride, unsigned int *sad_array"
 specialize vp9_sad8x16x4d sse3
 
-prototype void vp9_sad8x8x4d "const unsigned char *src_ptr, int  src_stride, const unsigned char* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
+prototype void vp9_sad8x8x4d "const unsigned char *src_ptr, int  src_stride, const unsigned char **ref_ptr, int  ref_stride, unsigned int *sad_array"
 specialize vp9_sad8x8x4d sse3
 
-prototype void vp9_sad4x4x4d "const unsigned char *src_ptr, int  src_stride, const unsigned char* const ref_ptr[], int  ref_stride, unsigned int *sad_array"
+prototype void vp9_sad4x4x4d "const unsigned char *src_ptr, int  src_stride, const unsigned char **ref_ptr, int  ref_stride, unsigned int *sad_array"
 specialize vp9_sad4x4x4d sse3
 
 #
@@ -507,6 +507,9 @@ vp9_diamond_search_sad_sse3=vp9_diamond_search_sadx4
 prototype void vp9_temporal_filter_apply "unsigned char *frame1, unsigned int stride, unsigned char *frame2, unsigned int block_size, int strength, int filter_weight, unsigned int *accumulator, unsigned short *count"
 specialize vp9_temporal_filter_apply sse2
 
+prototype void vp9_yv12_copy_partial_frame "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc, int fraction"
+specialize vp9_yv12_copy_partial_frame neon
+
 
 fi
 # end encoder functions
index d49b7d98176d3758a54ed891687bbec52838704c..411408cad679ac49a02800c941dc7a3586f20d25 100644 (file)
 #include "vp9/encoder/onyx_int.h"
 
 
-void vp9_arch_x86_encoder_init(VP9_COMP *cpi);
-void vp9_arch_arm_encoder_init(VP9_COMP *cpi);
-
-void (*vp9_yv12_copy_partial_frame_ptr)(YV12_BUFFER_CONFIG *src_ybc,
-                                        YV12_BUFFER_CONFIG *dst_ybc,
-                                        int fraction);
-extern void vp9_yv12_copy_partial_frame(YV12_BUFFER_CONFIG *src_ybc,
-                                        YV12_BUFFER_CONFIG *dst_ybc,
-                                        int fraction);
-
 void vp9_cmachine_specific_config(VP9_COMP *cpi) {
 #if CONFIG_RUNTIME_CPU_DETECT
   cpi->rtcd.common                    = &cpi->common.rtcd;
 #endif
-
-  vp9_yv12_copy_partial_frame_ptr = vp9_yv12_copy_partial_frame;
-
-#if ARCH_X86 || ARCH_X86_64
-  vp9_arch_x86_encoder_init(cpi);
-#endif
-
-#if ARCH_ARM
-  vp9_arch_arm_encoder_init(cpi);
-#endif
-
-
 }
index 90e944f10e882433847316695a910f6b0d8723c8..54248640b0b9e1c947c2457591495662781473e4 100644 (file)
@@ -1442,7 +1442,7 @@ int vp9_diamond_search_sadx4(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
       unsigned int sad_array[4];
 
       for (j = 0; j < x->searches_per_step; j += 4) {
-        unsigned char *block_offset[4];
+        const unsigned char *block_offset[4];
 
         for (t = 0; t < 4; t++)
           block_offset[t] = ss[i + t].offset + best_address;
@@ -2070,7 +2070,7 @@ int vp9_refining_search_sadx4(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
 
     if (all_in) {
       unsigned int sad_array[4];
-      unsigned char *block_offset[4];
+      unsigned char const *block_offset[4];
       block_offset[0] = best_address - in_what_stride;
       block_offset[1] = best_address - 1;
       block_offset[2] = best_address + 1;
index 0107facc390b6a3feaf79977438e04737010d18c..d5631bd235ba4bfa5a817194c50c43a3b3aecc81 100644 (file)
@@ -31,12 +31,8 @@ extern void vp8_yv12_copy_frame_yonly_no_extend_frame_borders_neon(YV12_BUFFER_C
 #define IF_RTCD(x) NULL
 #endif
 
-extern void(*vp9_yv12_copy_partial_frame_ptr)(YV12_BUFFER_CONFIG *src_ybc,
-                                              YV12_BUFFER_CONFIG *dst_ybc,
-                                              int fraction);
-
-void vp9_yv12_copy_partial_frame(YV12_BUFFER_CONFIG *src_ybc,
-                                 YV12_BUFFER_CONFIG *dst_ybc, int Fraction) {
+void vp9_yv12_copy_partial_frame_c(YV12_BUFFER_CONFIG *src_ybc,
+                                   YV12_BUFFER_CONFIG *dst_ybc, int Fraction) {
   unsigned char *src_y, *dst_y;
   int yheight;
   int ystride;
@@ -147,7 +143,7 @@ void vp9_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi) {
   int best_filt_val = cm->filter_level;
 
   //  Make a copy of the unfiltered / processed recon buffer
-  vp9_yv12_copy_partial_frame_ptr(cm->frame_to_show, &cpi->last_frame_uf, 3);
+  vp9_yv12_copy_partial_frame(cm->frame_to_show, &cpi->last_frame_uf, 3);
 
   if (cm->frame_type == KEY_FRAME)
     cm->sharpness_level = 0;
@@ -174,7 +170,7 @@ void vp9_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi) {
   best_err = calc_partial_ssl_err(sd, cm->frame_to_show, 3);
 
   //  Re-instate the unfiltered frame
-  vp9_yv12_copy_partial_frame_ptr(&cpi->last_frame_uf, cm->frame_to_show, 3);
+  vp9_yv12_copy_partial_frame(&cpi->last_frame_uf, cm->frame_to_show, 3);
 
   filt_val -= (1 + ((filt_val > 10) ? 1 : 0));
 
@@ -187,7 +183,7 @@ void vp9_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi) {
     filt_err = calc_partial_ssl_err(sd, cm->frame_to_show, 3);
 
     //  Re-instate the unfiltered frame
-    vp9_yv12_copy_partial_frame_ptr(&cpi->last_frame_uf, cm->frame_to_show, 3);
+    vp9_yv12_copy_partial_frame(&cpi->last_frame_uf, cm->frame_to_show, 3);
 
 
     // Update the best case record or exit loop.
@@ -216,7 +212,7 @@ void vp9_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi) {
       filt_err = calc_partial_ssl_err(sd, cm->frame_to_show, 3);
 
       //  Re-instate the unfiltered frame
-      vp9_yv12_copy_partial_frame_ptr(&cpi->last_frame_uf,
+      vp9_yv12_copy_partial_frame(&cpi->last_frame_uf,
                                       cm->frame_to_show, 3);
 
       // Update the best case record or exit loop.
index 6afbfb7a90b4f55c52ae21debc566f204f4c33d5..b504fbb1776fc02a93d8445559c6dc8fb143d635 100644 (file)
@@ -38,7 +38,7 @@ typedef void (*vp9_sad_multi1_fn_t)(const unsigned char *src_ptr,
 
 typedef void (*vp9_sad_multi_d_fn_t)(const unsigned char *src_ptr,
                                      int source_stride,
-                                     const unsigned char * const ref_ptr[],
+                                     const unsigned char ** ref_ptr,
                                      int  ref_stride, unsigned int *sad_array);
 
 typedef unsigned int (*vp9_variance_fn_t)(const unsigned char *src_ptr,
index 38ede74f216af73b723025a687a32a75c06cd38b..5fc86c1012fb55f1e191c6d4aec39321f90b8306 100644 (file)
@@ -14,7 +14,8 @@
 #include "vp9/encoder/variance.h"
 #include "vp9/encoder/onyx_int.h"
 
-
+// TODO(jimbankoski) Consider rewriting the c to take the same values rather
+// than going through these pointer conversions
 #if HAVE_MMX
 void vp9_short_fdct8x4_mmx(short *input, short *output, int pitch) {
   vp9_short_fdct4x4_mmx(input,   output,    pitch);
@@ -75,24 +76,3 @@ void vp9_subtract_b_sse2(BLOCK *be, BLOCKD *bd, int pitch) {
 }
 
 #endif
-
-void vp9_arch_x86_encoder_init(VP9_COMP *cpi) {
-#if CONFIG_RUNTIME_CPU_DETECT
-  int flags = x86_simd_caps();
-
-  /* Note:
-   *
-   * This platform can be built without runtime CPU detection as well. If
-   * you modify any of the function mappings present in this file, be sure
-   * to also update them in static mapings (<arch>/filename_<arch>.h)
-   */
-
-  /* Override default functions with fastest ones for this CPU. */
-#if HAVE_SSE2
-  if (flags & HAS_SSE2) {
-  }
-#endif
-
-
-#endif
-}