]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/imgconvert.c
Make sure the EC code does not attempt to use inter based concealment if there
[ffmpeg] / libavcodec / imgconvert.c
index e1dde8146d77293d0efd83f6ce903942ec5e15a8..0fb2fe6c468701c7b05337985f95eb2ed5989d9c 100644 (file)
@@ -760,8 +760,8 @@ int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width,
 
     for (i=0; i<data_planes; i++) {
         if (i == 1) {
-            w = ((width >> desc->log2_chroma_w) * pf->depth + 7) / 8;
-            h = height >> desc->log2_chroma_h;
+            w = (- ((-width) >> desc->log2_chroma_w) * pf->depth + 7) / 8;
+            h = -((-height) >> desc->log2_chroma_h);
             if (pix_fmt == PIX_FMT_NV12 || pix_fmt == PIX_FMT_NV21)
                 w <<= 1;
         } else if (i == 3) {