[Ffmpeg-devel] dv encoder speed

Mark Rages markrages
Tue Aug 30 18:36:46 CEST 2005


On 8/29/05, Martin Boehme <boehme at inb.uni-luebeck.de> wrote:
> Mark Rages wrote:
> > As I posted in another message, I need the dv encoder to run a little
> > bit faster so I can do realtime processing on my AMD64 machine.
> [snip]
> > Profiling gives this result:
> > gprof ffmpeg | head
> > Flat profile:
> >
> > Each sample counts as 0.01 seconds.
> >   %   cumulative   self              self     total
> >  time   seconds   seconds    calls   s/call   s/call  name
> >  58.58    127.29   127.29   247050     0.00     0.00  dv_encode_video_segment
> >  11.29    151.83    24.54   190769     0.00     0.00  dv_guess_qnos
> >   7.99    169.19    17.37 10224352     0.00     0.00  dv_decode_ac
> >   5.13    180.33    11.14  6204629     0.00     0.00  ff_fdct_sse2
> >   4.48    190.06     9.73  6457910     0.00     0.00  ff_simple_idct_put_mmx
> >
> > So most of the time is getting spent in dv_encode_video_segment.  No
> > suprise. I need to determine how to get finer-grained profiling data.
> 
> Looks like quite a few functions are getting inlined into
> dv_encode_video_segment(). You could try disabling the inlining, that
> would make the results slightly more coarse-grained.
> 
>  From looking at the comment above dv_encode_video_segment():
> 
> /*
>   * This is a very rough initial implementaion. The performance is
>   * horrible and the weighting is missing. But it's missing from the
>   * decoding step also -- so at least we're on the same page with
> decoder ;-)
>   */
> 
> it looks as if there might be some obvious candidates for optimization
> there (but I haven't looked at the code).
> 
> Martin
> 

Yes, I saw that comment too.  I traced through the code this weekend. 
I didn't see any obvious optimizations.

But I found I could speed things up sufficiently to get realtime performance!

In my initial code, I was printinf a status (with fprintf) on every
frame.  When I commented out the fprintf, I was able to get real time
re-encoding of the DV.  Now I have another problem, which I'll post to
the -user list.

Regards,
Mark
markrages at gmail
-- 
You think that it is a secret, but it never has been one.
  - fortune cookie





More information about the ffmpeg-devel mailing list