Mercurial > libavcodec.hg
comparison wmadata.h @ 4490:0efc832d9102 libavcodec
wma encoder
author | michael |
---|---|
date | Tue, 06 Feb 2007 20:19:04 +0000 |
parents | c8c591fe26f8 |
children | 4394344397d8 |
comparison
equal
deleted
inserted
replaced
4489:27e74573b074 | 4490:0efc832d9102 |
---|---|
48 { 12, 4, 4, 4, 4, 4, 8, 8, 8, 12, 16, 20, 36, }, | 48 { 12, 4, 4, 4, 4, 4, 8, 8, 8, 12, 16, 20, 36, }, |
49 { 15, 4, 8, 4, 8, 8, 4, 8, 8, 12, 12, 12, 24, 28, 40, 76, }, | 49 { 15, 4, 8, 4, 8, 8, 4, 8, 8, 12, 12, 12, 24, 28, 40, 76, }, |
50 { 17, 4, 8, 8, 4, 12, 12, 8, 8, 24, 16, 20, 24, 32, 40, 60, 80, 152, }, | 50 { 17, 4, 8, 8, 4, 12, 12, 8, 8, 24, 16, 20, 24, 32, 40, 60, 80, 152, }, |
51 }; | 51 }; |
52 | 52 |
53 static const uint16_t hgain_huffcodes[37] = { | 53 const uint16_t ff_wma_hgain_huffcodes[37] = { |
54 0x00003, 0x002e7, 0x00001, 0x005cd, 0x0005d, 0x005c9, 0x0005e, 0x00003, | 54 0x00003, 0x002e7, 0x00001, 0x005cd, 0x0005d, 0x005c9, 0x0005e, 0x00003, |
55 0x00016, 0x0000b, 0x00001, 0x00006, 0x00001, 0x00006, 0x00004, 0x00005, | 55 0x00016, 0x0000b, 0x00001, 0x00006, 0x00001, 0x00006, 0x00004, 0x00005, |
56 0x00004, 0x00007, 0x00003, 0x00007, 0x00004, 0x0000a, 0x0000a, 0x00002, | 56 0x00004, 0x00007, 0x00003, 0x00007, 0x00004, 0x0000a, 0x0000a, 0x00002, |
57 0x00003, 0x00000, 0x00005, 0x00002, 0x0005f, 0x00004, 0x00003, 0x00002, | 57 0x00003, 0x00000, 0x00005, 0x00002, 0x0005f, 0x00004, 0x00003, 0x00002, |
58 0x005c8, 0x000b8, 0x005ca, 0x005cb, 0x005cc, | 58 0x005c8, 0x000b8, 0x005ca, 0x005cb, 0x005cc, |
59 }; | 59 }; |
60 | 60 |
61 static const uint8_t hgain_huffbits[37] = { | 61 const uint8_t ff_wma_hgain_huffbits[37] = { |
62 10, 12, 10, 13, 9, 13, 9, 8, | 62 10, 12, 10, 13, 9, 13, 9, 8, |
63 7, 5, 5, 4, 4, 3, 3, 3, | 63 7, 5, 5, 4, 4, 3, 3, 3, |
64 4, 3, 4, 4, 5, 5, 6, 8, | 64 4, 3, 4, 4, 5, 5, 6, 8, |
65 7, 10, 8, 10, 9, 8, 9, 9, | 65 7, 10, 8, 10, 9, 8, 9, 9, |
66 13, 10, 13, 13, 13, | 66 13, 10, 13, 13, 13, |
67 }; | 67 }; |
68 | 68 |
69 static const float lsp_codebook[NB_LSP_COEFS][16] = { | 69 const float ff_wma_lsp_codebook[NB_LSP_COEFS][16] = { |
70 { 1.98732877, 1.97944528, 1.97179088, 1.96260549, 1.95038374, 1.93336114, 1.90719232, 1.86191415, }, | 70 { 1.98732877, 1.97944528, 1.97179088, 1.96260549, 1.95038374, 1.93336114, 1.90719232, 1.86191415, }, |
71 { 1.97260000, 1.96083160, 1.94982586, 1.93806164, 1.92516608, 1.91010199, 1.89232331, 1.87149812, | 71 { 1.97260000, 1.96083160, 1.94982586, 1.93806164, 1.92516608, 1.91010199, 1.89232331, 1.87149812, |
72 1.84564818, 1.81358067, 1.77620070, 1.73265264, 1.67907855, 1.60959081, 1.50829650, 1.33120330, }, | 72 1.84564818, 1.81358067, 1.77620070, 1.73265264, 1.67907855, 1.60959081, 1.50829650, 1.33120330, }, |
73 { 1.90109110, 1.86482426, 1.83419671, 1.80168452, 1.76650116, 1.72816320, 1.68502700, 1.63738256, | 73 { 1.90109110, 1.86482426, 1.83419671, 1.80168452, 1.76650116, 1.72816320, 1.68502700, 1.63738256, |
74 1.58501580, 1.51795181, 1.43679906, 1.33950585, 1.24176208, 1.12260729, 0.96749668, 0.74048265, }, | 74 1.58501580, 1.51795181, 1.43679906, 1.33950585, 1.24176208, 1.12260729, 0.96749668, 0.74048265, }, |
84 -1.10158808, -1.16512566, -1.23337128, -1.30414401, -1.37663312, -1.46853845, -1.57625798, -1.66893638, }, | 84 -1.10158808, -1.16512566, -1.23337128, -1.30414401, -1.37663312, -1.46853845, -1.57625798, -1.66893638, }, |
85 { -0.38601997, -0.56009350, -0.66978483, -0.76028471, -0.83846064, -0.90868087, -0.97408881, -1.03694962, }, | 85 { -0.38601997, -0.56009350, -0.66978483, -0.76028471, -0.83846064, -0.90868087, -0.97408881, -1.03694962, }, |
86 { -1.56144989, -1.65944032, -1.72689685, -1.77857740, -1.82203011, -1.86220079, -1.90283983, -1.94820479, }, | 86 { -1.56144989, -1.65944032, -1.72689685, -1.77857740, -1.82203011, -1.86220079, -1.90283983, -1.94820479, }, |
87 }; | 87 }; |
88 | 88 |
89 static const uint32_t scale_huffcodes[121] = { | 89 const uint32_t ff_wma_scale_huffcodes[121] = { |
90 0x3ffe8, 0x3ffe6, 0x3ffe7, 0x3ffe5, 0x7fff5, 0x7fff1, 0x7ffed, 0x7fff6, | 90 0x3ffe8, 0x3ffe6, 0x3ffe7, 0x3ffe5, 0x7fff5, 0x7fff1, 0x7ffed, 0x7fff6, |
91 0x7ffee, 0x7ffef, 0x7fff0, 0x7fffc, 0x7fffd, 0x7ffff, 0x7fffe, 0x7fff7, | 91 0x7ffee, 0x7ffef, 0x7fff0, 0x7fffc, 0x7fffd, 0x7ffff, 0x7fffe, 0x7fff7, |
92 0x7fff8, 0x7fffb, 0x7fff9, 0x3ffe4, 0x7fffa, 0x3ffe3, 0x1ffef, 0x1fff0, | 92 0x7fff8, 0x7fffb, 0x7fff9, 0x3ffe4, 0x7fffa, 0x3ffe3, 0x1ffef, 0x1fff0, |
93 0x0fff5, 0x1ffee, 0x0fff2, 0x0fff3, 0x0fff4, 0x0fff1, 0x07ff6, 0x07ff7, | 93 0x0fff5, 0x1ffee, 0x0fff2, 0x0fff3, 0x0fff4, 0x0fff1, 0x07ff6, 0x07ff7, |
94 0x03ff9, 0x03ff5, 0x03ff7, 0x03ff3, 0x03ff6, 0x03ff2, 0x01ff7, 0x01ff5, | 94 0x03ff9, 0x03ff5, 0x03ff7, 0x03ff3, 0x03ff6, 0x03ff2, 0x01ff7, 0x01ff5, |
103 0x7ffdf, 0x7ffe7, 0x7ffe8, 0x7ffe9, 0x7ffea, 0x7ffeb, 0x7ffe6, 0x7ffe0, | 103 0x7ffdf, 0x7ffe7, 0x7ffe8, 0x7ffe9, 0x7ffea, 0x7ffeb, 0x7ffe6, 0x7ffe0, |
104 0x7ffe1, 0x7ffe2, 0x7ffe3, 0x7ffe4, 0x7ffe5, 0x7ffd7, 0x7ffec, 0x7fff4, | 104 0x7ffe1, 0x7ffe2, 0x7ffe3, 0x7ffe4, 0x7ffe5, 0x7ffd7, 0x7ffec, 0x7fff4, |
105 0x7fff3, | 105 0x7fff3, |
106 }; | 106 }; |
107 | 107 |
108 static const uint8_t scale_huffbits[121] = { | 108 const uint8_t ff_wma_scale_huffbits[121] = { |
109 18, 18, 18, 18, 19, 19, 19, 19, | 109 18, 18, 18, 18, 19, 19, 19, 19, |
110 19, 19, 19, 19, 19, 19, 19, 19, | 110 19, 19, 19, 19, 19, 19, 19, 19, |
111 19, 19, 19, 18, 19, 18, 17, 17, | 111 19, 19, 19, 18, 19, 18, 17, 17, |
112 16, 17, 16, 16, 16, 16, 15, 15, | 112 16, 17, 16, 16, 16, 16, 15, 15, |
113 14, 14, 14, 14, 14, 14, 13, 13, | 113 14, 14, 14, 14, 14, 14, 13, 13, |
1411 1, 1, 1, 1, 1, 1, 1, 1, | 1411 1, 1, 1, 1, 1, 1, 1, 1, |
1412 }; | 1412 }; |
1413 | 1413 |
1414 static const CoefVLCTable coef_vlcs[6] = { | 1414 static const CoefVLCTable coef_vlcs[6] = { |
1415 { | 1415 { |
1416 sizeof(coef0_huffbits), coef0_huffcodes, coef0_huffbits, levels0, | 1416 sizeof(coef0_huffbits), sizeof(levels0)/2, coef0_huffcodes, coef0_huffbits, levels0, |
1417 }, | 1417 }, |
1418 { | 1418 { |
1419 sizeof(coef1_huffbits), coef1_huffcodes, coef1_huffbits, levels1, | 1419 sizeof(coef1_huffbits), sizeof(levels1)/2, coef1_huffcodes, coef1_huffbits, levels1, |
1420 }, | 1420 }, |
1421 { | 1421 { |
1422 sizeof(coef2_huffbits), coef2_huffcodes, coef2_huffbits, levels2, | 1422 sizeof(coef2_huffbits), sizeof(levels2)/2, coef2_huffcodes, coef2_huffbits, levels2, |
1423 }, | 1423 }, |
1424 { | 1424 { |
1425 sizeof(coef3_huffbits), coef3_huffcodes, coef3_huffbits, levels3, | 1425 sizeof(coef3_huffbits), sizeof(levels3)/2, coef3_huffcodes, coef3_huffbits, levels3, |
1426 }, | 1426 }, |
1427 { | 1427 { |
1428 sizeof(coef4_huffbits), coef4_huffcodes, coef4_huffbits, levels4, | 1428 sizeof(coef4_huffbits), sizeof(levels4)/2, coef4_huffcodes, coef4_huffbits, levels4, |
1429 }, | 1429 }, |
1430 { | 1430 { |
1431 sizeof(coef5_huffbits), coef5_huffcodes, coef5_huffbits, levels5, | 1431 sizeof(coef5_huffbits), sizeof(levels5)/2, coef5_huffcodes, coef5_huffbits, levels5, |
1432 }, | 1432 }, |
1433 }; | 1433 }; |