Revert "v210enc: use FFALIGN()"
authorPaul B Mahol <onemda@gmail.com>
Mon, 6 Feb 2012 17:54:39 +0000 (17:54 +0000)
committerAnton Khirnov <anton@khirnov.net>
Mon, 6 Feb 2012 18:57:52 +0000 (19:57 +0100)
FFALIGN doesn't work with non-powers-of-2.

This reverts commit 7ad1b612c8a2a1b1b47f6c3c580ced4bca17e1c7.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/v210enc.c

index 17b3a9a..77cb30b 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 = FFALIGN(avctx->width, 48);
+    int aligned_width = ((avctx->width + 47) / 48) * 48;
     int stride = aligned_width * 8 / 3;
     int h, w;
     const uint16_t *y = (const uint16_t*)pic->data[0];