[Ffmpeg-devel] dv encoder speed

Mark Rages markrages
Sat Aug 27 19:15:56 CEST 2005


OK,

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.

My test setup is using ffmpeg, without shared libav* libs. I took the
file "pond.dv" from libdv's site, and used ffmpeg to convert the audio
to 48000 samples/sec.  This file is my source file. (I also tried with
a file generated by a modified output_example.  But this file was
re-encoded about 30% faster than pond.dv.  So, I think it is not a
good source to use for time measurement.)

The command I am testing with is "ffmpeg -y -i source.dv dest.dv".  I
tried using output_example, after modifying it to give a similar file
to pond.dv.

So far I have tried compiler tricks like:
 - Adding flag -march=athlon64.  This gains a tiny speec increase.  
 - Compiling with GCC 4.0.1.   I read somewhere that it makes better
code for x86_64.  Not by my results!  It is about 0.1% slower.
 - Experimenting with a lot of the -f* optimization flags.  None give
a faster result than standard -O3.

Clearly, any speed increase is not going to come from stupid compiler tricks.

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.

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