X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavcodec%2Flagarith.c;h=2c6d70c0650b6f920b77bbcb0e0e8d98e18fc1b5;hp=a08d7fde1b59714c062683b75c7c5cd75f9501a2;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavcodec/lagarith.c b/ffmpeg/libavcodec/lagarith.c index a08d7fd..2c6d70c 100644 --- a/ffmpeg/libavcodec/lagarith.c +++ b/ffmpeg/libavcodec/lagarith.c @@ -128,7 +128,7 @@ static int lag_decode_prob(GetBitContext *gb, uint32_t *value) } val = get_bits_long(gb, bits); - val |= 1 << bits; + val |= 1U << bits; *value = val - 1; @@ -675,10 +675,10 @@ static int lag_decode_frame(AVCodecContext *avctx, lag_decode_arith_plane(l, p->data[0], avctx->width, avctx->height, p->linesize[0], buf + offset_ry, buf_size - offset_ry); - lag_decode_arith_plane(l, p->data[1], avctx->width / 2, + lag_decode_arith_plane(l, p->data[1], (avctx->width + 1) / 2, avctx->height, p->linesize[1], buf + offset_gu, buf_size - offset_gu); - lag_decode_arith_plane(l, p->data[2], avctx->width / 2, + lag_decode_arith_plane(l, p->data[2], (avctx->width + 1) / 2, avctx->height, p->linesize[2], buf + offset_bv, buf_size - offset_bv); break; @@ -702,11 +702,11 @@ static int lag_decode_frame(AVCodecContext *avctx, lag_decode_arith_plane(l, p->data[0], avctx->width, avctx->height, p->linesize[0], buf + offset_ry, buf_size - offset_ry); - lag_decode_arith_plane(l, p->data[2], avctx->width / 2, - avctx->height / 2, p->linesize[2], + lag_decode_arith_plane(l, p->data[2], (avctx->width + 1) / 2, + (avctx->height + 1) / 2, p->linesize[2], buf + offset_gu, buf_size - offset_gu); - lag_decode_arith_plane(l, p->data[1], avctx->width / 2, - avctx->height / 2, p->linesize[1], + lag_decode_arith_plane(l, p->data[1], (avctx->width + 1) / 2, + (avctx->height + 1) / 2, p->linesize[1], buf + offset_bv, buf_size - offset_bv); break; default: