[FFmpeg-devel] [PATCH 4/5] avcodec/proresdec_lgpl: use av_mod_uintp2
Michael Niedermayer
michael at niedermayer.cc
Fri Jan 29 23:31:12 CET 2016
On Wed, Jan 20, 2016 at 03:04:07PM -0300, James Almer wrote:
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
> libavcodec/proresdec_lgpl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/proresdec_lgpl.c b/libavcodec/proresdec_lgpl.c
> index 9e5674e..467a423 100644
> --- a/libavcodec/proresdec_lgpl.c
> +++ b/libavcodec/proresdec_lgpl.c
> @@ -251,7 +251,7 @@ static int decode_picture_header(ProresContext *ctx, const uint8_t *buf,
> (1 << (4 + ctx->frame->interlaced_frame)) - 1) >>
> (4 + ctx->frame->interlaced_frame);
>
> - remainder = ctx->num_x_mbs & ((1 << slice_width_factor) - 1);
> + remainder = av_mod_uintp2(ctx->num_x_mbs, slice_width_factor);
> num_x_slices = (ctx->num_x_mbs >> slice_width_factor) + (remainder & 1) +
> ((remainder >> 1) & 1) + ((remainder >> 2) & 1);
LGTM
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
It is what and why we do it that matters, not just one of them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160129/b999c816/attachment.sig>
More information about the ffmpeg-devel
mailing list