cbs_av1: Fix reading of overlong uvlc codes
authorMark Thompson <sw@jkqxz.net>
Sun, 2 Dec 2018 20:49:24 +0000 (20:49 +0000)
committerMark Thompson <sw@jkqxz.net>
Sat, 22 Dec 2018 18:28:41 +0000 (18:28 +0000)
commitb420f23566825192c3fc1f46fce24d19ffc1d72e
tree0a756f03f0dd3c098b7157ab84df9bfad39a3d62
parent5356e610010a25809e6e43146b813056a8929804
cbs_av1: Fix reading of overlong uvlc codes

The specification allows 2^32-1 to be encoded as any number of zeroes
greater than 31, followed by a one.  This previously failed because the
trace code would overflow the array containing the string representation
of the bits if there were more than 63 zeroes.  Fix that by splitting the
trace output into batches, and at the same time move it out of the default
path.

(While this seems likely to be a specification error, libaom does support
it so we probably should as well.)

From a test case by keval shah <skeval65@gmail.com>.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b97a4b658814b2de8b9f2a3bce491c002d34de31)
libavcodec/cbs_av1.c