avcodec/proresenc_aw : fix sub_image_with_fill for interlaced encoding
authorMartin Vignali <martin.vignali@gmail.com>
Tue, 26 Feb 2019 10:54:23 +0000 (11:54 +0100)
committerMartin Vignali <martin.vignali@gmail.com>
Wed, 27 Feb 2019 16:59:48 +0000 (17:59 +0100)
used when width and/or height, not multiple of sclice dim

libavcodec/proresenc_anatoliy.c

index e287d17..5914445 100644 (file)
@@ -484,10 +484,10 @@ static inline void subimage_with_fill_template(uint16_t *src, unsigned x, unsign
         box_height = FFMIN(height - y, dst_height);
     } else {
         src_stride = stride; /* 2 lines stride */
-        src += y * src_stride * 2 + x;
+        src += y * src_stride + x;
         box_height = FFMIN(height - y * 2, dst_height);
         if (!is_top_field)
-            src += src_stride;
+            src += stride >> 1;
     }
 
     for (i = 0; i < box_height; ++i) {