mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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
This commit is contained in:
parent
3ab29d8e4f
commit
51f90867ea
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user