[FFmpeg-devel] [RFC][PATCH] ticks_per_frame / timebase

Michael Niedermayer michaelni
Thu Feb 26 16:50:52 CET 2009


On Thu, Feb 26, 2009 at 03:37:53PM +0100, Reimar D?ffinger wrote:
> On Thu, Feb 26, 2009 at 03:15:09PM +0100, Michael Niedermayer wrote:
> > @@ -2322,6 +2322,15 @@
> >       * - decoding: Set by libavcodec
> >       */
> >      struct AVHWAccel *hwaccel;
> > +
> > +    /**
> > +     * For some codecs, the time base is closer to the field rate than the frame rate.
> > +     * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration
> > +     * if no telecine is used ...
> > +     *
> > +     * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
> > +     */
> 
> Maybe it would be good to note e.g. what differentiates r_frame_rate from
> time_base / ticks_per_frame

r_frame_rate is from libavformat and is our best guess at a minimal timebase
in which all frame durations can be represented.

time_base is the unit in which timestamps / durations are represented 
(there are 2 of that, one for lavc & one for lavf)

ticks_per_frame is the factor between the codec time_base and the frame_rate
as defined by mpeg2. It is generally not possible to represent frame durations
or frame timestamps in this unit.
This though happens to be a good guess at the frame duration for a random
frame if no better information is available

iam not sure how i should change the doxy, suggestion welcome


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090226/035f33de/attachment.pgp>



More information about the ffmpeg-devel mailing list