v210enc: use FFALIGN()
authorPaul B Mahol <onemda@gmail.com>
Sun, 5 Feb 2012 21:14:37 +0000 (21:14 +0000)
committerAnton Khirnov <anton@khirnov.net>
Mon, 6 Feb 2012 07:00:15 +0000 (08:00 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/v210enc.c

index c31254e..00a8902 100644 (file)
@@ -53,7 +53,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf,
                         int buf_size, void *data)
 {
     const AVFrame *pic = data;
-    int aligned_width = ((avctx->width + 47) / 48) * 48;
+    int aligned_width = FFALIGN(avctx->width, 48);
     int stride = aligned_width * 8 / 3;
     int h, w;
     const uint16_t *y = (const uint16_t*)pic->data[0];