mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
adding a few const
Originally committed as revision 4337 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
435b0720a8
commit
c26ae41db2
@ -99,18 +99,18 @@ static const int xa_adpcm_table[5][2] = {
|
|||||||
{ 122, -60 }
|
{ 122, -60 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ea_adpcm_table[] = {
|
static const int ea_adpcm_table[] = {
|
||||||
0, 240, 460, 392, 0, 0, -208, -220, 0, 1,
|
0, 240, 460, 392, 0, 0, -208, -220, 0, 1,
|
||||||
3, 4, 7, 8, 10, 11, 0, -1, -3, -4
|
3, 4, 7, 8, 10, 11, 0, -1, -3, -4
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ct_adpcm_table[8] = {
|
static const int ct_adpcm_table[8] = {
|
||||||
0x00E6, 0x00E6, 0x00E6, 0x00E6,
|
0x00E6, 0x00E6, 0x00E6, 0x00E6,
|
||||||
0x0133, 0x0199, 0x0200, 0x0266
|
0x0133, 0x0199, 0x0200, 0x0266
|
||||||
};
|
};
|
||||||
|
|
||||||
// padded to zero where table size is less then 16
|
// padded to zero where table size is less then 16
|
||||||
static int swf_index_tables[4][16] = {
|
static const int swf_index_tables[4][16] = {
|
||||||
/*2*/ { -1, 2 },
|
/*2*/ { -1, 2 },
|
||||||
/*3*/ { -1, -1, 2, 4 },
|
/*3*/ { -1, -1, 2, 4 },
|
||||||
/*4*/ { -1, -1, -1, -1, 2, 4, 6, 8 },
|
/*4*/ { -1, -1, -1, -1, 2, 4, 6, 8 },
|
||||||
@ -911,7 +911,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
|
|||||||
case CODEC_ID_ADPCM_SWF:
|
case CODEC_ID_ADPCM_SWF:
|
||||||
{
|
{
|
||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
int *table;
|
const int *table;
|
||||||
int k0, signmask;
|
int k0, signmask;
|
||||||
int size = buf_size*8;
|
int size = buf_size*8;
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ static const uint16_t h263_format[8][2] = {
|
|||||||
{ 1408, 1152 },
|
{ 1408, 1152 },
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8_t ff_aic_dc_scale_table[32]={
|
const uint8_t ff_aic_dc_scale_table[32]={
|
||||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
||||||
0, 2, 4, 6, 8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62
|
0, 2, 4, 6, 8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62
|
||||||
};
|
};
|
||||||
|
@ -299,7 +299,7 @@ void put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size
|
|||||||
:"memory");
|
:"memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned char __align8 vector128[8] =
|
static const unsigned char __align8 vector128[8] =
|
||||||
{ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 };
|
{ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 };
|
||||||
|
|
||||||
void put_signed_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size)
|
void put_signed_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size)
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
* idct_constants[44..47] = 8
|
* idct_constants[44..47] = 8
|
||||||
*/
|
*/
|
||||||
static uint16_t idct_constants[(4 + 7 + 1) * 4];
|
static uint16_t idct_constants[(4 + 7 + 1) * 4];
|
||||||
static uint16_t idct_cosine_table[7] = {
|
static const uint16_t idct_cosine_table[7] = {
|
||||||
64277, 60547, 54491, 46341, 36410, 25080, 12785
|
64277, 60547, 54491, 46341, 36410, 25080, 12785
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include "../dsputil.h"
|
#include "../dsputil.h"
|
||||||
#include "mmx.h"
|
#include "mmx.h"
|
||||||
|
|
||||||
static unsigned short __align16 SSE2_dequant_const[] =
|
static const unsigned short __align16 SSE2_dequant_const[] =
|
||||||
{
|
{
|
||||||
0,65535,65535,0,0,0,0,0, // 0x0000 0000 0000 0000 0000 FFFF FFFF 0000
|
0,65535,65535,0,0,0,0,0, // 0x0000 0000 0000 0000 0000 FFFF FFFF 0000
|
||||||
0,0,0,0,65535,65535,0,0, // 0x0000 0000 FFFF FFFF 0000 0000 0000 0000
|
0,0,0,0,65535,65535,0,0, // 0x0000 0000 FFFF FFFF 0000 0000 0000 0000
|
||||||
@ -35,7 +35,7 @@ static unsigned short __align16 SSE2_dequant_const[] =
|
|||||||
0,0,65535,65535, 0,0,0,0 // 0x0000 0000 0000 0000 FFFF FFFF 0000 0000
|
0,0,65535,65535, 0,0,0,0 // 0x0000 0000 0000 0000 FFFF FFFF 0000 0000
|
||||||
};
|
};
|
||||||
|
|
||||||
static unsigned int __align16 eight_data[] =
|
static const unsigned int __align16 eight_data[] =
|
||||||
{
|
{
|
||||||
0x00080008,
|
0x00080008,
|
||||||
0x00080008,
|
0x00080008,
|
||||||
@ -43,7 +43,7 @@ static unsigned int __align16 eight_data[] =
|
|||||||
0x00080008
|
0x00080008
|
||||||
};
|
};
|
||||||
|
|
||||||
static unsigned short __align16 SSE2_idct_data[7 * 8] =
|
static const unsigned short __align16 SSE2_idct_data[7 * 8] =
|
||||||
{
|
{
|
||||||
64277,64277,64277,64277,64277,64277,64277,64277,
|
64277,64277,64277,64277,64277,64277,64277,64277,
|
||||||
60547,60547,60547,60547,60547,60547,60547,60547,
|
60547,60547,60547,60547,60547,60547,60547,60547,
|
||||||
|
@ -359,7 +359,7 @@ static const uint8_t non_linear_qscale[32] = {
|
|||||||
56,64,72,80,88,96,104,112,
|
56,64,72,80,88,96,104,112,
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8_t ff_mpeg1_dc_scale_table[128]={
|
const uint8_t ff_mpeg1_dc_scale_table[128]={
|
||||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
||||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||||
@ -367,7 +367,7 @@ uint8_t ff_mpeg1_dc_scale_table[128]={
|
|||||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t mpeg2_dc_scale_table1[128]={
|
const static uint8_t mpeg2_dc_scale_table1[128]={
|
||||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
||||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
@ -375,7 +375,7 @@ static uint8_t mpeg2_dc_scale_table1[128]={
|
|||||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t mpeg2_dc_scale_table2[128]={
|
static const uint8_t mpeg2_dc_scale_table2[128]={
|
||||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
||||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
@ -383,7 +383,7 @@ static uint8_t mpeg2_dc_scale_table2[128]={
|
|||||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t mpeg2_dc_scale_table3[128]={
|
static const uint8_t mpeg2_dc_scale_table3[128]={
|
||||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
@ -391,7 +391,7 @@ static uint8_t mpeg2_dc_scale_table3[128]={
|
|||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t *mpeg2_dc_scale_table[4]={
|
static const uint8_t *mpeg2_dc_scale_table[4]={
|
||||||
ff_mpeg1_dc_scale_table,
|
ff_mpeg1_dc_scale_table,
|
||||||
mpeg2_dc_scale_table1,
|
mpeg2_dc_scale_table1,
|
||||||
mpeg2_dc_scale_table2,
|
mpeg2_dc_scale_table2,
|
||||||
|
@ -383,11 +383,11 @@ const int16_t ff_mpeg4_default_non_intra_matrix[64] = {
|
|||||||
23, 24, 25, 27, 28, 30, 31, 33,
|
23, 24, 25, 27, 28, 30, 31, 33,
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8_t ff_mpeg4_y_dc_scale_table[32]={
|
const uint8_t ff_mpeg4_y_dc_scale_table[32]={
|
||||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
||||||
0, 8, 8, 8, 8,10,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,34,36,38,40,42,44,46
|
0, 8, 8, 8, 8,10,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,34,36,38,40,42,44,46
|
||||||
};
|
};
|
||||||
uint8_t ff_mpeg4_c_dc_scale_table[32]={
|
const uint8_t ff_mpeg4_c_dc_scale_table[32]={
|
||||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
||||||
0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,20,21,22,23,24,25
|
0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,20,21,22,23,24,25
|
||||||
};
|
};
|
||||||
|
@ -190,7 +190,7 @@ static int32_t scale_factor_mult[15][3];
|
|||||||
#define SCALE_GEN(v) \
|
#define SCALE_GEN(v) \
|
||||||
{ FIXR(1.0 * (v)), FIXR(0.7937005259 * (v)), FIXR(0.6299605249 * (v)) }
|
{ FIXR(1.0 * (v)), FIXR(0.7937005259 * (v)), FIXR(0.6299605249 * (v)) }
|
||||||
|
|
||||||
static int32_t scale_factor_mult2[3][3] = {
|
static const int32_t scale_factor_mult2[3][3] = {
|
||||||
SCALE_GEN(4.0 / 3.0), /* 3 steps */
|
SCALE_GEN(4.0 / 3.0), /* 3 steps */
|
||||||
SCALE_GEN(4.0 / 5.0), /* 5 steps */
|
SCALE_GEN(4.0 / 5.0), /* 5 steps */
|
||||||
SCALE_GEN(4.0 / 9.0), /* 9 steps */
|
SCALE_GEN(4.0 / 9.0), /* 9 steps */
|
||||||
|
@ -719,12 +719,12 @@ const uint8_t mpa_huff_data[32][2] = {
|
|||||||
|
|
||||||
|
|
||||||
/* huffman tables for quadrules */
|
/* huffman tables for quadrules */
|
||||||
static uint8_t mpa_quad_codes[2][16] = {
|
static const uint8_t mpa_quad_codes[2][16] = {
|
||||||
{ 1, 5, 4, 5, 6, 5, 4, 4, 7, 3, 6, 0, 7, 2, 3, 1, },
|
{ 1, 5, 4, 5, 6, 5, 4, 4, 7, 3, 6, 0, 7, 2, 3, 1, },
|
||||||
{ 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, },
|
{ 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, },
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t mpa_quad_bits[2][16] = {
|
static const uint8_t mpa_quad_bits[2][16] = {
|
||||||
{ 1, 4, 4, 5, 4, 6, 5, 6, 4, 5, 5, 6, 5, 6, 6, 6, },
|
{ 1, 4, 4, 5, 4, 6, 5, 6, 4, 5, 5, 6, 5, 6, 6, 6, },
|
||||||
{ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, },
|
{ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, },
|
||||||
};
|
};
|
||||||
|
@ -77,7 +77,7 @@ static unsigned short total_quant_bits[17];
|
|||||||
/* signal to noise ratio of each quantification step (could be
|
/* signal to noise ratio of each quantification step (could be
|
||||||
computed from quant_steps[]). The values are dB multiplied by 10
|
computed from quant_steps[]). The values are dB multiplied by 10
|
||||||
*/
|
*/
|
||||||
static unsigned short quant_snr[17] = {
|
static const unsigned short quant_snr[17] = {
|
||||||
70, 110, 160, 208,
|
70, 110, 160, 208,
|
||||||
253, 316, 378, 439,
|
253, 316, 378, 439,
|
||||||
499, 559, 620, 680,
|
499, 559, 620, 680,
|
||||||
|
@ -340,8 +340,8 @@ typedef struct MpegEncContext {
|
|||||||
int16_t *dc_val[3]; ///< used for mpeg4 DC prediction, all 3 arrays must be continuous
|
int16_t *dc_val[3]; ///< used for mpeg4 DC prediction, all 3 arrays must be continuous
|
||||||
int16_t dc_cache[4*5];
|
int16_t dc_cache[4*5];
|
||||||
int y_dc_scale, c_dc_scale;
|
int y_dc_scale, c_dc_scale;
|
||||||
uint8_t *y_dc_scale_table; ///< qscale -> y_dc_scale table
|
const uint8_t *y_dc_scale_table; ///< qscale -> y_dc_scale table
|
||||||
uint8_t *c_dc_scale_table; ///< qscale -> c_dc_scale table
|
const uint8_t *c_dc_scale_table; ///< qscale -> c_dc_scale table
|
||||||
const uint8_t *chroma_qscale_table; ///< qscale -> chroma_qscale (h263)
|
const uint8_t *chroma_qscale_table; ///< qscale -> chroma_qscale (h263)
|
||||||
uint8_t *coded_block_base;
|
uint8_t *coded_block_base;
|
||||||
uint8_t *coded_block; ///< used for coded block pattern prediction (msmpeg4v3, wmv1)
|
uint8_t *coded_block; ///< used for coded block pattern prediction (msmpeg4v3, wmv1)
|
||||||
@ -819,7 +819,7 @@ int inline ff_get_mb_score(MpegEncContext * s, int mx, int my, int src_index,
|
|||||||
/* mpeg12.c */
|
/* mpeg12.c */
|
||||||
extern const int16_t ff_mpeg1_default_intra_matrix[64];
|
extern const int16_t ff_mpeg1_default_intra_matrix[64];
|
||||||
extern const int16_t ff_mpeg1_default_non_intra_matrix[64];
|
extern const int16_t ff_mpeg1_default_non_intra_matrix[64];
|
||||||
extern uint8_t ff_mpeg1_dc_scale_table[128];
|
extern const uint8_t ff_mpeg1_dc_scale_table[128];
|
||||||
|
|
||||||
void mpeg1_encode_picture_header(MpegEncContext *s, int picture_number);
|
void mpeg1_encode_picture_header(MpegEncContext *s, int picture_number);
|
||||||
void mpeg1_encode_mb(MpegEncContext *s,
|
void mpeg1_encode_mb(MpegEncContext *s,
|
||||||
@ -859,9 +859,9 @@ static inline int get_rl_index(const RLTable *rl, int last, int run, int level)
|
|||||||
return index + level - 1;
|
return index + level - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern uint8_t ff_mpeg4_y_dc_scale_table[32];
|
extern const uint8_t ff_mpeg4_y_dc_scale_table[32];
|
||||||
extern uint8_t ff_mpeg4_c_dc_scale_table[32];
|
extern const uint8_t ff_mpeg4_c_dc_scale_table[32];
|
||||||
extern uint8_t ff_aic_dc_scale_table[32];
|
extern const uint8_t ff_aic_dc_scale_table[32];
|
||||||
extern const int16_t ff_mpeg4_default_intra_matrix[64];
|
extern const int16_t ff_mpeg4_default_intra_matrix[64];
|
||||||
extern const int16_t ff_mpeg4_default_non_intra_matrix[64];
|
extern const int16_t ff_mpeg4_default_non_intra_matrix[64];
|
||||||
extern const uint8_t ff_h263_chroma_qscale_table[32];
|
extern const uint8_t ff_h263_chroma_qscale_table[32];
|
||||||
|
@ -1799,20 +1799,20 @@ static const uint8_t v2_intra_cbpc[4][2] = {
|
|||||||
{1, 1}, {0, 3}, {1, 3}, {1, 2},
|
{1, 1}, {0, 3}, {1, 3}, {1, 2},
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t wmv1_y_dc_scale_table[32]={
|
static const uint8_t wmv1_y_dc_scale_table[32]={
|
||||||
// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
|
// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
|
||||||
0, 8, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21
|
0, 8, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21
|
||||||
};
|
};
|
||||||
static uint8_t wmv1_c_dc_scale_table[32]={
|
static const uint8_t wmv1_c_dc_scale_table[32]={
|
||||||
// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
|
// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
|
||||||
0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22
|
0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t old_ff_y_dc_scale_table[32]={
|
static const uint8_t old_ff_y_dc_scale_table[32]={
|
||||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
||||||
0, 8, 8, 8, 8,10,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39
|
0, 8, 8, 8, 8,10,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39
|
||||||
};
|
};
|
||||||
static uint8_t old_ff_c_dc_scale_table[32]={
|
static const uint8_t old_ff_c_dc_scale_table[32]={
|
||||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
||||||
0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22
|
0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22
|
||||||
};
|
};
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#ifndef SP5X_H
|
#ifndef SP5X_H
|
||||||
#define SP5X_H
|
#define SP5X_H
|
||||||
|
|
||||||
static uint8_t sp5x_data_sof[] =
|
static const uint8_t sp5x_data_sof[] =
|
||||||
{
|
{
|
||||||
0xFF, 0xC0, /* SOF */
|
0xFF, 0xC0, /* SOF */
|
||||||
0x00, 0x11, /* len */
|
0x00, 0x11, /* len */
|
||||||
@ -33,7 +33,7 @@ static uint8_t sp5x_data_sof[] =
|
|||||||
0x03, 0x11, 0x01
|
0x03, 0x11, 0x01
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t sp5x_data_sos[] =
|
static const uint8_t sp5x_data_sos[] =
|
||||||
{
|
{
|
||||||
0xFF, 0xDA, /* SOS */
|
0xFF, 0xDA, /* SOS */
|
||||||
0x00, 0x0C, /* len */
|
0x00, 0x0C, /* len */
|
||||||
@ -46,7 +46,7 @@ static uint8_t sp5x_data_sos[] =
|
|||||||
0x00 /* Ah/Al */
|
0x00 /* Ah/Al */
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t sp5x_data_dqt[] =
|
static const uint8_t sp5x_data_dqt[] =
|
||||||
{
|
{
|
||||||
0xFF, 0xDB, /* DQT */
|
0xFF, 0xDB, /* DQT */
|
||||||
0x00, 0x84, /* len */
|
0x00, 0x84, /* len */
|
||||||
@ -70,7 +70,7 @@ static uint8_t sp5x_data_dqt[] =
|
|||||||
0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22
|
0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t sp5x_data_dht[] = {
|
static const uint8_t sp5x_data_dht[] = {
|
||||||
0xFF, 0xC4, /* DHT */
|
0xFF, 0xC4, /* DHT */
|
||||||
0x01, 0xA2, /* len */
|
0x01, 0xA2, /* len */
|
||||||
0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01,
|
0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01,
|
||||||
@ -128,7 +128,7 @@ static uint8_t sp5x_data_dht[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static uint8_t sp5x_quant_table[20][64]=
|
static const uint8_t sp5x_quant_table[20][64]=
|
||||||
{
|
{
|
||||||
/* index 0, Q50 */
|
/* index 0, Q50 */
|
||||||
{ 16, 11, 12, 14, 12, 10, 16, 14, 13, 14, 18, 17, 16, 19, 24, 40,
|
{ 16, 11, 12, 14, 12, 10, 16, 14, 13, 14, 18, 17, 16, 19, 24, 40,
|
||||||
@ -233,7 +233,7 @@ static uint8_t sp5x_quant_table[20][64]=
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* 4NF-M, not ZigZag */
|
/* 4NF-M, not ZigZag */
|
||||||
static uint8_t sp5x_quant_table_orig[18][64] =
|
static const uint8_t sp5x_quant_table_orig[18][64] =
|
||||||
{
|
{
|
||||||
/* index 0, Q50 */
|
/* index 0, Q50 */
|
||||||
{ 16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55,
|
{ 16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55,
|
||||||
|
@ -248,7 +248,7 @@ static int make_cdt24_entry(int p1, int p2, int16_t *cdt)
|
|||||||
return ((b+r) << 1);
|
return ((b+r) << 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gen_vector_table15(TrueMotion1Context *s, uint8_t *sel_vector_table)
|
static void gen_vector_table15(TrueMotion1Context *s, const uint8_t *sel_vector_table)
|
||||||
{
|
{
|
||||||
int len, i, j;
|
int len, i, j;
|
||||||
unsigned char delta_pair;
|
unsigned char delta_pair;
|
||||||
@ -269,7 +269,7 @@ static void gen_vector_table15(TrueMotion1Context *s, uint8_t *sel_vector_table)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gen_vector_table16(TrueMotion1Context *s, uint8_t *sel_vector_table)
|
static void gen_vector_table16(TrueMotion1Context *s, const uint8_t *sel_vector_table)
|
||||||
{
|
{
|
||||||
int len, i, j;
|
int len, i, j;
|
||||||
unsigned char delta_pair;
|
unsigned char delta_pair;
|
||||||
@ -290,7 +290,7 @@ static void gen_vector_table16(TrueMotion1Context *s, uint8_t *sel_vector_table)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gen_vector_table24(TrueMotion1Context *s, uint8_t *sel_vector_table)
|
static void gen_vector_table24(TrueMotion1Context *s, const uint8_t *sel_vector_table)
|
||||||
{
|
{
|
||||||
int len, i, j;
|
int len, i, j;
|
||||||
unsigned char delta_pair;
|
unsigned char delta_pair;
|
||||||
@ -324,7 +324,7 @@ static int truemotion1_decode_header(TrueMotion1Context *s)
|
|||||||
int i;
|
int i;
|
||||||
struct frame_header header;
|
struct frame_header header;
|
||||||
uint8_t header_buffer[128]; /* logical maximum size of the header */
|
uint8_t header_buffer[128]; /* logical maximum size of the header */
|
||||||
uint8_t *sel_vector_table;
|
const uint8_t *sel_vector_table;
|
||||||
|
|
||||||
/* There is 1 change bit per 4 pixels, so each change byte represents
|
/* There is 1 change bit per 4 pixels, so each change byte represents
|
||||||
* 32 pixels; divide width by 4 to obtain the number of change bits and
|
* 32 pixels; divide width by 4 to obtain the number of change bits and
|
||||||
|
@ -10,29 +10,29 @@
|
|||||||
#define TRUEMOTION1DATA_H
|
#define TRUEMOTION1DATA_H
|
||||||
|
|
||||||
/* Y delta tables, skinny and fat */
|
/* Y delta tables, skinny and fat */
|
||||||
static int16_t ydt1[8] = { 0, -2, 2, -6, 6, -12, 12, -12 };
|
static const int16_t ydt1[8] = { 0, -2, 2, -6, 6, -12, 12, -12 };
|
||||||
static int16_t ydt2[8] = { 0, -2, 2, -6, 6, -12, 12, -12 };
|
static const int16_t ydt2[8] = { 0, -2, 2, -6, 6, -12, 12, -12 };
|
||||||
static int16_t ydt3[8] = { 4, -6, 20, -20, 46, -46, 94, -94 };
|
static const int16_t ydt3[8] = { 4, -6, 20, -20, 46, -46, 94, -94 };
|
||||||
static int16_t fat_ydt3[8] = { 0, -15, 50, -50, 115, -115, 235, -235 };
|
static const int16_t fat_ydt3[8] = { 0, -15, 50, -50, 115, -115, 235, -235 };
|
||||||
static int16_t ydt4[8] = { 0, -4, 4, -16, 16, -36, 36, -80 };
|
static const int16_t ydt4[8] = { 0, -4, 4, -16, 16, -36, 36, -80 };
|
||||||
static int16_t fat_ydt4[8] = { 0, 40, 80, -76, 160, -154, 236, -236 };
|
static const int16_t fat_ydt4[8] = { 0, 40, 80, -76, 160, -154, 236, -236 };
|
||||||
|
|
||||||
/* C delta tables, skinny and fat */
|
/* C delta tables, skinny and fat */
|
||||||
static int16_t cdt1[8] = { 0, -1, 1, -2, 3, -4, 5, -4 };
|
static const int16_t cdt1[8] = { 0, -1, 1, -2, 3, -4, 5, -4 };
|
||||||
static int16_t cdt2[8] = { 0, -4, 3, -16, 20, -32, 36, -32 };
|
static const int16_t cdt2[8] = { 0, -4, 3, -16, 20, -32, 36, -32 };
|
||||||
static int16_t fat_cdt2[8] = { 0, -20, 15, -80, 100, -160, 180, -160 };
|
static const int16_t fat_cdt2[8] = { 0, -20, 15, -80, 100, -160, 180, -160 };
|
||||||
static int16_t cdt3[8] = { 0, -2, 2, -8, 8, -18, 18, -40 };
|
static const int16_t cdt3[8] = { 0, -2, 2, -8, 8, -18, 18, -40 };
|
||||||
/* NOTE: This table breaks the [+,-] pattern that the rest of the
|
/* NOTE: This table breaks the [+,-] pattern that the rest of the
|
||||||
* tables maintain. Is this intentional? */
|
* tables maintain. Is this intentional? */
|
||||||
static int16_t fat_cdt3[8] = { 0, 40, 80, -76, 160, -154, 236, -236 };
|
static const int16_t fat_cdt3[8] = { 0, 40, 80, -76, 160, -154, 236, -236 };
|
||||||
|
|
||||||
/* all the delta tables to choose from, at all 4 delta levels */
|
/* all the delta tables to choose from, at all 4 delta levels */
|
||||||
static int16_t *ydts[] = { ydt1, ydt2, ydt3, ydt4, NULL };
|
static const int16_t *ydts[] = { ydt1, ydt2, ydt3, ydt4, NULL };
|
||||||
static int16_t *fat_ydts[] = { fat_ydt3, fat_ydt3, fat_ydt3, fat_ydt4, NULL };
|
static const int16_t *fat_ydts[] = { fat_ydt3, fat_ydt3, fat_ydt3, fat_ydt4, NULL };
|
||||||
static int16_t *cdts[] = { cdt1, cdt2, cdt3, cdt3, NULL };
|
static const int16_t *cdts[] = { cdt1, cdt2, cdt3, cdt3, NULL };
|
||||||
static int16_t *fat_cdts[] = { fat_cdt2, fat_cdt2, fat_cdt2, fat_cdt3, NULL };
|
static const int16_t *fat_cdts[] = { fat_cdt2, fat_cdt2, fat_cdt2, fat_cdt3, NULL };
|
||||||
|
|
||||||
static uint8_t pc_tbl2[] = {
|
static const uint8_t pc_tbl2[] = {
|
||||||
0x8,0x00,0x00,0x00,0x00,
|
0x8,0x00,0x00,0x00,0x00,
|
||||||
0x8,0x00,0x00,0x00,0x00,
|
0x8,0x00,0x00,0x00,0x00,
|
||||||
0x8,0x10,0x00,0x00,0x00,
|
0x8,0x10,0x00,0x00,0x00,
|
||||||
@ -291,7 +291,7 @@ static uint8_t pc_tbl2[] = {
|
|||||||
0x2,0x66
|
0x2,0x66
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t pc_tbl3[] = {
|
static const uint8_t pc_tbl3[] = {
|
||||||
0x6,0x00,0x00,0x00,
|
0x6,0x00,0x00,0x00,
|
||||||
0x6,0x00,0x00,0x00,
|
0x6,0x00,0x00,0x00,
|
||||||
0x6,0x00,0x00,0x01,
|
0x6,0x00,0x00,0x01,
|
||||||
@ -550,7 +550,7 @@ static uint8_t pc_tbl3[] = {
|
|||||||
0x2,0x77
|
0x2,0x77
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t pc_tbl4[] = {
|
static const uint8_t pc_tbl4[] = {
|
||||||
0x8,0x00,0x00,0x00,0x00,
|
0x8,0x00,0x00,0x00,0x00,
|
||||||
0x8,0x00,0x00,0x00,0x00,
|
0x8,0x00,0x00,0x00,0x00,
|
||||||
0x8,0x20,0x00,0x00,0x00,
|
0x8,0x20,0x00,0x00,0x00,
|
||||||
@ -809,5 +809,5 @@ static uint8_t pc_tbl4[] = {
|
|||||||
0x2,0x77
|
0x2,0x77
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t *tables[] = { pc_tbl2, pc_tbl3, pc_tbl4 };
|
static const uint8_t *tables[] = { pc_tbl2, pc_tbl3, pc_tbl4 };
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
static unsigned char ulti_codebook[16384]={
|
static const unsigned char ulti_codebook[16384]={
|
||||||
0x00, 0x01, 0x01, 0x02,
|
0x00, 0x01, 0x01, 0x02,
|
||||||
0x00, 0x01, 0x02, 0x03,
|
0x00, 0x01, 0x02, 0x03,
|
||||||
0x00, 0x02, 0x03, 0x04,
|
0x00, 0x02, 0x03, 0x04,
|
||||||
|
Loading…
Reference in New Issue
Block a user