[FFmpeg-devel] [PATCH 2/5] av1_parser: do not check buf_size if we have size in obu header
James Almer
jamrial at gmail.com
Fri Aug 7 04:27:14 EEST 2020
On 8/6/2020 10:25 PM, Xu, Guangxin wrote:
>
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of James
>> Almer
>> Sent: Friday, August 7, 2020 1:38 AM
>> To: ffmpeg-devel at ffmpeg.org
>> Subject: Re: [FFmpeg-devel] [PATCH 2/5] av1_parser: do not check buf_size if
>> we have size in obu header
>>
>> On 8/6/2020 12:15 PM, Xu, Guangxin wrote:
>>> Hi James,
>>> Thanks for the review.
>>> How about we add a new function in av1dec.c like this:
>>>
>>> static inline int read_obu_header_with_size_flag(const uint8_t *buf, int
>> buf_size,
>>> int64_t *obu_size, int *type); then
>>> we can remove first two patches and check has_size_flag in the function.
>>
>> You mean duplicating the implementation of parse_obu_header() in av1dec.c?
>
> Yes. if we do not duplicate code. it's hard to fix the issue you mentioned.
> Low overhead obu can not foresee the obu size. it need get size from the header.
Alright. Just make sure to add a comment to the relevant function in
av1dec.c explaining why parse_obu_header() is not being used instead.
More information about the ffmpeg-devel
mailing list