[FFmpeg-devel] [RFC/PATCH] bitpacked_dec: Optimization for bitpacked_dec decoder performance

Devin Heitmueller devin.heitmueller at ltnglobal.com
Sat May 6 14:49:35 EEST 2023


Hi Lance,

On Sat, May 6, 2023 at 7:32 AM Lance Wang <lance.lmwang at gmail.com> wrote:
> FYI, on my development system, I run two time for the original and modified
> version and no obvious difference:

Simply running "time" against the binary isn't an accurate way to
measure a 60ms difference for a single frame being processed.  For any
such execution of ffmpeg the bulk of the time is spent loading the
application and in this case loading the 20MB file from disk into
memory.

In my case I added instrumentation to the decoder to measure how much
time it took to perform the actual decode operation.  I discarded the
patch already since it was like six lines of code and I did the work
several weeks ago, but if there is really a dispute about the
performance benefit I can obviously recreate it (as can anyone who
wants to benchmark it themselves).  You would just have to insert a
couple of calls to gettimeofday() in libavcodec/bitpacked_dec.c before
and after the decoding operation.

This is one of those cases where you won't notice the performance
difference doing any operation once, but it becomes important when
you're processing a live RTP stream of 2160p59 video at 10.4 Gbps.

Devin

-- 
Devin Heitmueller, Senior Software Engineer
LTN Global Communications
o: +1 (301) 363-1001
w: https://ltnglobal.com  e: devin.heitmueller at ltnglobal.com


More information about the ffmpeg-devel mailing list