mirror of https://git.ffmpeg.org/ffmpeg.git
simplify
Originally committed as revision 3085 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
3834be5858
commit
8aedc51d2b
|
@ -777,7 +777,7 @@ void ff_mpeg1_encode_init(MpegEncContext *s)
|
|||
|
||||
adiff = ABS(diff);
|
||||
if(diff<0) diff--;
|
||||
index = vlc_dc_table[adiff];
|
||||
index = av_log2(2*adiff);
|
||||
|
||||
bits= vlc_dc_lum_bits[index] + index;
|
||||
code= (vlc_dc_lum_code[index]<<index) + (diff & ((1 << index) - 1));
|
||||
|
|
|
@ -25,29 +25,6 @@ const int16_t ff_mpeg1_default_non_intra_matrix[64] = {
|
|||
16, 16, 16, 16, 16, 16, 16, 16,
|
||||
};
|
||||
|
||||
static const unsigned char vlc_dc_table[256] = {
|
||||
0, 1, 2, 2,
|
||||
3, 3, 3, 3,
|
||||
4, 4, 4, 4, 4, 4, 4, 4,
|
||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
||||
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
|
||||
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,
|
||||
};
|
||||
|
||||
static const uint16_t vlc_dc_lum_code[12] = {
|
||||
0x4, 0x0, 0x1, 0x5, 0x6, 0xe, 0x1e, 0x3e, 0x7e, 0xfe, 0x1fe, 0x1ff,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue