[FFmpeg-devel] [PATCH/RFC] H.264 FMO+ASO decoding

Stefan Gehrer stefan.gehrer
Thu Jul 22 19:52:46 CEST 2010


On 07/22/2010 07:19 PM, Reimar D?ffinger wrote:
> On Thu, Jul 22, 2010 at 12:50:22AM +0200, Stefan Gehrer wrote:
>> On 07/22/2010 12:32 AM, Reimar D?ffinger wrote:
>>> On Wed, Jul 21, 2010 at 10:20:36PM +0200, Stefan Gehrer wrote:
>>>> Unfortunately, the real challenge starts here.
>>>
>>> I suspect it starts earlier. Have you checked the parser?
>>> Because I think it won't be able to properly split things into
>>> access units if FMO is used.
>>
>> I can't see a problem there. IMHO the criteria of when a new
>> access unit starts does not change with FMO or ASO and the parser
>> correctly ignores the first_mb_in_slice value.
>
> Huh?
> There is this in the H.264 parser:
>              if(buf[i]&  0x80)
>                  goto found;
> which IIRC is basically "if (first_mb_in_slice == 0)"...
> So it will split on whichever slice starts with MB 0.

Now that you say it ... that part of code could use some explanation
of what it does.
So, you are right. The stream I had just happened to start with the
first slice and later slices were shuffled.
I just wonder if there is an half-easy way out. I guess the parser 
interpreting at least frame_num and bottom_field_flag is required
to come closer to implementing sub-clause 7.4.1.2.4 of the spec[1].
That in turn requires the SPS to be decoded for the find_frame_end
to work ...

Stefan

[1]http://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-H.264-201003-I!!PDF-E&type=items



More information about the ffmpeg-devel mailing list