lundi 16 juillet 2007

MPlayer H.264 profiling (continue ...)

Read the previous article

So the MPlayer H.264 first candidate function for HW acceleration (i.e.: the most time consuming procedure) is decode_residual (in libavcodec/h264.c part of FFmpeg). [geeknote: I use emacs with etags to browse and jump to source code].

Well, after analyzing the source code of this function, I've seen that there is in it a lots of inline procedures call. So these inline procedures are more likely the code parts to be HW accelerated but the profiling did not count the time consumed in theses procedures since there are inlined. Let's go further in the profiling using some more gcc compiling options
i.e.: --fno-inline.
sed s/OPTFLAGS.*/"& -pg -fno-inline"/ config.mak > tmp
mv tmp config.mak
make clean && make && make install
we run mplayer on the "1408" movie trailer and then analyze the profiling.



before removing inlining we had no detail of the decode_residual subfunctions.



after, there is more details:




Profiling extract of the "Ducaty" trailer decompression (without inlined function).

Finally, it seems the inlined procedures does not represent so much of the decode_residual function. For the "1408" movie trailer, the total execution time of decode_residual calls is 8.19 s within 2.10 s in the de-inlined functions.
For the "Ducaty" trailer the the total execution time of decode_residual calls is 2.2 s, within 1.1 s in the de-inlined functions.

Aucun commentaire: