lavu: add FF_CEIL_RSHIFT and use it in various places.

This commit is contained in:
Clément Bœsch
2013-05-07 16:31:02 +02:00
parent d9cb1e0e15
commit 570d63eef3
17 changed files with 45 additions and 41 deletions

View File

@@ -138,7 +138,7 @@ static int get_video_buffer(AVFrame *frame, int align)
for (i = 0; i < 4 && frame->linesize[i]; i++) {
int h = FFALIGN(frame->height, 32);
if (i == 1 || i == 2)
h = -((-h) >> desc->log2_chroma_h);
h = FF_CEIL_RSHIFT(h, desc->log2_chroma_h);
frame->buf[i] = av_buffer_alloc(frame->linesize[i] * h + 16);
if (!frame->buf[i])