comparison vp3data.h @ 2024:f65d87bfdd5a libavcodec

some of the warning fixes by (Michael Roitzsch <mroi at users dot sourceforge dot net>)
author michael
date Tue, 18 May 2004 17:09:46 +0000
parents 7f7aa6ac3723
children eed7d92a1dfc
comparison
equal deleted inserted replaced
2023:50e92cec1b84 2024:f65d87bfdd5a
1 #ifndef VP3DATA_H 1 #ifndef VP3DATA_H
2 #define VP3DATA_H 2 #define VP3DATA_H
3 3
4 /* these coefficients dequantize intraframe Y plane coefficients 4 /* these coefficients dequantize intraframe Y plane coefficients
5 * (note: same as JPEG) */ 5 * (note: same as JPEG) */
6 static int16_t vp31_intra_y_dequant[64] = 6 static const int16_t vp31_intra_y_dequant[64] =
7 { 16, 11, 10, 16, 24, 40, 51, 61, 7 { 16, 11, 10, 16, 24, 40, 51, 61,
8 12, 12, 14, 19, 26, 58, 60, 55, 8 12, 12, 14, 19, 26, 58, 60, 55,
9 14, 13, 16, 24, 40, 57, 69, 56, 9 14, 13, 16, 24, 40, 57, 69, 56,
10 14, 17, 22, 29, 51, 87, 80, 62, 10 14, 17, 22, 29, 51, 87, 80, 62,
11 18, 22, 37, 58, 68, 109, 103, 77, 11 18, 22, 37, 58, 68, 109, 103, 77,
14 72, 92, 95, 98, 112, 100, 103, 99 14 72, 92, 95, 98, 112, 100, 103, 99
15 }; 15 };
16 16
17 /* these coefficients dequantize intraframe C plane coefficients 17 /* these coefficients dequantize intraframe C plane coefficients
18 * (note: same as JPEG) */ 18 * (note: same as JPEG) */
19 static int16_t vp31_intra_c_dequant[64] = 19 static const int16_t vp31_intra_c_dequant[64] =
20 { 17, 18, 24, 47, 99, 99, 99, 99, 20 { 17, 18, 24, 47, 99, 99, 99, 99,
21 18, 21, 26, 66, 99, 99, 99, 99, 21 18, 21, 26, 66, 99, 99, 99, 99,
22 24, 26, 56, 99, 99, 99, 99, 99, 22 24, 26, 56, 99, 99, 99, 99, 99,
23 47, 66, 99, 99, 99, 99, 99, 99, 23 47, 66, 99, 99, 99, 99, 99, 99,
24 99, 99, 99, 99, 99, 99, 99, 99, 24 99, 99, 99, 99, 99, 99, 99, 99,
26 99, 99, 99, 99, 99, 99, 99, 99, 26 99, 99, 99, 99, 99, 99, 99, 99,
27 99, 99, 99, 99, 99, 99, 99, 99 27 99, 99, 99, 99, 99, 99, 99, 99
28 }; 28 };
29 29
30 /* these coefficients dequantize interframe coefficients (all planes) */ 30 /* these coefficients dequantize interframe coefficients (all planes) */
31 static int16_t vp31_inter_dequant[64] = 31 static const int16_t vp31_inter_dequant[64] =
32 { 16, 16, 16, 20, 24, 28, 32, 40, 32 { 16, 16, 16, 20, 24, 28, 32, 40,
33 16, 16, 20, 24, 28, 32, 40, 48, 33 16, 16, 20, 24, 28, 32, 40, 48,
34 16, 20, 24, 28, 32, 40, 48, 64, 34 16, 20, 24, 28, 32, 40, 48, 64,
35 20, 24, 28, 32, 40, 48, 64, 64, 35 20, 24, 28, 32, 40, 48, 64, 64,
36 24, 28, 32, 40, 48, 64, 64, 64, 36 24, 28, 32, 40, 48, 64, 64, 64,
37 28, 32, 40, 48, 64, 64, 64, 96, 37 28, 32, 40, 48, 64, 64, 64, 96,
38 32, 40, 48, 64, 64, 64, 96, 128, 38 32, 40, 48, 64, 64, 64, 96, 128,
39 40, 48, 64, 64, 64, 96, 128, 128 39 40, 48, 64, 64, 64, 96, 128, 128
40 }; 40 };
41 41
42 static int16_t vp31_dc_scale_factor[64] = 42 static const int16_t vp31_dc_scale_factor[64] =
43 { 220, 200, 190, 180, 170, 170, 160, 160, 43 { 220, 200, 190, 180, 170, 170, 160, 160,
44 150, 150, 140, 140, 130, 130, 120, 120, 44 150, 150, 140, 140, 130, 130, 120, 120,
45 110, 110, 100, 100, 90, 90, 90, 80, 45 110, 110, 100, 100, 90, 90, 90, 80,
46 80, 80, 70, 70, 70, 60, 60, 60, 46 80, 80, 70, 70, 70, 60, 60, 60,
47 60, 50, 50, 50, 50, 40, 40, 40, 47 60, 50, 50, 50, 50, 40, 40, 40,
48 40, 40, 30, 30, 30, 30, 30, 30, 48 40, 40, 30, 30, 30, 30, 30, 30,
49 30, 20, 20, 20, 20, 20, 20, 20, 49 30, 20, 20, 20, 20, 20, 20, 20,
50 20, 10, 10, 10, 10, 10, 10, 10 50 20, 10, 10, 10, 10, 10, 10, 10
51 }; 51 };
52 52
53 static uint32_t vp31_ac_scale_factor[64] = 53 static const uint32_t vp31_ac_scale_factor[64] =
54 { 500, 450, 400, 370, 340, 310, 285, 265, 54 { 500, 450, 400, 370, 340, 310, 285, 265,
55 245, 225, 210, 195, 185, 180, 170, 160, 55 245, 225, 210, 195, 185, 180, 170, 160,
56 150, 145, 135, 130, 125, 115, 110, 107, 56 150, 145, 135, 130, 125, 115, 110, 107,
57 100, 96, 93, 89, 85, 82, 75, 74, 57 100, 96, 93, 89, 85, 82, 75, 74,
58 70, 68, 64, 60, 57, 56, 52, 50, 58 70, 68, 64, 60, 57, 56, 52, 50,
72 58, 59, 52, 45, 38, 31, 39, 46, 72 58, 59, 52, 45, 38, 31, 39, 46,
73 53, 60, 61, 54, 47, 55, 62, 63 73 53, 60, 61, 54, 47, 55, 62, 63
74 }; 74 };
75 75
76 /* inverse of dezigzag index */ 76 /* inverse of dezigzag index */
77 static int zigzag_index[64]; 77 static __attribute__((unused)) int zigzag_index[64];
78 78
79 static const uint16_t dc_bias[16][32][2] = { 79 static const uint16_t dc_bias[16][32][2] = {
80 { /* DC bias table 0 */ 80 { /* DC bias table 0 */
81 { 0x2D, 6 }, 81 { 0x2D, 6 },
82 { 0x26, 7 }, 82 { 0x26, 7 },