X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fcookdata.h;h=c4c26fae5f8b455c6aa1a9087bcdf8d6c6a0200d;hb=5707af8d0b9c5a7e8a742a11798e406f99d78cea;hp=c86577c6b7dff6c289e9bee42d26fedf35a54510;hpb=cf2baeb3382283d41eac7886ea831f52262971ba;p=ffmpeg diff --git a/libavcodec/cookdata.h b/libavcodec/cookdata.h index c86577c6b7d..c4c26fae5f8 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 + * @file * Cook AKA RealAudio G2 compatible decoderdata */ -#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<