[FFmpeg-devel] GoC 2008 and H264 SVC decoder

Thorsten Jordan tjordan
Wed Mar 26 08:44:45 CET 2008


Michael Niedermayer schrieb:
> On Tue, Mar 25, 2008 at 06:03:22PM +0200, Robert Marston wrote:
>> Michael Niedermayer wrote:
>>> Well strictly we have a AVParser for h.264 it just doesnt fix the timestamps.
>>> And yes it would be usefull, h264 in mpeg-ps/ts needs it, currently it
>>> produces random timestamps from the user apps point of view though
>> I would like to attempt the AVParser for h.264 as one of the 
>> qualification tasks but I am afraid I am unfamiliar with how FFMPEG 
>> parsing works. I fear I may be barking up the wrong tree here so perhaps 
>> someone can point me in the right direction. I believe 
>> libavcodec/h264_parser.c is responsible for finding an H.264 frame and 
>> libavcodec/parser.h is the base for all parsers implemented? If this is 
>> the case I am not sure where exactly or how the time stamps are being 
>> set randomly?
> 
> Well starting from "outside", there is 
> 
> av_read_frame_internal() which is called to read the next frame
[...]
> PS: the timestamps are in AVCodecParserContext which is accessible from
> the parser. If this is insufficient the API for parser_parse() or other
> functions could be changed.
one open topic here, if i didn't miss the answer yet, must two
complementary fields of a frame come in consecutive order directly one
after the another? This may not be the case if each field can be an
independent reference source and when b-frames (or fields) are used as
reference (the evil PAFF/h264 stuff).

IF that would be the case, grouping fields to frames in the parser can
only be done by reordering the elementary stream and this would mean
some kind of buffering. - Alternative: leave fields as they are and
compute timestamps also for fields.

-- 
Regards, Thorsten




More information about the ffmpeg-devel mailing list