X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fcookdata.h;h=714ba1e76d20e7858a7f691717a2889126305f3e;hb=29a8ed766354c45c9be4b8512c5b2eb25a450cdc;hp=c86577c6b7dff6c289e9bee42d26fedf35a54510;hpb=cf2baeb3382283d41eac7886ea831f52262971ba;p=ffmpeg diff --git a/libavcodec/cookdata.h b/libavcodec/cookdata.h index c86577c6b7d..714ba1e76d2 100644 --- a/libavcodec/cookdata.h +++ b/libavcodec/cookdata.h @@ -3,30 +3,30 @@ * Copyright (c) 2003 Sascha Sommer * Copyright (c) 2005 Benjamin Larsson * - * This file is part of FFmpeg. + * This file is part of Libav. * - * FFmpeg is free software; you can redistribute it and/or + * Libav is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * FFmpeg is distributed in the hope that it will be useful, + * Libav is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software + * License along with Libav; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** - * @file cookdata.h - * Cook AKA RealAudio G2 compatible decoderdata + * @file + * Cook AKA RealAudio G2 compatible decoder data */ -#ifndef FFMPEG_COOKDATA_H -#define FFMPEG_COOKDATA_H +#ifndef AVCODEC_COOKDATA_H +#define AVCODEC_COOKDATA_H #include @@ -36,8 +36,8 @@ static const int expbits_tab[8] = { 52,47,43,37,29,22,16,0, }; -static const float dither_tab[8] = { - 0.0, 0.0, 0.0, 0.0, 0.0, 0.176777, 0.25, 0.707107, +static const float dither_tab[9] = { + 0.0, 0.0, 0.0, 0.0, 0.0, 0.176777, 0.25, 0.707107, 1.0 }; static const float quant_centroid_tab[7][14] = { @@ -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<