avcodec/proresenc_aw : fix interlace encoding for unsafe height
authorMartin Vignali <martin.vignali@gmail.com>
Thu, 7 Mar 2019 23:06:01 +0000 (00:06 +0100)
committerMartin Vignali <martin.vignali@gmail.com>
Sat, 9 Mar 2019 19:46:50 +0000 (20:46 +0100)
fix the call of the unsafe version of slice encoding in interlace mode
fix padding line count in sub image with fill in interlace mode

libavcodec/proresenc_anatoliy.c
tests/ref/vsynth/vsynth3-prores_444_int
tests/ref/vsynth/vsynth3-prores_int

index 5914445..0fc79fc 100644 (file)
@@ -485,7 +485,7 @@ static inline void subimage_with_fill_template(uint16_t *src, unsigned x, unsign
     } else {
         src_stride = stride; /* 2 lines stride */
         src += y * src_stride + x;
-        box_height = FFMIN(height - y * 2, dst_height);
+        box_height = FFMIN(height/2 - y, dst_height);
         if (!is_top_field)
             src += stride >> 1;
     }
@@ -671,7 +671,7 @@ static int prores_encode_picture(AVCodecContext *avctx, const AVFrame *pic,
             picture_height = avctx->height / 2;
         }
         mb_height = (picture_height + 15) >> 4;
-        unsafe_mb_height_limit = mb_height * 2;
+        unsafe_mb_height_limit = mb_height;
     }
 
     for (i = av_log2(DEFAULT_SLICE_MB_WIDTH); i >= 0; --i) {
index ec9dda8..36760ad 100644 (file)
@@ -1,4 +1,4 @@
-4928501bad7c46a277eab54440f2a794 *tests/data/fate/vsynth3-prores_444_int.mov
-230539 tests/data/fate/vsynth3-prores_444_int.mov
-7acff20947af998d5a6e6f85ff24a6d2 *tests/data/fate/vsynth3-prores_444_int.out.rawvideo
-stddev:    3.27 PSNR: 37.82 MAXDIFF:   42 bytes:    86700/    86700
+270045a731d4cb6ba253880021c87a63 *tests/data/fate/vsynth3-prores_444_int.mov
+184397 tests/data/fate/vsynth3-prores_444_int.mov
+a8852aa2841c2ce5f2aa86176ceda4ef *tests/data/fate/vsynth3-prores_444_int.out.rawvideo
+stddev:    3.24 PSNR: 37.91 MAXDIFF:   41 bytes:    86700/    86700
index 0208a2d..53dcfbd 100644 (file)
@@ -1,4 +1,4 @@
-8bd60c3d149977dd25e21adcf57d76fa *tests/data/fate/vsynth3-prores_int.mov
-148325 tests/data/fate/vsynth3-prores_int.mov
-628a667a0de678239f05a6e5497c4601 *tests/data/fate/vsynth3-prores_int.out.rawvideo
-stddev:    3.06 PSNR: 38.40 MAXDIFF:   29 bytes:    86700/    86700
+ee1f14b23eb9dee4d59b021d4ec041bf *tests/data/fate/vsynth3-prores_int.mov
+120484 tests/data/fate/vsynth3-prores_int.mov
+e5859ba47a99f9e53c1ddcaa68a8f8f8 *tests/data/fate/vsynth3-prores_int.out.rawvideo
+stddev:    2.92 PSNR: 38.81 MAXDIFF:   29 bytes:    86700/    86700