mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-17 04:17:05 +00:00
lavf/img2enc: use FF_CEIL_RSHIFT().
This commit is contained in:
parent
f3962c6264
commit
3da726f188
@ -101,7 +101,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
|
|
||||||
if (img->split_planes) {
|
if (img->split_planes) {
|
||||||
int ysize = codec->width * codec->height;
|
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) {
|
if (desc->comp[0].depth_minus1 >= 8) {
|
||||||
ysize *= 2;
|
ysize *= 2;
|
||||||
usize *= 2;
|
usize *= 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user