swscale: Drop is9_OR_10BPS() use, its name is not correct

Found-by: Luca Barbato
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/240/head
Michael Niedermayer 8 years ago
parent 226d35c845
commit d736b52a04
  1. 2
      libswscale/output.c
  2. 2
      libswscale/ppc/swscale_altivec.c
  3. 2
      libswscale/swscale.c
  4. 4
      libswscale/swscale_internal.h
  5. 2
      libswscale/x86/swscale_template.c

@ -2184,7 +2184,7 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c,
} else if (is16BPS(dstFormat)) { } else if (is16BPS(dstFormat)) {
*yuv2planeX = isBE(dstFormat) ? yuv2planeX_16BE_c : yuv2planeX_16LE_c; *yuv2planeX = isBE(dstFormat) ? yuv2planeX_16BE_c : yuv2planeX_16LE_c;
*yuv2plane1 = isBE(dstFormat) ? yuv2plane1_16BE_c : yuv2plane1_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) { if (desc->comp[0].depth == 9) {
*yuv2planeX = isBE(dstFormat) ? yuv2planeX_9BE_c : yuv2planeX_9LE_c; *yuv2planeX = isBE(dstFormat) ? yuv2planeX_9BE_c : yuv2planeX_9LE_c;
*yuv2plane1 = isBE(dstFormat) ? yuv2plane1_9BE_c : yuv2plane1_9LE_c; *yuv2plane1 = isBE(dstFormat) ? yuv2plane1_9BE_c : yuv2plane1_9LE_c;

@ -337,7 +337,7 @@ av_cold void ff_sws_init_swscale_ppc(SwsContext *c)
if (c->srcBpc == 8 && c->dstBpc <= 14) { if (c->srcBpc == 8 && c->dstBpc <= 14) {
c->hyScale = c->hcScale = hScale_altivec_real; 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 && dstFormat != AV_PIX_FMT_NV12 && dstFormat != AV_PIX_FMT_NV21 &&
!c->needAlpha) { !c->needAlpha) {
c->yuv2planeX = yuv2planeX_altivec; c->yuv2planeX = yuv2planeX_altivec;

@ -254,7 +254,7 @@ static int swscale(SwsContext *c, const uint8_t *src[],
yuv2anyX_fn yuv2anyX = c->yuv2anyX; yuv2anyX_fn yuv2anyX = c->yuv2anyX;
const int chrSrcSliceY = srcSliceY >> c->chrSrcVSubSample; const int chrSrcSliceY = srcSliceY >> c->chrSrcVSubSample;
const int chrSrcSliceH = AV_CEIL_RSHIFT(srcSliceH, 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); is16BPS(c->srcFormat);
int lastDstY; int lastDstY;

@ -652,15 +652,13 @@ static av_always_inline int is16BPS(enum AVPixelFormat pix_fmt)
return desc->comp[0].depth == 16; 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); const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert0(desc); av_assert0(desc);
return desc->comp[0].depth >= 9 && desc->comp[0].depth <= 14; 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) static av_always_inline int isBE(enum AVPixelFormat pix_fmt)
{ {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);

@ -1499,7 +1499,7 @@ static av_cold void RENAME(sws_init_swscale)(SwsContext *c)
enum AVPixelFormat dstFormat = c->dstFormat; enum AVPixelFormat dstFormat = c->dstFormat;
c->use_mmx_vfilter= 0; 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)) { && dstFormat != AV_PIX_FMT_NV21 && !(c->flags & SWS_BITEXACT)) {
if (c->flags & SWS_ACCURATE_RND) { if (c->flags & SWS_ACCURATE_RND) {
if (!(c->flags & SWS_FULL_CHR_H_INT)) { if (!(c->flags & SWS_FULL_CHR_H_INT)) {

Loading…
Cancel
Save