diff mbox

[FFmpeg-devel,1/3] avcodec/vc1: fix condition guarding overlap filter on I picture

Message ID cd8d2e1c-abbb-c853-d8e4-643d5443a9cc@carpalis.nl
State Accepted
Commit 1cf6129d13a33ab43c4e403f342a5756b69482ea
Headers show

Commit Message

Jerome Borsboom June 20, 2018, 11:10 a.m. UTC
The overlap filter needs to run when PQUANT is 9 or higher, irrespective
of CONDOVER.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
---
This patch set should fix decoding of the SA10125.vc1 test file to make it
bit-equal to the reference decoder.

 libavcodec/vc1_block.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Carl Eugen Hoyos June 20, 2018, 12:03 p.m. UTC | #1
2018-06-20 13:10 GMT+02:00, Jerome Borsboom <jerome.borsboom@carpalis.nl>:
> The overlap filter needs to run when PQUANT is 9 or higher, irrespective
> of CONDOVER.
>
> Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
> ---
> This patch set should fix decoding of the SA10125.vc1 test file to make it
> bit-equal to the reference decoder.

I can confirm that this patchset fixes SA10125.vc1 and a few other files.
The remaining files with issues are:
SA10135.vc1: Shows an error message ("missing cbpcy_vlc") and produces
wrong output
SA10178.vc1: 18 frames ok, last 7 frames are different

Several samples show an error that luma scaling and chroma scaling are
not supported and produce incorrect output, for example SA00048.vc1.
A few samples use pan-scan which is not supported by FFmpeg, for
example SA10164.vc1 - a warning is shown.

Thank you, Carl Eugen
Jerome Borsboom June 20, 2018, 1:40 p.m. UTC | #2
> SA10178.vc1: 18 frames ok, last 7 frames are different

this one decodes correctly when you force bitexact decoding:

ffmpeg -bitexact -i SA10178.vc1 SA10178_s.yuv

This is caused by the issue that my rejected patch 'avcodec/x86/hpeldsp:
fix half pel interpolation' tried to resolve. The proposed solution to
make bitexact decoding the default for VC-1 seems right.


Regards,
Jerome
Carl Eugen Hoyos June 28, 2018, 11:30 p.m. UTC | #3
2018-06-20 13:10 GMT+02:00, Jerome Borsboom <jerome.borsboom@carpalis.nl>:
> The overlap filter needs to run when PQUANT is 9 or higher, irrespective
> of CONDOVER.
>
> Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
> ---
> This patch set should fix decoding of the SA10125.vc1 test file to make it
> bit-equal to the reference decoder.

Patch set applied.

Thank you, Carl Eugen
diff mbox

Patch

diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c
index c620566f78..b58b71b3e0 100644
--- a/libavcodec/vc1_block.c
+++ b/libavcodec/vc1_block.c
@@ -2726,7 +2726,7 @@  static void vc1_decode_i_blocks_adv(VC1Context *v)
                 v->vc1dsp.vc1_inv_trans_8x8(block[k]);
             }
 
-            if (v->overlap && v->condover != CONDOVER_NONE)
+            if (v->overlap && (v->pq >= 9 || v->condover != CONDOVER_NONE))
                 ff_vc1_i_overlap_filter(v);
             vc1_put_blocks_clamped(v, 1);
             if (v->s.loop_filter)