[FFmpeg-devel] [RFC] Generic psychoacoustic model interface

Alexander E. Patrakov patrakov
Fri Aug 29 04:00:35 CEST 2008


Kostya wrote:

> /**
>  * Suggest window sequence for channel.
>  *
>  * @param ctx       model context
>  * @param audio     samples for the current frame
>  * @param la        lookahead samples (NULL when unavailable)
>  * @param channel   number of channel element to analyze
>  * @param prev_type previous window type
>  *
>  * @return suggested window information in a structure
>  */
> FFWindowInfo ff_psy_suggest_window(FFPsyContext *ctx,
>                                    const int16_t *audio, const int16_t
*la,
>                                    int channel, int prev_type);

Where is the length of current-frame audio data and look-ahead data? Is it
not transmitted just because the psy model is always codec-specific and
knows it in advance (as a constant)?
 
> /**
>  * Perform psychoacoustic analysis and set band info.
>  *
>  * @param ctx    model context
>  * @param tag    number of channel element to analyze
>  * @param winfo  window information
>  * @param coeffs transformed channel coefficients

How should they be transformed? Or, is the transformation codec-dependent?

>  */
> void ff_psy_analyze(FFPsyContext *ctx, int tag, FFWindowInfo *winfo, const
float *coeffs);

-- 
Alexander E. Patrakov





More information about the ffmpeg-devel mailing list