summaryrefslogtreecommitdiffstats
path: root/libavformat/img2enc.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-05-16 19:04:36 +0200
committerClément Bœsch <ubitux@gmail.com>2013-05-16 23:20:07 +0200
commit3da726f18853262203fb050d971a6a4859ef0175 (patch)
tree359c46ed7365dfbebe355e30ba72cedf52107068 /libavformat/img2enc.c
parentf3962c62641d3d73efedf1c15152dfa3d8f8e3b0 (diff)
downloadffmpeg-streaming-3da726f18853262203fb050d971a6a4859ef0175.zip
ffmpeg-streaming-3da726f18853262203fb050d971a6a4859ef0175.tar.gz
lavf/img2enc: use FF_CEIL_RSHIFT().
Diffstat (limited to 'libavformat/img2enc.c')
-rw-r--r--libavformat/img2enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c
index 551d880..11e5801 100644
--- a/libavformat/img2enc.c
+++ b/libavformat/img2enc.c
@@ -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;
OpenPOWER on IntegriCloud