[FFmpeg-devel] [PATCH 1/5] avcodec/vc1: FIELDTX is only coded raw in interlaced frame I pictures

Michael Niedermayer 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
> file.
> 
>  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[1][s->block_index[0] + v->blocks_off][1] = 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
check

[...]
-- 
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...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180520/f963941c/attachment.sig>


More information about the ffmpeg-devel mailing list