shithub: libvpx

Download patch

ref: 20c30771b0cd1dd52e75af7de004228564fe42cb
parent: a439f5af5f4702320e2491c0319be524abbcbaac
author: Deb Mukherjee <debargha@google.com>
date: Tue Apr 22 07:15:19 EDT 2014

Rename FilterMode for compatibility with libyuv

Renames FilterMode to FilterModeEnum for compatibility
with google3 libyuv

Change-Id: Iec845e6a6aeac4171790c87ce3dd9000ab840a36

--- a/third_party/libyuv/include/libyuv/scale.h
+++ b/third_party/libyuv/include/libyuv/scale.h
@@ -23,7 +23,7 @@
   kFilterNone = 0,  // Point sample; Fastest
   kFilterBilinear = 1,  // Faster than box, but lower quality scaling down.
   kFilterBox = 2  // Highest quality
-}FilterMode;
+} FilterModeEnum;
 
 // Scales a YUV 4:2:0 image from the src width and height to the
 // dst width and height.
@@ -43,7 +43,7 @@
               uint8* dst_u, int dst_stride_u,
               uint8* dst_v, int dst_stride_v,
               int dst_width, int dst_height,
-              FilterMode filtering);
+              FilterModeEnum filtering);
 
 // Legacy API.  Deprecated
 int Scale(const uint8* src_y, const uint8* src_u, const uint8* src_v,
--- a/third_party/libyuv/source/scale.c
+++ b/third_party/libyuv/source/scale.c
@@ -3053,7 +3053,7 @@
                             int dst_width, int dst_height,
                             int src_stride, int dst_stride,
                             const uint8* src_ptr, uint8* dst_ptr,
-                            FilterMode filtering) {
+                            FilterModeEnum filtering) {
   void (*ScaleRowDown2)(const uint8* src_ptr, int src_stride,
                         uint8* dst_ptr, int dst_width);
   assert(IS_ALIGNED(src_width, 2));
@@ -3097,7 +3097,7 @@
                             int dst_width, int dst_height,
                             int src_stride, int dst_stride,
                             const uint8* src_ptr, uint8* dst_ptr,
-                            FilterMode filtering) {
+                            FilterModeEnum filtering) {
   void (*ScaleRowDown4)(const uint8* src_ptr, int src_stride,
                         uint8* dst_ptr, int dst_width);
   assert(IS_ALIGNED(src_width, 4));
@@ -3142,7 +3142,7 @@
                             int dst_width, int dst_height,
                             int src_stride, int dst_stride,
                             const uint8* src_ptr, uint8* dst_ptr,
-                            FilterMode filtering) {
+                            FilterModeEnum filtering) {
   void (*ScaleRowDown8)(const uint8* src_ptr, int src_stride,
                         uint8* dst_ptr, int dst_width);
   assert(IS_ALIGNED(src_width, 8));
@@ -3181,7 +3181,7 @@
                              int dst_width, int dst_height,
                              int src_stride, int dst_stride,
                              const uint8* src_ptr, uint8* dst_ptr,
-                             FilterMode filtering) {
+                             FilterModeEnum filtering) {
   void (*ScaleRowDown34_0)(const uint8* src_ptr, int src_stride,
                            uint8* dst_ptr, int dst_width);
   void (*ScaleRowDown34_1)(const uint8* src_ptr, int src_stride,
@@ -3274,7 +3274,7 @@
                              int dst_width, int dst_height,
                              int src_stride, int dst_stride,
                              const uint8* src_ptr, uint8* dst_ptr,
-                             FilterMode filtering) {
+                             FilterModeEnum filtering) {
   void (*ScaleRowDown38_3)(const uint8* src_ptr, int src_stride,
                            uint8* dst_ptr, int dst_width);
   void (*ScaleRowDown38_2)(const uint8* src_ptr, int src_stride,
@@ -3634,7 +3634,7 @@
                               int dst_width, int dst_height,
                               int src_stride, int dst_stride,
                               const uint8* src_ptr, uint8* dst_ptr,
-                              FilterMode filtering) {
+                              FilterModeEnum filtering) {
   if (!filtering) {
     ScalePlaneSimple(src_width, src_height, dst_width, dst_height,
                      src_stride, dst_stride, src_ptr, dst_ptr);
@@ -3657,7 +3657,7 @@
                            int dst_width, int dst_height,
                            int src_stride, int dst_stride,
                            const uint8* src_ptr, uint8* dst_ptr,
-                           FilterMode filtering) {
+                           FilterModeEnum filtering) {
   if (!filtering) {
     ScalePlaneSimple(src_width, src_height, dst_width, dst_height,
                      src_stride, dst_stride, src_ptr, dst_ptr);
@@ -3703,7 +3703,7 @@
                        int src_width, int src_height,
                        uint8* dst, int dst_stride,
                        int dst_width, int dst_height,
-                       FilterMode filtering, int use_ref) {
+                       FilterModeEnum filtering, int use_ref) {
   // Use specialized scales to improve performance for common resolutions.
   // For example, all the 1/2 scalings will use ScalePlaneDown2()
   if (dst_width == src_width && dst_height == src_height) {
@@ -3767,7 +3767,7 @@
               uint8* dst_u, int dst_stride_u,
               uint8* dst_v, int dst_stride_v,
               int dst_width, int dst_height,
-              FilterMode filtering) {
+              FilterModeEnum filtering) {
   if (!src_y || !src_u || !src_v || src_width <= 0 || src_height == 0 ||
       !dst_y || !dst_u || !dst_v || dst_width <= 0 || dst_height <= 0) {
     return -1;
@@ -3832,7 +3832,7 @@
   int src_halfheight = (src_height + 1) >> 1;
   int dst_halfwidth = (dst_width + 1) >> 1;
   int dst_halfheight = (dst_height + 1) >> 1;
-  FilterMode filtering = interpolate ? kFilterBox : kFilterNone;
+  FilterModeEnum filtering = interpolate ? kFilterBox : kFilterNone;
 
   ScalePlane(src_y, src_stride_y, src_width, src_height,
              dst_y, dst_stride_y, dst_width, dst_height,
--- a/vpxdec.c
+++ b/vpxdec.c
@@ -119,7 +119,7 @@
 #endif
 
 static int vpx_image_scale(vpx_image_t *src, vpx_image_t *dst,
-                           FilterMode mode) {
+                           FilterModeEnum mode) {
   assert(src->fmt == VPX_IMG_FMT_I420);
   assert(dst->fmt == VPX_IMG_FMT_I420);
   return I420Scale(src->planes[VPX_PLANE_Y], src->stride[VPX_PLANE_Y],