FFmpeg
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions | Variables
psymodel.c File Reference
#include "avcodec.h"
#include "psymodel.h"
#include "libavutil/mem.h"

Go to the source code of this file.

Functions

av_cold int ff_psy_init (FFPsyContext *ctx, AVCodecContext *avctx, int num_lens, const uint8_t **bands, const int *num_bands, int num_groups, const uint8_t *group_map)
 Initialize psychoacoustic model. More...
 
FFPsyChannelGroupff_psy_find_group (FFPsyContext *ctx, int channel)
 Determine what group a channel belongs to. More...
 
av_cold void ff_psy_end (FFPsyContext *ctx)
 Cleanup model context at the end. More...
 

Variables

const FFPsyModel ff_aac_psy_model
 

Function Documentation

◆ ff_psy_init()

av_cold int ff_psy_init ( FFPsyContext ctx,
AVCodecContext avctx,
int  num_lens,
const uint8_t **  bands,
const int *  num_bands,
int  num_groups,
const uint8_t *  group_map 
)

Initialize psychoacoustic model.

Parameters
ctxmodel context
avctxcodec context
num_lensnumber of possible frame lengths
bandsscalefactor band lengths for all frame lengths
num_bandsnumber of scalefactor bands for all frame lengths
num_groupsnumber of channel groups
group_maparray with # of channels in group - 1, for each group
Returns
zero if successful, a negative value if not

Definition at line 28 of file psymodel.c.

Referenced by aac_encode_init().

◆ ff_psy_find_group()

FFPsyChannelGroup* ff_psy_find_group ( FFPsyContext ctx,
int  channel 
)

Determine what group a channel belongs to.

Parameters
ctxpsymodel context
channelchannel to locate the group for
Returns
pointer to the FFPsyChannelGroup this channel belongs to

Definition at line 67 of file psymodel.c.

Referenced by psy_3gpp_analyze().

◆ ff_psy_end()

av_cold void ff_psy_end ( FFPsyContext ctx)

Cleanup model context at the end.

Parameters
ctxmodel context

Definition at line 77 of file psymodel.c.

Referenced by aac_encode_end(), and ff_psy_init().

Variable Documentation

◆ ff_aac_psy_model

const FFPsyModel ff_aac_psy_model

Definition at line 1015 of file aacpsy.c.

Referenced by ff_psy_init().