[FFmpeg-devel] [PATCH] avcodec/vc1: fix overlap smoothing filter for P frames

Jerome Borsboom jerome.borsboom at carpalis.nl
Tue May 29 23:02:06 EEST 2018


The v_overlap_filter needs to run on the colocated block of the previous
macroblock. For the luma plane, the colocated block is located two blocks
on the left instead of one.

Signed-off-by: Jerome Borsboom <jerome.borsboom at carpalis.nl>
---
This should fix the issue with the SA10100.vc1 test file.

 libavcodec/vc1_loopfilter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vc1_loopfilter.c b/libavcodec/vc1_loopfilter.c
index 4c0de7c025..676922aa18 100644
--- a/libavcodec/vc1_loopfilter.c
+++ b/libavcodec/vc1_loopfilter.c
@@ -145,8 +145,8 @@ void ff_vc1_p_overlap_filter(VC1Context *v)
 
     if (v->fcm != ILACE_FRAME)
         for (i = 0; i < block_count; i++) {
-            if (s->mb_x && v->mb_type[0][s->block_index[i] - 1] &&
-                (s->first_slice_line || v->mb_type[0][s->block_index[i] - s->block_wrap[i] - 1]))
+            if (s->mb_x && v->mb_type[0][s->block_index[i] - 2 + (i > 3)] &&
+                (s->first_slice_line || v->mb_type[0][s->block_index[i] - s->block_wrap[i] - 2 + (i > 3)]))
                 vc1_v_overlap_filter(v, s->first_slice_line ? left_blk : topleft_blk, left_blk, i);
             if (s->mb_x == s->mb_width - 1)
                 if (v->mb_type[0][s->block_index[i]] &&
-- 
2.13.6




More information about the ffmpeg-devel mailing list