[FFmpeg-devel] [PATCH] Pass VBV delay to the calling application via ctx

Christophe Massiot cmassiot
Tue Feb 8 15:39:29 CET 2011


On Tue, Feb 08, 2011, M?ns Rullg?rd wrote:

> > +    /**
> > +     * VBV delay coded in the last frame (in seconds).
> > +     * Used for compliant TS muxing.
> > +     * - encoding: Set by libavcodec.
> > +     * - decoding: unused.
> > +     */
> > +    double vbv_delay;
> 
> I don't like floating-point.  Could this be expressed in some other
> units instead?

Sure but I have difficulties choosing one. MPEG has two natural clock
frequencies : 90 kHz and 27 MHz. VBV delay in MPEG-1/2 is actually based
on the 90 kHz clock.

However, probably other codecs have other clocks, maybe more precise
than 90 kHz, so if we want to generalize this principle we need a more
generic clock source. VLC would be perfectly happy with microseconds but
you could equally choose nanoseconds or anything else that fits in an
integer...

x264 solved this dilemma by using "double". Not sure whether 27 MHz
would be acceptable for other codecs. Opinions welcomed here...

-- 
Christophe Massiot.



More information about the ffmpeg-devel mailing list