[FFmpeg-devel] [PATCH v2] avcodec/av1dec: convert to receive_frame()

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sat May 20 19:59:01 EEST 2023


James Almer:
> On 5/20/2023 1:12 PM, Anton Khirnov wrote:
>> Quoting James Almer (2023-05-20 03:50:57)
>>> Signed-off-by: James Almer <jamrial at gmail.com>
>>> ---
>>>   libavcodec/av1dec.c | 75 +++++++++++++++++++++++++++++++++------------
>>>   libavcodec/av1dec.h |  4 +++
>>>   2 files changed, 60 insertions(+), 19 deletions(-)
>>
>> The patch makes the code longer and introduces an evil backward goto.
>> So some comment on why is this an improvement would be appropriate.
> 
> It's an improvement because it removes the auto-inserted av1_frame_split
> from the process, making the decoder handle temporal units with more
> than one frame in them on its own. I can add that to the commit message.
> 
> The extra code is inevitable because it's the decoder who now needs to
> fetch the packet instead of the generic code in decode.c

1. Where is the improvement in that? What is so bad about using a BSF to
preprocess packets in this way?
2. Anyway, you did not remove the decoder->bsf configure dependency.

- Andreas



More information about the ffmpeg-devel mailing list