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

James Almer jamrial at gmail.com
Sat May 20 20:01:05 EEST 2023


On 5/20/2023 1:59 PM, Andreas Rheinhardt wrote:
> 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?

Much less overhead? One less instance of CBS, less function calls, less 
packet references generated and moved around, etc.

> 2. Anyway, you did not remove the decoder->bsf configure dependency.

Will amend.

> 
> - Andreas
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list