On Wed, Jan 18, 2012 at 2:39 PM, Alex Converse <alex.conve...@gmail.com> wrote:
>> @@ -709,6 +737,11 @@ static av_cold int aac_encode_init(AVCodecContext 
>> *avctx)
>>         goto fail;
>>     s->psypp = ff_psy_preprocess_init(avctx);
>>     s->coder = &ff_aac_coders[2];
>> +
>> +    s->apply_window[EIGHT_SHORT_SEQUENCE] = apply_eight_short_window;
>> +    s->apply_window[LONG_START_SEQUENCE]  = apply_long_start_window;
>> +    s->apply_window[ONLY_LONG_SEQUENCE]   = apply_only_long_window;
>> +    s->apply_window[LONG_STOP_SEQUENCE]   = apply_long_stop_window;
>>
>>     s->lambda = avctx->global_quality ? avctx->global_quality : 120;
>>
>> diff --git a/libavcodec/aacenc.h b/libavcodec/aacenc.h
>> index 7cc24e1..9688bdf 100644
>> --- a/libavcodec/aacenc.h
>> +++ b/libavcodec/aacenc.h
>> @@ -74,6 +74,8 @@ typedef struct AACEncContext {
>>     DECLARE_ALIGNED(16, int,   qcoefs)[96];      ///< quantized coefficients
>>     DECLARE_ALIGNED(32, float, scoefs)[1024];    ///< scaled coefficients
>>
>> +    void (*apply_window[4])(DSPContext *dsp, SingleChannelElement *sce, 
>> const float *audio);
>> +
>>     struct {
>>         float *samples;
>>     } buffer;
>
> Why is this in the context? It seems like it should be static const data.
>
> static void (*const apply_window[4])(DSPContext *dsp,
> SingleChannelElement *sce, const float *audio) = {
>     [EIGHT_SHORT_SEQUENCE] = apply_eight_short_window;
>     [LONG_START_SEQUENCE]  = apply_long_start_window;
>     [ONLY_LONG_SEQUENCE]   = apply_only_long_window;
>     [LONG_STOP_SEQUENCE]   = apply_long_stop_window;
> }

I had a reason at one point, but no longer. Changed.


-- 
-Nathan Caldwell
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to