[FFmpeg-devel] [PATCH] Enable PAFF decoding
Loren Merritt
lorenm
Wed Oct 10 19:52:54 CEST 2007
On Wed, 10 Oct 2007, Jeff Downs wrote:
> On Wed, 10 Oct 2007, Neil Brown wrote:
>
>> 3/ I'm getting the error message:
>> [h264 @ 0xa638a0]MBAFF + spatial direct mode is not implemented
>>
>> a lot. As the file doesn't use MBAFF (only PAFF) I suspect this is
>> wrong.
>>
>> Maybe this patch is correct?
>>
>> Thanks,
>>
>> NeilBrown
>>
>> ---
>> libavcodec/h264.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- ffmpeg.orig/libavcodec/h264.c
>> +++ ffmpeg/libavcodec/h264.c
>> @@ -4396,7 +4396,7 @@ static int decode_slice_header(H264Conte
>> if(h->slice_type == P_TYPE || h->slice_type == SP_TYPE || h->slice_type == B_TYPE){
>> if(h->slice_type == B_TYPE){
>> h->direct_spatial_mv_pred= get_bits1(&s->gb);
>> - if(h->sps.mb_aff && h->direct_spatial_mv_pred)
>> + if(h->mb_aff_frame && h->direct_spatial_mv_pred)
>> av_log(h->s.avctx, AV_LOG_ERROR, "MBAFF + spatial direct mode is not implemented\n");
>> }
>> num_ref_idx_active_override_flag= get_bits1(&s->gb);
>
>
> Looks right to me. This was actually in my orignal PAFF patch (I think
> taken from your priliminary PAFF patch of long ago) because I do get
> similar errors. I pulled it out during the splitting process.
>
> The problem is that the SPS has to include the MBAFF flag for any
> interlaced sequence (including PAFF). But for a PAFF frame, its value is
> meaningless; an encoder could freely set it either way. mb_aff_frame is
> the correct flag to test.
PAFF + spatial direct isn't implemented either.
--Loren Merritt
More information about the ffmpeg-devel
mailing list