[FFmpeg-devel] [PATCH 2/2] avformat: Do not search through the AVOption table for a option not in it repeatedly on each packet

Michael Niedermayer michael at niedermayer.cc
Sat Mar 26 16:14:31 EET 2022


On Sat, Mar 26, 2022 at 12:06:50AM +0100, Michael Niedermayer wrote:
> This search takes alot of time especially when compared with small packets
> 
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>  libavformat/demux.c    | 15 +++++++++------
>  libavformat/internal.h |  5 +++++
>  2 files changed, 14 insertions(+), 6 deletions(-)

with amr-nb in 3gp this changes 
./ffmpeg -i matrixbench_mpeg2.mpg -ar 8000 -ac 1 -acodec amr_nb -ab 4.75k -vn test.3gp
./ffmpeg -i test.3gp -f null -

46631 decicycles in read_frame_internal,    8191 runs,      1 skips
to
15719 decicycles in read_frame_internal,    8188 runs,      4 skips

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
"Used only once"    - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20220326/5fac45d6/attachment.sig>


More information about the ffmpeg-devel mailing list