shithub: libvpx

Download patch

ref: 8dfeece87881bd18ffcc96e545719d84436eb5d8
parent: 0e5d0f748525209bc6922aa97dd70d5430b82e9d
parent: 60b9f685cb7aea96e59f3173090a3a64bd8553d2
author: James Zern <[email protected]>
date: Fri May 15 13:19:49 EDT 2015

Merge changes from topic 'missing-proto'

* changes:
  vp8/rdopt.h+onyx_int.h: add some missing prototypes
  vp8: add some missing includes
  vp8: make some functions static
  vp8/common/variance*: add vp8_rtcd include
  vp8_copy32xn: sync function signature

--- a/vp8/common/alloccommon.c
+++ b/vp8/common/alloccommon.c
@@ -10,6 +10,7 @@
 
 
 #include "vpx_config.h"
+#include "alloccommon.h"
 #include "blockd.h"
 #include "vpx_mem/vpx_mem.h"
 #include "onyxc_int.h"
--- a/vp8/common/copy_c.c
+++ b/vp8/common/copy_c.c
@@ -11,11 +11,11 @@
 
 #include <string.h>
 
-#include "vpx_config.h"
+#include "./vp8_rtcd.h"
 #include "vpx/vpx_integer.h"
 
 /* Copy 2 macroblocks to a buffer */
-void vp8_copy32xn_c(unsigned char *src_ptr, int src_stride,
+void vp8_copy32xn_c(const unsigned char *src_ptr, int src_stride,
                     unsigned char *dst_ptr, int dst_stride,
                     int height)
 {
--- a/vp8/common/filter.c
+++ b/vp8/common/filter.c
@@ -10,6 +10,7 @@
 
 
 #include "filter.h"
+#include "./vp8_rtcd.h"
 
 DECLARE_ALIGNED(16, const short, vp8_bilinear_filters[8][2]) =
 {
--- a/vp8/common/generic/systemdependent.c
+++ b/vp8/common/generic/systemdependent.c
@@ -17,6 +17,7 @@
 #include "vpx_ports/x86.h"
 #endif
 #include "vp8/common/onyxc_int.h"
+#include "vp8/common/systemdependent.h"
 
 #if CONFIG_MULTITHREAD
 #if HAVE_UNISTD_H && !defined(__OS2__)
--- a/vp8/common/idctllm.c
+++ b/vp8/common/idctllm.c
@@ -8,6 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
+#include "./vp8_rtcd.h"
 
 /****************************************************************************
  * Notes:
--- a/vp8/common/postproc.c
+++ b/vp8/common/postproc.c
@@ -427,7 +427,7 @@
     }
 }
 
-double vp8_gaussian(double sigma, double mu, double x)
+static double gaussian(double sigma, double mu, double x)
 {
     return 1 / (sigma * sqrt(2.0 * 3.14159265)) *
            (exp(-(x - mu) * (x - mu) / (2 * sigma * sigma)));
@@ -455,7 +455,7 @@
 
         for (i = -32; i < 32; i++)
         {
-            const int v = (int)(.5 + 256 * vp8_gaussian(sigma, 0, i));
+            const int v = (int)(.5 + 256 * gaussian(sigma, 0, i));
 
             if (v)
             {
--- a/vp8/common/rtcd_defs.pl
+++ b/vp8/common/rtcd_defs.pl
@@ -333,7 +333,7 @@
 # Block copy
 #
 if ($opts{arch} =~ /x86/) {
-    add_proto qw/void vp8_copy32xn/, "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, int n";
+    add_proto qw/void vp8_copy32xn/, "const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n";
     specialize qw/vp8_copy32xn sse2 sse3/;
 }
 
--- a/vp8/common/variance.h
+++ b/vp8/common/variance.h
@@ -29,7 +29,7 @@
 typedef void (*vp8_copy32xn_fn_t)(
     const unsigned char *src_ptr,
     int source_stride,
-    const unsigned char *ref_ptr,
+    unsigned char *ref_ptr,
     int ref_stride,
     int n);
 
--- a/vp8/common/variance_c.c
+++ b/vp8/common/variance_c.c
@@ -9,8 +9,9 @@
  */
 
 
-#include "variance.h"
+#include "./vp8_rtcd.h"
 #include "filter.h"
+#include "variance.h"
 
 
 unsigned int vp8_get_mb_ss_c
--- a/vp8/common/x86/variance_mmx.c
+++ b/vp8/common/x86/variance_mmx.c
@@ -8,6 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
+#include "./vp8_rtcd.h"
 #include "vpx_config.h"
 #include "vp8/common/variance.h"
 #include "vpx_ports/mem.h"
--- a/vp8/common/x86/variance_sse2.c
+++ b/vp8/common/x86/variance_sse2.c
@@ -8,6 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
+#include "./vp8_rtcd.h"
 #include "vpx_config.h"
 #include "vp8/common/variance.h"
 #include "vpx_ports/mem.h"
--- a/vp8/common/x86/variance_ssse3.c
+++ b/vp8/common/x86/variance_ssse3.c
@@ -8,6 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
+#include "./vp8_rtcd.h"
 #include "vpx_config.h"
 #include "vp8/common/variance.h"
 #include "vpx_ports/mem.h"
--- a/vp8/decoder/onyxd_if.c
+++ b/vp8/decoder/onyxd_if.c
@@ -259,7 +259,7 @@
     return err;
 }
 
-int check_fragments_for_errors(VP8D_COMP *pbi)
+static int check_fragments_for_errors(VP8D_COMP *pbi)
 {
     if (!pbi->ec_active &&
         pbi->fragments.count <= 1 && pbi->fragments.sizes[0] == 0)
--- a/vp8/encoder/dct.c
+++ b/vp8/encoder/dct.c
@@ -11,6 +11,8 @@
 
 #include <math.h>
 
+#include "./vp8_rtcd.h"
+
 void vp8_short_fdct4x4_c(short *input, short *output, int pitch)
 {
     int i;
--- a/vp8/encoder/ethreading.c
+++ b/vp8/encoder/ethreading.c
@@ -19,8 +19,6 @@
 
 extern void vp8cx_mb_init_quantizer(VP8_COMP *cpi, MACROBLOCK *x, int ok_to_skip);
 
-extern void vp8_loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm);
-
 static THREAD_FUNCTION thread_loopfilter(void *p_data)
 {
     VP8_COMP *cpi = (VP8_COMP *)(((LPFTHREAD_DATA *)p_data)->ptr1);
--- a/vp8/encoder/firstpass.c
+++ b/vp8/encoder/firstpass.c
@@ -34,8 +34,6 @@
 /* #define OUTPUT_FPF 1 */
 
 extern void vp8cx_frame_init_quantizer(VP8_COMP *cpi);
-extern void vp8_set_mbmode_and_mvs(MACROBLOCK *x, MB_PREDICTION_MODE mb, int_mv *mv);
-extern void vp8_alloc_compressor_data(VP8_COMP *cpi);
 
 #define GFQ_ADJUSTMENT vp8_gf_boost_qadjustment[Q]
 extern int vp8_kf_boost_qadjustment[QINDEX_RANGE];
@@ -1328,8 +1326,6 @@
 
     return Q;
 }
-
-extern void vp8_new_framerate(VP8_COMP *cpi, double framerate);
 
 void vp8_init_second_pass(VP8_COMP *cpi)
 {
--- a/vp8/encoder/modecosts.c
+++ b/vp8/encoder/modecosts.c
@@ -10,6 +10,7 @@
 
 
 #include "vp8/common/blockd.h"
+#include "modecosts.h"
 #include "onyx_int.h"
 #include "treewriter.h"
 #include "vp8/common/entropymode.h"
--- a/vp8/encoder/modecosts.h
+++ b/vp8/encoder/modecosts.h
@@ -16,7 +16,9 @@
 extern "C" {
 #endif
 
-void vp8_init_mode_costs(VP8_COMP *x);
+struct VP8_COMP;
+
+void vp8_init_mode_costs(struct VP8_COMP *x);
 
 #ifdef __cplusplus
 }  // extern "C"
--- a/vp8/encoder/onyx_int.h
+++ b/vp8/encoder/onyx_int.h
@@ -714,6 +714,11 @@
     } rd_costs;
 } VP8_COMP;
 
+void vp8_alloc_compressor_data(VP8_COMP *cpi);
+int vp8_reverse_trans(int x);
+void vp8_new_framerate(VP8_COMP *cpi, double framerate);
+void vp8_loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm);
+
 void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest,
                         unsigned char *dest_end, unsigned long *size);
 
