diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-09 20:45:33 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-10 00:33:12 +0100 |
commit | d736b52a045c5a51d5dce0da3905619b51b878d9 (patch) | |
tree | a760e072f6c7024bb1674e8afc984d70609c9907 /libswscale | |
parent | 226d35c84591f1901c2a13819031549909faa1f5 (diff) | |
download | ffmpeg-d736b52a045c5a51d5dce0da3905619b51b878d9.tar.gz |
swscale: Drop is9_OR_10BPS() use, its name is not correct
Found-by: Luca Barbato
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/output.c | 2 | ||||
-rw-r--r-- | libswscale/ppc/swscale_altivec.c | 2 | ||||
-rw-r--r-- | libswscale/swscale.c | 2 | ||||
-rw-r--r-- | libswscale/swscale_internal.h | 4 | ||||
-rw-r--r-- | libswscale/x86/swscale_template.c | 2 |
5 files changed, 5 insertions, 7 deletions
diff --git a/libswscale/output.c b/libswscale/output.c index 62cbe2ffaa..ea1ee54f3c 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -2184,7 +2184,7 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c, } else 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 (isNBPS(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 35a08c4793..9438a63ff2 100644 --- a/libswscale/ppc/swscale_altivec.c +++ b/libswscale/ppc/swscale_altivec.c @@ -337,7 +337,7 @@ av_cold void ff_sws_init_swscale_ppc(SwsContext *c) if (c->srcBpc == 8 && c->dstBpc <= 14) { c->hyScale = c->hcScale = hScale_altivec_real; } - if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) && + if (!is16BPS(dstFormat) && !isNBPS(dstFormat) && dstFormat != AV_PIX_FMT_NV12 && dstFormat != AV_PIX_FMT_NV21 && !c->needAlpha) { c->yuv2planeX = yuv2planeX_altivec; diff --git a/libswscale/swscale.c b/libswscale/swscale.c index c3a8d0efd4..eb2f182ce6 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -254,7 +254,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 = isNBPS(c->srcFormat) || is16BPS(c->srcFormat); int lastDstY; diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 54cd85cce3..a892a4f97c 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -652,15 +652,13 @@ 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 isNBPS(enum AVPixelFormat pix_fmt) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); av_assert0(desc); return desc->comp[0].depth >= 9 && desc->comp[0].depth <= 14; } -#define isNBPS(x) is9_OR_10BPS(x) - static av_always_inline int isBE(enum AVPixelFormat pix_fmt) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c index 1a102271c1..b8bdcd4d03 100644 --- a/libswscale/x86/swscale_template.c +++ b/libswscale/x86/swscale_template.c @@ -1499,7 +1499,7 @@ static av_cold void RENAME(sws_init_swscale)(SwsContext *c) enum AVPixelFormat dstFormat = c->dstFormat; c->use_mmx_vfilter= 0; - if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) && dstFormat != AV_PIX_FMT_NV12 + if (!is16BPS(dstFormat) && !isNBPS(dstFormat) && dstFormat != AV_PIX_FMT_NV12 && dstFormat != AV_PIX_FMT_NV21 && !(c->flags & SWS_BITEXACT)) { if (c->flags & SWS_ACCURATE_RND) { if (!(c->flags & SWS_FULL_CHR_H_INT)) { |