[x264-devel] [PATCH] MPEG2 Program Stream output

Lorenzo Pallara l.pallara at avalpa.com
Wed Jan 26 12:55:29 CET 2011


Kieran Kunhya wrote:
>> Last concern is about the starting time not at zero when
>> --vbv-init
>> is zero, any hints ?
> 
> I thought about it a bit just to make sure there wasn't some magic hrd thing
> that made this possible. But a --vbv-init of zero is meaningless I think because it means you end up decoding a frame from a buffer that is empty.
> 

You got the idea but I don't think is meaningless, let's look at
it the other way around maybe makes more sense:

If the cpb_removal_time of the first frame is not zero it means the
decoder was on something else rather than the decoding of the first
frame as the HRD of the first frame is instantaneous process and the
only way that would be is if the starting buffer is assumed not empty.

In the real life the decoder probably adds to the cpb_removal_time a
fixed offset depending on the frame rate and wait for the frame or some
of it to be completed and/or check the cpb_removal_time when the bytes
of the time stamp enters the buffer, more details on the subject can be
found at 13818-1 Annex D.0.2, it targets DTS and PTS but should apply
in the same way, maybe it will shed some light on this issue.

best regards,
	Lorenzo



More information about the x264-devel mailing list