diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2016-09-27 18:13:37 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2016-09-27 18:48:30 +0200 |
commit | 2b5b1e1e9b89063d352e2efed014f9d761b85032 (patch) | |
tree | 05ae95e7dbb8048c4ddedb50cd7941dcaa5e2d34 | |
parent | e87a501e7d03ac68b58520108fe24ad9d0b36765 (diff) | |
download | ffmpeg-streaming-2b5b1e1e9b89063d352e2efed014f9d761b85032.zip ffmpeg-streaming-2b5b1e1e9b89063d352e2efed014f9d761b85032.tar.gz |
swscale: Rename is9_OR_10 to match what it does
It is used to select functions that work with 9-15bits.
-rw-r--r-- | libswscale/output.c | 2 | ||||
-rw-r--r-- | libswscale/ppc/swscale_altivec.c | 2 | ||||
-rw-r--r-- | libswscale/swscale.c | 4 | ||||
-rw-r--r-- | libswscale/swscale_internal.h | 2 | ||||
-rw-r--r-- | libswscale/swscale_unscaled.c | 8 | ||||
-rw-r--r-- | libswscale/x86/swscale_template.c | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/libswscale/output.c b/libswscale/output.c index 93b3db6..6a51bb9 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -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; diff --git a/libswscale/ppc/swscale_altivec.c b/libswscale/ppc/swscale_altivec.c index 004b385..9e3ddf3 100644 --- a/libswscale/ppc/swscale_altivec.c +++ b/libswscale/ppc/swscale_altivec.c @@ -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; diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 142c79c..987a3bb 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -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)); diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 625bd86..abcdb9f 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -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); diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 0e6be51..fbdc2af 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -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; diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c index 3fb8bc8..e0d1abe 100644 --- a/libswscale/x86/swscale_template.c +++ b/libswscale/x86/swscale_template.c @@ -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) { |