[FFmpeg-devel] PATCH: COOK audio decode infastructure to support fixpoint optimization

Marc Hoffman mmhoffm
Sun Jul 15 23:19:01 CEST 2007


On 7/15/07, Benjamin Larsson <banan at ludd.ltu.se> wrote:
>
> Marc Hoffman wrote:
>
> > +
> > +static void joint_decode(COOKContext *q, vec_t* mlt_buffer1,
> > +                         vec_t* mlt_buffer2) {
> > +    int decouple_tab[SUBBAND_SIZE];
> > +    vec_t *decode_buffer;
> > +
> > +    decode_buffer = av_malloc (1060*q->f_sample_size);
>
> Don't allocate memory with malloc during decode. Use a fixed max size.


why? your just allocating a really big buffer on the stack which causes
actually problems for a machine with out a address translation.  Would it be
acceptable to put that extra memory into COOKContext instead?

Marc




More information about the ffmpeg-devel mailing list