--- a/vp8/encoder/pickinter.c
+++ b/vp8/encoder/pickinter.c
@@ -29,8 +29,6 @@
 #include "denoising.h"
 #endif
 
-extern int VP8_UVSSE(MACROBLOCK *x);
-
 #ifdef SPEEDSTATS
 extern unsigned int cnt_pm;
 #endif
@@ -37,8 +35,6 @@
 
 extern const int vp8_ref_frame_order[MAX_MODES];
 extern const MB_PREDICTION_MODE vp8_mode_order[MAX_MODES];
-
-extern int vp8_cost_mv_ref(MB_PREDICTION_MODE m, const int near_mv_ref_ct[4]);
 
 // Fixed point implementation of a skin color classifier. Skin color
 // is model by a Gaussian distribution in the CbCr color space.
--- a/vp8/encoder/rdopt.h
+++ b/vp8/encoder/rdopt.h
@@ -136,6 +136,9 @@
     int near_sadidx[]
 );
 void vp8_cal_sad(VP8_COMP *cpi, MACROBLOCKD *xd, MACROBLOCK *x, int recon_yoffset, int near_sadidx[]);
+int VP8_UVSSE(MACROBLOCK *x);
+int vp8_cost_mv_ref(MB_PREDICTION_MODE m, const int near_mv_ref_ct[4]);
+void vp8_set_mbmode_and_mvs(MACROBLOCK *x, MB_PREDICTION_MODE mb, int_mv *mv);
 
 #ifdef __cplusplus
 }  // extern "C"
--- a/vp8/vp8_cx_iface.c
+++ b/vp8/vp8_cx_iface.c
@@ -478,8 +478,6 @@
     return res;
 }
 
-int vp8_reverse_trans(int);
-
 static vpx_codec_err_t get_quantizer(vpx_codec_alg_priv_t *ctx, va_list args)
 {
   int *const arg = va_arg(args, int *);