From 2268db2cd052674fde55c7d48b7a5098ce89b4ba Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Thu, 3 Sep 2015 13:44:14 +0200 Subject: lavu: Drop the {minus,plus}1 suffix from AVComponentDescriptor fields The new fields can be accessed directly and are more intelligible. Signed-off-by: Vittorio Giovara --- libswscale/swscale.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libswscale/swscale.c') diff --git a/libswscale/swscale.c b/libswscale/swscale.c index f6427bfb55..2f9cb1b453 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); } -- cgit v1.2.3