swscale: Rename is9_OR_10 to match what it does
authorLuca Barbato <lu_zero@gentoo.org>
Tue, 27 Sep 2016 16:13:37 +0000 (18:13 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Tue, 27 Sep 2016 16:48:30 +0000 (18:48 +0200)
It is used to select functions that work with 9-15bits.

libswscale/output.c
libswscale/ppc/swscale_altivec.c
libswscale/swscale.c
libswscale/swscale_internal.h
libswscale/swscale_unscaled.c
libswscale/x86/swscale_template.c

index 93b3db6..6a51bb9 100644 (file)
@@ -1364,7 +1364,7 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c,
     if (is16BPS(dstFormat)) {
         *yuv2planeX = isBE(dstFormat) ? yuv2planeX_16BE_c  : yuv2planeX_16LE_c;
         *yuv2plane1 = isBE(dstFormat) ? yuv2plane1_16BE_c  : yuv2plane1_16LE_c;
-    } else if (is9_OR_10BPS(dstFormat)) {
+    } else if (is9_15BPS(dstFormat)) {
         if (desc->comp[0].depth == 9) {
             *yuv2planeX = isBE(dstFormat) ? yuv2planeX_9BE_c  : yuv2planeX_9LE_c;
             *yuv2plane1 = isBE(dstFormat) ? yuv2plane1_9BE_c  : yuv2plane1_9LE_c;
index 004b385..9e3ddf3 100644 (file)
@@ -298,7 +298,7 @@ av_cold void ff_sws_init_swscale_ppc(SwsContext *c)
     if (c->srcBpc == 8 && c->dstBpc <= 10) {
         c->hyScale = c->hcScale = hScale_altivec_real;
     }
-    if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) &&
+    if (!is16BPS(dstFormat) && !is9_15BPS(dstFormat) &&
         dstFormat != AV_PIX_FMT_NV12 && dstFormat != AV_PIX_FMT_NV21 &&
         !c->alpPixBuf) {
         c->yuv2planeX = yuv2planeX_altivec;
index 142c79c..987a3bb 100644 (file)
@@ -386,7 +386,7 @@ static int swscale(SwsContext *c, const uint8_t *src[],
     yuv2anyX_fn yuv2anyX             = c->yuv2anyX;
     const int chrSrcSliceY           =                srcSliceY >> c->chrSrcVSubSample;
     const int chrSrcSliceH           = AV_CEIL_RSHIFT(srcSliceH,   c->chrSrcVSubSample);
-    int should_dither                = is9_OR_10BPS(c->srcFormat) ||
+    int should_dither                = is9_15BPS(c->srcFormat) ||
                                        is16BPS(c->srcFormat);
     int lastDstY;
 
@@ -696,7 +696,7 @@ static int swscale(SwsContext *c, const uint8_t *src[],
         if (is16BPS(c->dstFormat))
             length *= 2;
 
-        if (is9_OR_10BPS(dstFormat)) {
+        if (is9_15BPS(dstFormat)) {
             const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(dstFormat);
             fill_plane9or10(dst[3], dstStride[3], length, height, lastDstY,
                             255, desc->comp[3].depth, isBE(dstFormat));
index 625bd86..abcdb9f 100644 (file)
@@ -565,7 +565,7 @@ static av_always_inline int is16BPS(enum AVPixelFormat pix_fmt)
     return desc->comp[0].depth == 16;
 }
 
-static av_always_inline int is9_OR_10BPS(enum AVPixelFormat pix_fmt)
+static av_always_inline int is9_15BPS(enum AVPixelFormat pix_fmt)
 {
     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
     av_assert0(desc);
index 0e6be51..fbdc2af 100644 (file)
@@ -813,7 +813,7 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[],
             int val = (plane == 3) ? 255 : 128;
             if (is16BPS(c->dstFormat))
                 length *= 2;
-            if (is9_OR_10BPS(c->dstFormat)) {
+            if (is9_15BPS(c->dstFormat)) {
                 fill_plane9or10(dst[plane], dstStride[plane],
                                 length, height, y, val,
                                 desc_dst->comp[plane].depth,
@@ -822,7 +822,7 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[],
                 fillPlane(dst[plane], dstStride[plane], length, height, y,
                           val);
         } else {
-            if (is9_OR_10BPS(c->srcFormat)) {
+            if (is9_15BPS(c->srcFormat)) {
                 const int src_depth = desc_src->comp[plane].depth;
                 const int dst_depth = desc_dst->comp[plane].depth;
                 const uint16_t *srcPtr2 = (const uint16_t *) srcPtr;
@@ -862,7 +862,7 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[],
                             COPY9_OR_10TO16(AV_RL16, AV_WL16);
                         }
                     }
-                } else if (is9_OR_10BPS(c->dstFormat)) {
+                } else if (is9_15BPS(c->dstFormat)) {
                     uint16_t *dstPtr2 = (uint16_t *) dstPtr;
 #define COPY9_OR_10TO9_OR_10(loop) \
                     for (i = 0; i < height; i++) { \
@@ -914,7 +914,7 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[],
                         COPY9_OR_10TO8(AV_RL16);
                     }
                 }
-            } else if (is9_OR_10BPS(c->dstFormat)) {
+            } else if (is9_15BPS(c->dstFormat)) {
                 const int dst_depth = desc_dst->comp[plane].depth;
                 uint16_t *dstPtr2 = (uint16_t *) dstPtr;
 
index 3fb8bc8..e0d1abe 100644 (file)
@@ -1564,7 +1564,7 @@ static av_cold void RENAME(sws_init_swscale)(SwsContext *c)
 {
     enum AVPixelFormat dstFormat = c->dstFormat;
 
-    if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) &&
+    if (!is16BPS(dstFormat) && !is9_15BPS(dstFormat) &&
         dstFormat != AV_PIX_FMT_NV12 && dstFormat != AV_PIX_FMT_NV21) {
         if (!(c->flags & SWS_BITEXACT)) {
             if (c->flags & SWS_ACCURATE_RND) {