[FFmpeg-devel] [PATCH 1/5] avcodec/vc1: FIELDTX is only coded raw in interlaced frame I pictures
michael at niedermayer.cc
Sun May 20 03:17:09 EEST 2018
On Fri, May 18, 2018 at 05:06:18PM +0200, Jerome Borsboom wrote:
> FIELDTX bitplane is only present in interlace frame I pictures.
> v->fieldtx_is_raw may spill over from a previous interlaced frame I picture
> while decoding a non-interlace frame I picture.
> Signed-off-by: Jerome Borsboom <jerome.borsboom at carpalis.nl>
> This patch set solves various issues that affected the SA10180.vc1 test file. With
> these patches applied, this file decodes bitequal to the Intel VAAPI decoder on Haswell.
> Please also review my patch set of May 9th that enables hwaccel decode of the SA10180.vc1
> libavcodec/vc1_block.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c
> index f59c440943..daf30fdbfe 100644
> --- a/libavcodec/vc1_block.c
> +++ b/libavcodec/vc1_block.c
> @@ -2680,7 +2680,7 @@ static void vc1_decode_i_blocks_adv(VC1Context *v)
> s->current_picture.motion_val[s->block_index + v->blocks_off] = 0;
> // do actual MB decoding and displaying
> - if (v->fieldtx_is_raw)
> + if (v->fcm == ILACE_FRAME && v->fieldtx_is_raw)
> v->fieldtx_plane[mb_pos] = get_bits1(&v->s.gb);
fieldtx_is_raw is only set when fcm == ILACE_FRAME
I suspect the intend was it is unset otherwise. This would avoid the extra
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: not available
More information about the ffmpeg-devel