[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 14:08:01 EEST 2018


On Sun, May 20, 2018 at 10:56:19AM +0200, Jerome Borsboom wrote:
> >>  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
> 
> I think this may be a design decision. You can either set the decoding
> context, 'v' in this case, to a sane default or only use syntax elements
> where appropriate. The current state of the bitstream decoder for VC-1
> is not very clean in this regard. But it does certainly not reset the
> decoding context for each frame and even depends on this behaviour for
> at least one case.
> 
> While I think it may be better to reset the decoding context to sane
> defaults for each frame for the applicable variables, for now, I would
> like to propose to leave the bitstream decoder as is and use this patch.
> Currently, I am focusing on compliance to the VC-1 spec and a cleanup of
> the bitstream decoder may be something down the road.

you are the one working on this so its clearly up to you to decide these
things.
Personally i would not leave fieldtx_plane at non zero value if that mode
is not enabled


> 
> A trac issue might be appropriate to remember this issue, 

yes


> although the
> decoder in general could use a good cleanup.

yes

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- 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/d4f1b8c5/attachment.sig>


More information about the ffmpeg-devel mailing list