diff options
author | Art Clarke <aclarke@vlideshow.com> | 2008-06-23 07:33:15 +0000 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2008-06-23 07:33:15 +0000 |
commit | 51f90867ea389b630103cc692c5c0704fb95a73f (patch) | |
tree | 4daad80a442f2d153336e598c8b21f8db8a4b151 /libavcodec/h263.c | |
parent | 3ab29d8e4f56636722af718571d673e798469cec (diff) | |
download | ffmpeg-51f90867ea389b630103cc692c5c0704fb95a73f.tar.gz |
Allocate static tables on stack, not heap.
Patch by Art Clarke: aclarke vlideshow com
Originally committed as revision 13907 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r-- | libavcodec/h263.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c index 28e532ff09..3ffda9ffc1 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -2907,18 +2907,18 @@ void h263_decode_init_vlc(MpegEncContext *s) if (!done) { done = 1; - init_vlc(&intra_MCBPC_vlc, INTRA_MCBPC_VLC_BITS, 9, + INIT_VLC_STATIC(&intra_MCBPC_vlc, INTRA_MCBPC_VLC_BITS, 9, intra_MCBPC_bits, 1, 1, - intra_MCBPC_code, 1, 1, 1); - init_vlc(&inter_MCBPC_vlc, INTER_MCBPC_VLC_BITS, 28, + intra_MCBPC_code, 1, 1, 72); + INIT_VLC_STATIC(&inter_MCBPC_vlc, INTER_MCBPC_VLC_BITS, 28, inter_MCBPC_bits, 1, 1, - inter_MCBPC_code, 1, 1, 1); - init_vlc(&cbpy_vlc, CBPY_VLC_BITS, 16, + inter_MCBPC_code, 1, 1, 198); + INIT_VLC_STATIC(&cbpy_vlc, CBPY_VLC_BITS, 16, &cbpy_tab[0][1], 2, 1, - &cbpy_tab[0][0], 2, 1, 1); - init_vlc(&mv_vlc, MV_VLC_BITS, 33, + &cbpy_tab[0][0], 2, 1, 64); + INIT_VLC_STATIC(&mv_vlc, MV_VLC_BITS, 33, &mvtab[0][1], 2, 1, - &mvtab[0][0], 2, 1, 1); + &mvtab[0][0], 2, 1, 538); init_rl(&rl_inter, static_rl_table_store[0]); init_rl(&rl_intra, static_rl_table_store[1]); init_rl(&rvlc_rl_inter, static_rl_table_store[3]); @@ -2929,24 +2929,24 @@ void h263_decode_init_vlc(MpegEncContext *s) INIT_VLC_RL(rvlc_rl_inter, 1072); INIT_VLC_RL(rvlc_rl_intra, 1072); INIT_VLC_RL(rl_intra_aic, 554); - init_vlc(&dc_lum, DC_VLC_BITS, 10 /* 13 */, + INIT_VLC_STATIC(&dc_lum, DC_VLC_BITS, 10 /* 13 */, &DCtab_lum[0][1], 2, 1, - &DCtab_lum[0][0], 2, 1, 1); - init_vlc(&dc_chrom, DC_VLC_BITS, 10 /* 13 */, + &DCtab_lum[0][0], 2, 1, 512); + INIT_VLC_STATIC(&dc_chrom, DC_VLC_BITS, 10 /* 13 */, &DCtab_chrom[0][1], 2, 1, - &DCtab_chrom[0][0], 2, 1, 1); - init_vlc(&sprite_trajectory, SPRITE_TRAJ_VLC_BITS, 15, + &DCtab_chrom[0][0], 2, 1, 512); + INIT_VLC_STATIC(&sprite_trajectory, SPRITE_TRAJ_VLC_BITS, 15, &sprite_trajectory_tab[0][1], 4, 2, - &sprite_trajectory_tab[0][0], 4, 2, 1); - init_vlc(&mb_type_b_vlc, MB_TYPE_B_VLC_BITS, 4, + &sprite_trajectory_tab[0][0], 4, 2, 128); + INIT_VLC_STATIC(&mb_type_b_vlc, MB_TYPE_B_VLC_BITS, 4, &mb_type_b_tab[0][1], 2, 1, - &mb_type_b_tab[0][0], 2, 1, 1); - init_vlc(&h263_mbtype_b_vlc, H263_MBTYPE_B_VLC_BITS, 15, + &mb_type_b_tab[0][0], 2, 1, 16); + INIT_VLC_STATIC(&h263_mbtype_b_vlc, H263_MBTYPE_B_VLC_BITS, 15, &h263_mbtype_b_tab[0][1], 2, 1, - &h263_mbtype_b_tab[0][0], 2, 1, 1); - init_vlc(&cbpc_b_vlc, CBPC_B_VLC_BITS, 4, + &h263_mbtype_b_tab[0][0], 2, 1, 80); + INIT_VLC_STATIC(&cbpc_b_vlc, CBPC_B_VLC_BITS, 4, &cbpc_b_tab[0][1], 2, 1, - &cbpc_b_tab[0][0], 2, 1, 1); + &cbpc_b_tab[0][0], 2, 1, 8); } } |