[Ffmpeg-devel] [PATCH] add fps stats
Michael Niedermayer
michaelni
Wed Mar 14 19:10:33 CET 2007
Hi
On Wed, Mar 14, 2007 at 07:12:19PM +0100, Baptiste Coudurier wrote:
> Hi
>
> Limin Wang wrote:
> > Hi,
> >
> >
> > The patch try to add fps stats for ffmpeg, then I don't need to
> > time ffmpeg and calculate the fps every time. Please review it.
> >
> >
> > Thanks,
> > Limin
> >
> >
> > ------------------------------------------------------------------------
> >
> > Index: ffmpeg.c
> > ===================================================================
> > --- ffmpeg.c (revision 8396)
> > +++ ffmpeg.c (working copy)
> > @@ -205,6 +205,7 @@
> > int opt_name_count=0;
> > AVCodecContext *avctx_opts[CODEC_TYPE_NB];
> > AVFormatContext *avformat_opts;
> > +static int64_t timer_start = 0;
> >
> > static AVBitStreamFilterContext *video_bitstream_filters=NULL;
> > static AVBitStreamFilterContext *audio_bitstream_filters=NULL;
> > @@ -925,9 +926,14 @@
> > enc->coded_frame->quality/(float)FF_QP2LAMBDA);
> > }
> > if (!vid && enc->codec_type == CODEC_TYPE_VIDEO) {
> > + float t;
> > +
> > + t = (av_gettime()-timer_start) / 1000000.0;
> > +
>
> maybe float t = (av_gettime()-timer_start) / 1000000.0;
indeed, looks better ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070314/184023d3/attachment.pgp>
More information about the ffmpeg-devel
mailing list