Mercurial > libavcodec.hg
diff mpeg12.c @ 1325:1cbc2380d172 libavcodec
CONFIG_ENCODERS cleanup
| author | michaelni |
|---|---|
| date | Sun, 22 Jun 2003 11:08:22 +0000 |
| parents | e9da5a651eab |
| children | 6cdd3b8f4fd3 |
line wrap: on
line diff
--- a/mpeg12.c Sat Jun 21 01:11:31 2003 +0000 +++ b/mpeg12.c Sun Jun 22 11:08:22 2003 +0000 @@ -73,6 +73,13 @@ static uint32_t uni_mpeg1_ac_vlc_bits[64*64*2]; static uint8_t uni_mpeg1_ac_vlc_len [64*64*2]; + +/* simple include everything table for dc, first byte is bits number next 3 are code*/ +static uint32_t mpeg1_lum_dc_uni[512]; +static uint32_t mpeg1_chr_dc_uni[512]; + +static uint8_t mpeg1_index_run[2][64]; +static int8_t mpeg1_max_level[2][64]; #endif static void init_2d_vlc_rl(RLTable *rl) @@ -114,6 +121,7 @@ } } +#ifdef CONFIG_ENCODERS static void init_uni_ac_vlc(RLTable *rl, uint32_t *uni_ac_vlc_bits, uint8_t *uni_ac_vlc_len){ int i; @@ -309,6 +317,7 @@ put_bits(&s->pb, 1, 1); put_bits(&s->pb, 1, 1); } +#endif static void common_init(MpegEncContext *s) { @@ -316,6 +325,13 @@ s->c_dc_scale_table= ff_mpeg1_dc_scale_table; } +void ff_mpeg1_clean_buffers(MpegEncContext *s){ + s->last_dc[0] = 1 << (7 + s->intra_dc_precision); + s->last_dc[1] = s->last_dc[0]; + s->last_dc[2] = s->last_dc[0]; + memset(s->last_mv, 0, sizeof(s->last_mv)); +} + #ifdef CONFIG_ENCODERS void ff_mpeg1_encode_slice_header(MpegEncContext *s){ @@ -324,13 +340,6 @@ put_bits(&s->pb, 1, 0); /* slice extra information */ } -void ff_mpeg1_clean_buffers(MpegEncContext *s){ - s->last_dc[0] = 1 << (7 + s->intra_dc_precision); - s->last_dc[1] = s->last_dc[0]; - s->last_dc[2] = s->last_dc[0]; - memset(s->last_mv, 0, sizeof(s->last_mv)); -} - void mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) { mpeg1_encode_sequence_header(s);
