X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libswscale%2Fswscale.c;h=2f9cb1b453d2da8995b41cc4eabd6d9abd8775b5;hb=2268db2cd052674fde55c7d48b7a5098ce89b4ba;hp=f6427bfb55db48604e9ea1c93bba67b2aadcfc93;hpb=928061670e873e816daa14827853b7e11221ff5f;p=ffmpeg diff --git a/libswscale/swscale.c b/libswscale/swscale.c index f6427bfb55d..2f9cb1b453d 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -91,7 +91,7 @@ static void hScale16To19_c(SwsContext *c, int16_t *_dst, int dstW, int i; int32_t *dst = (int32_t *) _dst; const uint16_t *src = (const uint16_t *) _src; - int bits = desc->comp[0].depth_minus1; + int bits = desc->comp[0].depth - 1; int sh = bits - 4; for (i = 0; i < dstW; i++) { @@ -114,7 +114,7 @@ static void hScale16To15_c(SwsContext *c, int16_t *dst, int dstW, const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->srcFormat); int i; const uint16_t *src = (const uint16_t *) _src; - int sh = desc->comp[0].depth_minus1; + int sh = desc->comp[0].depth - 1; for (i = 0; i < dstW; i++) { int j; @@ -699,8 +699,7 @@ static int swscale(SwsContext *c, const uint8_t *src[], if (is9_OR_10BPS(dstFormat)) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(dstFormat); fill_plane9or10(dst[3], dstStride[3], length, height, lastDstY, - 255, desc->comp[3].depth_minus1 + 1, - isBE(dstFormat)); + 255, desc->comp[3].depth, isBE(dstFormat)); } else fillPlane(dst[3], dstStride[3], length, height, lastDstY, 255); }