[FFmpeg-cvslog] r22715 - trunk/libavcodec/bitstream.c
Måns Rullgård
mans
Tue May 4 23:40:42 CEST 2010
Loren Merritt <lorenm at u.washington.edu> writes:
> On Sun, 2 May 2010, M?ns Rullg?rd wrote:
>
>> lorenm <subversion at mplayerhq.hu> writes:
>>
>>> @@ -258,6 +275,9 @@ int init_vlc_sparse(VLC *vlc, int nb_bit
>>> const void *symbols, int symbols_wrap, int symbols_size,
>>> int flags)
>>> {
>>> + VLCcode buf[nb_codes];
>>
>> Sorry for not noticing this earlier, but is there any way that
>> variable-length array could be removed? Such beasts are made of pure
>> evil. We should be slaying them, not helping them spread.
>
> a) malloc.
Would this have any measurable impact on performance? Is this
function ever called more than once per frame?
> b) unconditionally round it up to 512KB of stack space (that being the
> largest size currently supported).
Out of the question.
> c) unconditionally round it up to 11KB of stack space (that being the
> largest size currently used (not sure of this)).
Fragile, and also out of the question.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-cvslog
mailing list