]> git.sesse.net Git - ffmpeg/commitdiff
nuv: use FFALIGN.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 5 Nov 2011 20:11:37 +0000 (21:11 +0100)
committerAnton Khirnov <anton@khirnov.net>
Sat, 26 Nov 2011 07:38:14 +0000 (08:38 +0100)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/nuv.c

index 73aec433f3d7cab06ce73b5fa415a9e6e201ac7b..7bace2ec4061dacc9e4aa4fba91b779f06699ee5 100644 (file)
@@ -107,8 +107,8 @@ static void get_quant_quality(NuvContext *c, int quality) {
 
 static int codec_reinit(AVCodecContext *avctx, int width, int height, int quality) {
     NuvContext *c = avctx->priv_data;
-    width = (width + 1) & ~1;
-    height = (height + 1) & ~1;
+    width  = FFALIGN(width,  2);
+    height = FFALIGN(height, 2);
     if (quality >= 0)
         get_quant_quality(c, quality);
     if (width != c->width || height != c->height) {