Commit 3da726f1 authored by Clément Bœsch's avatar Clément Bœsch

lavf/img2enc: use FF_CEIL_RSHIFT().

parent f3962c62
......@@ -101,7 +101,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
if (img->split_planes) {
int ysize = codec->width * codec->height;
int usize = ((-codec->width)>>desc->log2_chroma_w) * ((-codec->height)>>desc->log2_chroma_h);
int usize = FF_CEIL_RSHIFT(codec->width, desc->log2_chroma_w) * FF_CEIL_RSHIFT(codec->height, desc->log2_chroma_h);
if (desc->comp[0].depth_minus1 >= 8) {
ysize *= 2;
usize *= 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment