From 37cc8600d0313838cab5b886b9d373e5819aa24f Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Tue, 6 Mar 2012 13:45:32 -0800 Subject: cook: extend channel uncoupling tables so the full bit range is covered. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org --- libavcodec/cookdata.h | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'libavcodec/cookdata.h') diff --git a/libavcodec/cookdata.h b/libavcodec/cookdata.h index e8d6ebfcb3..126010a985 100644 --- a/libavcodec/cookdata.h +++ b/libavcodec/cookdata.h @@ -510,23 +510,37 @@ static const int cplband[51] = { 19, }; -static const float cplscale2[3] = { +// The 1 and 0 at the beginning/end are to prevent overflows with +// bitstream-read indexes. E.g. if n_bits=5, we can access any +// index from [1, (1<