Mark ff_div6 and ff_rem6 static in h264.c. Patch by Diego Pettenò

Originally committed as revision 15549 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Diego Pettenò 2008-10-04 09:36:35 +00:00 committed by Luca Barbato
parent e6df765ed3
commit d9ec210baa
2 changed files with 6 additions and 9 deletions

View File

@ -86,11 +86,11 @@ static av_always_inline uint32_t pack16to32(int a, int b){
#endif #endif
} }
const uint8_t ff_rem6[52]={ static const uint8_t rem6[52]={
0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
}; };
const uint8_t ff_div6[52]={ static const uint8_t div6[52]={
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
}; };
@ -2056,8 +2056,8 @@ static void init_dequant8_coeff_table(H264Context *h){
} }
for(q=0; q<52; q++){ for(q=0; q<52; q++){
int shift = ff_div6[q]; int shift = div6[q];
int idx = ff_rem6[q]; int idx = rem6[q];
for(x=0; x<64; x++) for(x=0; x<64; x++)
h->dequant8_coeff[i][q][transpose ? (x>>3)|((x&7)<<3) : x] = h->dequant8_coeff[i][q][transpose ? (x>>3)|((x&7)<<3) : x] =
((uint32_t)dequant8_coeff_init[idx][ dequant8_coeff_init_scan[((x>>1)&12) | (x&3)] ] * ((uint32_t)dequant8_coeff_init[idx][ dequant8_coeff_init_scan[((x>>1)&12) | (x&3)] ] *
@ -2081,8 +2081,8 @@ static void init_dequant4_coeff_table(H264Context *h){
continue; continue;
for(q=0; q<52; q++){ for(q=0; q<52; q++){
int shift = ff_div6[q] + 2; int shift = div6[q] + 2;
int idx = ff_rem6[q]; int idx = rem6[q];
for(x=0; x<16; x++) for(x=0; x<16; x++)
h->dequant4_coeff[i][q][transpose ? (x>>2)|((x<<2)&0xF) : x] = h->dequant4_coeff[i][q][transpose ? (x>>2)|((x<<2)&0xF) : x] =
((uint32_t)dequant4_coeff_init[idx][(x&1) + ((x>>2)&1)] * ((uint32_t)dequant4_coeff_init[idx][(x&1) + ((x>>2)&1)] *

View File

@ -28,9 +28,6 @@
#include "dsputil.h" #include "dsputil.h"
extern const uint8_t ff_div6[52];
extern const uint8_t ff_rem6[52];
#define H264_DCT_PART1(X) \ #define H264_DCT_PART1(X) \
a = block[0][X]+block[3][X]; \ a = block[0][X]+block[3][X]; \
c = block[0][X]-block[3][X]; \ c = block[0][X]-block[3][X]; \