[FFmpeg-devel] [PATCH 33/39] lavc: convert frame threading to the receive_frame() pattern

Michael Niedermayer michael at niedermayer.cc
Wed Jul 24 21:44:50 EEST 2024


On Tue, Jul 16, 2024 at 07:11:48PM +0200, Anton Khirnov wrote:
> Reorganize the code such that the frame threading code does not call the
> decoders directly, but instead calls back into the generic decoding
> code. This avoids duplicating the logic that wraps the decoder
> invocation and allows receive_frame()-based decoders to use frame
> threading.
> 
> Further work by Timo Rothenpieler <timo at rothenpieler.org>.
> ---
>  libavcodec/avcodec.c          |   9 +-
>  libavcodec/avcodec_internal.h |  25 +--
>  libavcodec/decode.c           |  40 +++--
>  libavcodec/internal.h         |   7 +
>  libavcodec/pthread_frame.c    | 278 +++++++++++++++++++++-------------
>  5 files changed, 235 insertions(+), 124 deletions(-)

this (frm your recive_frame branch) breaks:

for i in `seq 10` ; do ./ffmpeg -v 0  -i ffv1.3-01ec.avi -t 1 -f crc - ; done
CRC=0xf0227bce
CRC=0xf0227bce
CRC=0xb40076a4
CRC=0xf0227bce
CRC=0xf0227bce
CRC=0xf0227bce
CRC=0xf0227bce
CRC=0xf0227bce
CRC=0xb40076a4
CRC=0x6f1fc654

before:
make -j32 && for i in `seq 10` ; do ./ffmpeg -v 0  -i ffv1.3-01ec.avi -t 1 -f crc - ; done
CRC=0xc2cd3350
CRC=0xc2cd3350
CRC=0xc2cd3350
CRC=0xc2cd3350
CRC=0xc2cd3350
CRC=0xc2cd3350
CRC=0xc2cd3350
CRC=0xc2cd3350
CRC=0xc2cd3350
CRC=0xc2cd3350


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

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- 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/20240724/1083adbb/attachment.sig>


More information about the ffmpeg-devel mailing list