]> granicus.if.org Git - libvpx/commitdiff
vp9_filter.h: rename interp_kernel type
authorJames Zern <jzern@google.com>
Tue, 4 Feb 2014 00:48:38 +0000 (16:48 -0800)
committerJames Zern <jzern@google.com>
Tue, 4 Feb 2014 00:48:38 +0000 (16:48 -0800)
-> InterpKernel
avoids conflicts in variable names, fixing the build with various
toolchains.

broken since:
8691565 Removing subpix_fn_table struct.

Change-Id: Ib5f6fdbcb494a97b62c75b99d4d826ff25d4c981

vp9/common/vp9_blockd.h
vp9/common/vp9_convolve.c
vp9/common/vp9_filter.c
vp9/common/vp9_filter.h
vp9/common/vp9_reconinter.c
vp9/common/vp9_reconinter.h

index 49e336aa4b7de3b097012f4cda858de2e8d39873..a595f5dffc5ec008126463c5ae021703d173a78c 100644 (file)
@@ -252,7 +252,7 @@ typedef struct macroblockd {
   /* Inverse transform function pointers. */
   void (*itxm_add)(const int16_t *input, uint8_t *dest, int stride, int eob);
 
-  const interp_kernel *interp_kernel;
+  const InterpKernel *interp_kernel;
 
   int corrupted;
 
index b105a57bc856584d7d63f98674065571c51e94c5..3807ccc87dd79af80a2058838d054829c290b6ea 100644 (file)
@@ -20,7 +20,7 @@
 
 static void convolve_horiz(const uint8_t *src, ptrdiff_t src_stride,
                            uint8_t *dst, ptrdiff_t dst_stride,
-                           const interp_kernel *x_filters,
+                           const InterpKernel *x_filters,
                            int x0_q4, int x_step_q4, int w, int h) {
   int x, y;
   src -= SUBPEL_TAPS / 2 - 1;
@@ -42,7 +42,7 @@ static void convolve_horiz(const uint8_t *src, ptrdiff_t src_stride,
 
 static void convolve_avg_horiz(const uint8_t *src, ptrdiff_t src_stride,
                                uint8_t *dst, ptrdiff_t dst_stride,
-                               const interp_kernel *x_filters,
+                               const InterpKernel *x_filters,
                                int x0_q4, int x_step_q4, int w, int h) {
   int x, y;
   src -= SUBPEL_TAPS / 2 - 1;
@@ -65,7 +65,7 @@ static void convolve_avg_horiz(const uint8_t *src, ptrdiff_t src_stride,
 
 static void convolve_vert(const uint8_t *src, ptrdiff_t src_stride,
                           uint8_t *dst, ptrdiff_t dst_stride,
-                          const interp_kernel *y_filters,
+                          const InterpKernel *y_filters,
                           int y0_q4, int y_step_q4, int w, int h) {
   int x, y;
   src -= src_stride * (SUBPEL_TAPS / 2 - 1);
@@ -88,7 +88,7 @@ static void convolve_vert(const uint8_t *src, ptrdiff_t src_stride,
 
 static void convolve_avg_vert(const uint8_t *src, ptrdiff_t src_stride,
                               uint8_t *dst, ptrdiff_t dst_stride,
-                              const interp_kernel *y_filters,
+                              const InterpKernel *y_filters,
                               int y0_q4, int y_step_q4, int w, int h) {
   int x, y;
   src -= src_stride * (SUBPEL_TAPS / 2 - 1);
@@ -112,9 +112,9 @@ static void convolve_avg_vert(const uint8_t *src, ptrdiff_t src_stride,
 
 static void convolve(const uint8_t *src, ptrdiff_t src_stride,
                      uint8_t *dst, ptrdiff_t dst_stride,
-                     const interp_kernel *const x_filters,
+                     const InterpKernel *const x_filters,
                      int x0_q4, int x_step_q4,
-                     const interp_kernel *const y_filters,
+                     const InterpKernel *const y_filters,
                      int y0_q4, int y_step_q4,
                      int w, int h) {
   // Fixed size intermediate buffer places limits on parameters.
@@ -138,14 +138,14 @@ static void convolve(const uint8_t *src, ptrdiff_t src_stride,
                 y_filters, y0_q4, y_step_q4, w, h);
 }
 
-static const interp_kernel *get_filter_base(const int16_t *filter) {
+static const InterpKernel *get_filter_base(const int16_t *filter) {
   // NOTE: This assumes that the filter table is 256-byte aligned.
   // TODO(agrange) Modify to make independent of table alignment.
-  return (const interp_kernel *)(((intptr_t)filter) & ~((intptr_t)0xFF));
+  return (const InterpKernel *)(((intptr_t)filter) & ~((intptr_t)0xFF));
 }
 
-static int get_filter_offset(const int16_t *f, const interp_kernel *base) {
-  return (const interp_kernel *)(intptr_t)f - base;
+static int get_filter_offset(const int16_t *f, const InterpKernel *base) {
+  return (const InterpKernel *)(intptr_t)f - base;
 }
 
 void vp9_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride,
@@ -153,7 +153,7 @@ void vp9_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride,
                            const int16_t *filter_x, int x_step_q4,
                            const int16_t *filter_y, int y_step_q4,
                            int w, int h) {
-  const interp_kernel *const filters_x = get_filter_base(filter_x);
+  const InterpKernel *const filters_x = get_filter_base(filter_x);
   const int x0_q4 = get_filter_offset(filter_x, filters_x);
 
   convolve_horiz(src, src_stride, dst, dst_stride, filters_x,
@@ -165,7 +165,7 @@ void vp9_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride,
                                const int16_t *filter_x, int x_step_q4,
                                const int16_t *filter_y, int y_step_q4,
                                int w, int h) {
-  const interp_kernel *const filters_x = get_filter_base(filter_x);
+  const InterpKernel *const filters_x = get_filter_base(filter_x);
   const int x0_q4 = get_filter_offset(filter_x, filters_x);
 
   convolve_avg_horiz(src, src_stride, dst, dst_stride, filters_x,
@@ -177,7 +177,7 @@ void vp9_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride,
                           const int16_t *filter_x, int x_step_q4,
                           const int16_t *filter_y, int y_step_q4,
                           int w, int h) {
-  const interp_kernel *const filters_y = get_filter_base(filter_y);
+  const InterpKernel *const filters_y = get_filter_base(filter_y);
   const int y0_q4 = get_filter_offset(filter_y, filters_y);
   convolve_vert(src, src_stride, dst, dst_stride, filters_y,
                 y0_q4, y_step_q4, w, h);
@@ -188,7 +188,7 @@ void vp9_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride,
                               const int16_t *filter_x, int x_step_q4,
                               const int16_t *filter_y, int y_step_q4,
                               int w, int h) {
-  const interp_kernel *const filters_y = get_filter_base(filter_y);
+  const InterpKernel *const filters_y = get_filter_base(filter_y);
   const int y0_q4 = get_filter_offset(filter_y, filters_y);
   convolve_avg_vert(src, src_stride, dst, dst_stride, filters_y,
                     y0_q4, y_step_q4, w, h);
@@ -199,10 +199,10 @@ void vp9_convolve8_c(const uint8_t *src, ptrdiff_t src_stride,
                      const int16_t *filter_x, int x_step_q4,
                      const int16_t *filter_y, int y_step_q4,
                      int w, int h) {
-  const interp_kernel *const filters_x = get_filter_base(filter_x);
+  const InterpKernel *const filters_x = get_filter_base(filter_x);
   const int x0_q4 = get_filter_offset(filter_x, filters_x);
 
-  const interp_kernel *const filters_y = get_filter_base(filter_y);
+  const InterpKernel *const filters_y = get_filter_base(filter_y);
   const int y0_q4 = get_filter_offset(filter_y, filters_y);
 
   convolve(src, src_stride, dst, dst_stride,
index dbde6d551bbc38dde7383634f6f981c05ed9f775..546f603b686f70612f809fd7586e780941312f1c 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "vp9/common/vp9_filter.h"
 
-DECLARE_ALIGNED(256, const interp_kernel,
+DECLARE_ALIGNED(256, const InterpKernel,
                 vp9_bilinear_filters[SUBPEL_SHIFTS]) = {
   { 0, 0, 0, 128,   0, 0, 0, 0 },
   { 0, 0, 0, 120,   8, 0, 0, 0 },
@@ -35,7 +35,7 @@ DECLARE_ALIGNED(256, const interp_kernel,
 };
 
 // Lagrangian interpolation filter
-DECLARE_ALIGNED(256, const interp_kernel,
+DECLARE_ALIGNED(256, const InterpKernel,
                 vp9_sub_pel_filters_8[SUBPEL_SHIFTS]) = {
   { 0,   0,   0, 128,   0,   0,   0,  0},
   { 0,   1,  -5, 126,   8,  -3,   1,  0},
@@ -56,7 +56,7 @@ DECLARE_ALIGNED(256, const interp_kernel,
 };
 
 // DCT based filter
-DECLARE_ALIGNED(256, const interp_kernel,
+DECLARE_ALIGNED(256, const InterpKernel,
                 vp9_sub_pel_filters_8s[SUBPEL_SHIFTS]) = {
   {0,   0,   0, 128,   0,   0,   0, 0},
   {-1,   3,  -7, 127,   8,  -3,   1, 0},
@@ -77,7 +77,7 @@ DECLARE_ALIGNED(256, const interp_kernel,
 };
 
 // freqmultiplier = 0.5
-DECLARE_ALIGNED(256, const interp_kernel,
+DECLARE_ALIGNED(256, const InterpKernel,
                 vp9_sub_pel_filters_8lp[SUBPEL_SHIFTS]) = {
   { 0,  0,  0, 128,  0,  0,  0,  0},
   {-3, -1, 32,  64, 38,  1, -3,  0},
@@ -98,14 +98,14 @@ DECLARE_ALIGNED(256, const interp_kernel,
 };
 
 
-static const interp_kernel* vp9_filter_kernels[4] = {
+static const InterpKernel* vp9_filter_kernels[4] = {
   vp9_sub_pel_filters_8,
   vp9_sub_pel_filters_8lp,
   vp9_sub_pel_filters_8s,
   vp9_bilinear_filters
 };
 
-const interp_kernel *vp9_get_interp_kernel(INTERP_FILTER filter) {
+const InterpKernel *vp9_get_interp_kernel(INTERP_FILTER filter) {
   assert(filter != SWITCHABLE);
   return vp9_filter_kernels[filter];
 }
index b611e304c5a98b63ba60bed3b11e05158cd88ebf..15610d78170112e8ff8bf2e8edaee0b9ddb6e5f8 100644 (file)
@@ -33,14 +33,14 @@ typedef enum {
   SWITCHABLE = 4  /* should be the last one */
 } INTERP_FILTER;
 
-typedef int16_t interp_kernel[SUBPEL_TAPS];
+typedef int16_t InterpKernel[SUBPEL_TAPS];
 
-const interp_kernel *vp9_get_interp_kernel(INTERP_FILTER filter);
+const InterpKernel *vp9_get_interp_kernel(INTERP_FILTER filter);
 
-extern const interp_kernel vp9_bilinear_filters[SUBPEL_SHIFTS];
-extern const interp_kernel vp9_sub_pel_filters_8[SUBPEL_SHIFTS];
-extern const interp_kernel vp9_sub_pel_filters_8s[SUBPEL_SHIFTS];
-extern const interp_kernel vp9_sub_pel_filters_8lp[SUBPEL_SHIFTS];
+extern const InterpKernel vp9_bilinear_filters[SUBPEL_SHIFTS];
+extern const InterpKernel vp9_sub_pel_filters_8[SUBPEL_SHIFTS];
+extern const InterpKernel vp9_sub_pel_filters_8s[SUBPEL_SHIFTS];
+extern const InterpKernel vp9_sub_pel_filters_8lp[SUBPEL_SHIFTS];
 
 // The VP9_BILINEAR_FILTERS_2TAP macro returns a pointer to the bilinear
 // filter kernel as a 2 tap filter.
index d554cc0edd0d105740c40fa93ae0da81dde47481..cc70e4cc00bab19db6a71541d107bc5886812518 100644 (file)
@@ -69,7 +69,7 @@ static void inter_predictor(const uint8_t *src, int src_stride,
                             const int subpel_y,
                             const struct scale_factors *sf,
                             int w, int h, int ref,
-                            const interp_kernel *kernel,
+                            const InterpKernel *kernel,
                             int xs, int ys) {
   sf->predict[subpel_x != 0][subpel_y != 0][ref](
       src, src_stride, dst, dst_stride,
@@ -81,7 +81,7 @@ void vp9_build_inter_predictor(const uint8_t *src, int src_stride,
                                const MV *src_mv,
                                const struct scale_factors *sf,
                                int w, int h, int ref,
-                               const interp_kernel *kernel,
+                               const InterpKernel *kernel,
                                enum mv_precision precision,
                                int x, int y) {
   const int is_q4 = precision == MV_PRECISION_Q4;
index 3345d83e8dd2dedc482edda961448eaa06be44e7..bf738c28b0b42a71a56e143dc97cd7a0a2f0a37f 100644 (file)
@@ -35,7 +35,7 @@ void vp9_build_inter_predictor(const uint8_t *src, int src_stride,
                                const MV *mv_q3,
                                const struct scale_factors *sf,
                                int w, int h, int do_avg,
-                               const interp_kernel *kernel,
+                               const InterpKernel *kernel,
                                enum mv_precision precision,
                                int x, int y);