[FFmpeg-cvslog] Revert "v210enc: use FFALIGN()"

Paul B Mahol git at videolan.org
Tue Feb 7 02:03:00 CET 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Feb  6 17:54:39 2012 +0000| [d016d3074cc084ea813e389f046eee01ecd48b7e] | committer: Anton Khirnov

Revert "v210enc: use FFALIGN()"

FFALIGN doesn't work with non-powers-of-2.

This reverts commit 7ad1b612c8a2a1b1b47f6c3c580ced4bca17e1c7.

Signed-off-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Anton Khirnov <anton at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d016d3074cc084ea813e389f046eee01ecd48b7e
---

 libavcodec/v210enc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c
index 17b3a9a..77cb30b 100644
--- a/libavcodec/v210enc.c
+++ b/libavcodec/v210enc.c
@@ -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];



More information about the ffmpeg-cvslog mailing list