[FFmpeg-devel] [PATCH] cbs_av1: Reject thirty-two zero bits in uvlc code
Mark Thompson
sw at jkqxz.net
Mon Nov 27 15:08:43 EET 2023
On 25/10/2023 21:55, Michael Niedermayer wrote:
> On Sun, Oct 22, 2023 at 07:35:52PM +0100, Mark Thompson wrote:
>> The spec allows at least thirty-two zero bits followed by a one to mean
>> 2^32-1, with no constraint on the number of zeroes. The libaom
>> reference decoder does not match this, instead reading thirty-two zeroes
>> but not the following one to mean 2^32-1. These two interpretations are
>> incompatible and other implementations may follow one or the other.
>> Therefore reject thirty-two zeroes because the intended behaviour is not
>> clear.
>> ---
>> libaom, dav1d and SVT-AV1 all have the same nonstandard behaviour of stopping at thirty-two zeroes and not reading the one. gav1 just rejects thirty-two zeroes.
>
> I would suggest to contact the authors of the spec to bring this discrepancy
> to their attention, unless this is already known and
> unless this sequence is declared invalid by some other part of the spec
> (which would make the discrepancy only occur in invalid sequences)
<https://github.com/AOMediaCodec/av1-spec/pull/343>
Since this only occurs in nonconforming streams, fixing the spec seems like the better option.
Thanks,
- Mark
More information about the ffmpeg-devel
mailing list