summaryrefslogtreecommitdiff
path: root/apps/codecs/libcook/cookdata.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libcook/cookdata.h')
-rw-r--r--apps/codecs/libcook/cookdata.h82
1 files changed, 6 insertions, 76 deletions
diff --git a/apps/codecs/libcook/cookdata.h b/apps/codecs/libcook/cookdata.h
index e2e81fbab6..a73b96c5f5 100644
--- a/apps/codecs/libcook/cookdata.h
+++ b/apps/codecs/libcook/cookdata.h
@@ -18,38 +18,20 @@
18 * You should have received a copy of the GNU Lesser General Public 18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software 19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 *
21 */ 22 */
22 23
23/** 24/**
24 * @file libavcodec/cookdata.h 25 * @file cookdata.h
25 * Cook AKA RealAudio G2 compatible decoderdata 26 * Cook AKA RealAudio G2 compatible decoderdata
26 */ 27 */
27 28
28#ifndef AVCODEC_COOKDATA_H
29#define AVCODEC_COOKDATA_H
30
31#include <stdint.h>
32
33/* various data tables */ 29/* various data tables */
34 30
35static const int expbits_tab[8] = { 31static const int expbits_tab[8] = {
36 52,47,43,37,29,22,16,0, 32 52,47,43,37,29,22,16,0,
37}; 33};
38 34
39static const float dither_tab[8] = {
40 0.0, 0.0, 0.0, 0.0, 0.0, 0.176777, 0.25, 0.707107,
41};
42
43static const float quant_centroid_tab[7][14] = {
44 { 0.000, 0.392, 0.761, 1.120, 1.477, 1.832, 2.183, 2.541, 2.893, 3.245, 3.598, 3.942, 4.288, 4.724 },
45 { 0.000, 0.544, 1.060, 1.563, 2.068, 2.571, 3.072, 3.562, 4.070, 4.620, 0.000, 0.000, 0.000, 0.000 },
46 { 0.000, 0.746, 1.464, 2.180, 2.882, 3.584, 4.316, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 },
47 { 0.000, 1.006, 2.000, 2.993, 3.985, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 },
48 { 0.000, 1.321, 2.703, 3.983, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 },
49 { 0.000, 1.657, 3.491, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 },
50 { 0.000, 1.964, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 }
51};
52
53static const int invradix_tab[7] = { 35static const int invradix_tab[7] = {
54 74899, 104858, 149797, 209716, 262144, 349526, 524288, 36 74899, 104858, 149797, 209716, 262144, 349526, 524288,
55}; 37};
@@ -422,12 +404,12 @@ static const uint16_t cvh_huffcodes6[32] = {
422 0x003c,0x01fc,0x00fb,0x03fd,0x00fc,0x03fe,0x01fd,0x07ff, 404 0x003c,0x01fc,0x00fb,0x03fd,0x00fc,0x03fe,0x01fd,0x07ff,
423}; 405};
424 406
425static const uint16_t* const cvh_huffcodes[7] = { 407static const uint16_t* cvh_huffcodes[7] = {
426 cvh_huffcodes0, cvh_huffcodes1, cvh_huffcodes2, cvh_huffcodes3, 408 cvh_huffcodes0, cvh_huffcodes1, cvh_huffcodes2, cvh_huffcodes3,
427 cvh_huffcodes4, cvh_huffcodes5, cvh_huffcodes6, 409 cvh_huffcodes4, cvh_huffcodes5, cvh_huffcodes6,
428}; 410};
429 411
430static const uint8_t* const cvh_huffbits[7] = { 412static const uint8_t* cvh_huffbits[7] = {
431 cvh_huffbits0, cvh_huffbits1, cvh_huffbits2, cvh_huffbits3, 413 cvh_huffbits0, cvh_huffbits1, cvh_huffbits2, cvh_huffbits3,
432 cvh_huffbits4, cvh_huffbits5, cvh_huffbits6, 414 cvh_huffbits4, cvh_huffbits5, cvh_huffbits6,
433}; 415};
@@ -488,12 +470,12 @@ static const uint8_t ccpl_huffbits6[63] = {
488 14,14,16, 470 14,14,16,
489}; 471};
490 472
491static const uint16_t* const ccpl_huffcodes[5] = { 473static const uint16_t* ccpl_huffcodes[5] = {
492 ccpl_huffcodes2,ccpl_huffcodes3, 474 ccpl_huffcodes2,ccpl_huffcodes3,
493 ccpl_huffcodes4,ccpl_huffcodes5,ccpl_huffcodes6 475 ccpl_huffcodes4,ccpl_huffcodes5,ccpl_huffcodes6
494}; 476};
495 477
496static const uint8_t* const ccpl_huffbits[5] = { 478static const uint8_t* ccpl_huffbits[5] = {
497 ccpl_huffbits2,ccpl_huffbits3, 479 ccpl_huffbits2,ccpl_huffbits3,
498 ccpl_huffbits4,ccpl_huffbits5,ccpl_huffbits6 480 ccpl_huffbits4,ccpl_huffbits5,ccpl_huffbits6
499}; 481};
@@ -509,55 +491,3 @@ static const int cplband[51] = {
509 18,18,19,19,19,19,19,19,19,19, 491 18,18,19,19,19,19,19,19,19,19,
510 19, 492 19,
511}; 493};
512
513static const float cplscale2[3] = {
5140.953020632266998,0.70710676908493,0.302905440330505,
515};
516
517static const float cplscale3[7] = {
5180.981279790401459,0.936997592449188,0.875934481620789,0.70710676908493,
5190.482430040836334,0.349335819482803,0.192587479948997,
520};
521
522static const float cplscale4[15] = {
5230.991486728191376,0.973249018192291,0.953020632266998,0.930133521556854,
5240.903453230857849,0.870746195316315,0.826180458068848,0.70710676908493,
5250.563405573368073,0.491732746362686,0.428686618804932,0.367221474647522,
5260.302905440330505,0.229752898216248,0.130207896232605,
527};
528
529static const float cplscale5[31] = {
5300.995926380157471,0.987517595291138,0.978726446628571,0.969505727291107,
5310.95979779958725,0.949531257152557,0.938616216182709,0.926936149597168,
5320.914336204528809,0.900602877140045,0.885426938533783,0.868331849575043,
5330.84851086139679,0.824381768703461,0.791833400726318,0.70710676908493,
5340.610737144947052,0.566034197807312,0.529177963733673,0.495983630418777,
5350.464778542518616,0.434642940759659,0.404955863952637,0.375219136476517,
5360.344963222742081,0.313672333955765,0.280692428350449,0.245068684220314,
5370.205169528722763,0.157508864998817,0.0901700109243393,
538};
539
540static const float cplscale6[63] = {
5410.998005926609039,0.993956744670868,0.989822506904602,0.985598564147949,
5420.981279790401459,0.976860702037811,0.972335040569305,0.967696130275726,
5430.962936460971832,0.958047747612000,0.953020632266998,0.947844684123993,
5440.942508161067963,0.936997592449188,0.931297719478607,0.925390899181366,
5450.919256627559662,0.912870943546295,0.906205296516418,0.899225592613220,
5460.891890347003937,0.884148240089417,0.875934481620789,0.867165684700012,
5470.857730865478516,0.847477376461029,0.836184680461884,0.823513329029083,
5480.808890223503113,0.791194140911102,0.767520070075989,0.707106769084930,
5490.641024887561798,0.611565053462982,0.587959706783295,0.567296981811523,
5500.548448026180267,0.530831515789032,0.514098942279816,0.498019754886627,
5510.482430040836334,0.467206478118896,0.452251672744751,0.437485188245773,
5520.422837972640991,0.408248275518417,0.393658757209778,0.379014074802399,
5530.364258885383606,0.349335819482803,0.334183186292648,0.318732559680939,
5540.302905440330505,0.286608695983887,0.269728302955627,0.252119421958923,
5550.233590632677078,0.213876649737358,0.192587479948997,0.169101938605309,
5560.142307326197624,0.109772264957428,0.0631198287010193,
557};
558
559static const float* const cplscales[5] = {
560 cplscale2, cplscale3, cplscale4, cplscale5, cplscale6,
561};
562
563#endif /* AVCODEC_COOKDATA_H */