FFmpeg
Data Structures | Macros | Functions
psymodel.h File Reference
#include "avcodec.h"

Go to the source code of this file.

Data Structures

struct   FFPsyBand
  single band psychoacoustic information More...
 
struct   FFPsyChannel
  single channel psychoacoustic information More...
 
struct   FFPsyChannelGroup
  psychoacoustic information for an arbitrary group of channels More...
 
struct   FFPsyWindowInfo
  windowing related information More...
 
struct   FFPsyContext
  context used by psychoacoustic model More...
 
struct   FFPsyModel
  codec-specific psychoacoustic model implementation More...
 

Macros

#define  PSY_MAX_BANDS   128
  maximum possible number of bands
 
#define  PSY_MAX_CHANS   20
  maximum number of channels
 
#define  AAC_CUTOFF(s)   (s->bit_rate ? FFMIN3(4000 + s->bit_rate/8, 12000 + s->bit_rate/32, s->sample_rate / 2) : (s->sample_rate / 2))
 

Functions

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.
 
  Determine what group a channel belongs to.
 
  Cleanup model context at the end.
 
  psychoacoustic model audio preprocessing initialization
 
void  ff_psy_preprocess (struct FFPsyPreprocessContext *ctx, float **audio, int channels)
  Preprocess several channel in audio frame in order to compress it better.
 
  Cleanup audio preprocessing module.
 

Macro Definition Documentation

#define PSY_MAX_BANDS   128

maximum possible number of bands

Definition at line 28 of file psymodel.h.

#define PSY_MAX_CHANS   20

maximum number of channels

Definition at line 30 of file psymodel.h.

#define AAC_CUTOFF (   s )    (s->bit_rate ? FFMIN3(4000 + s->bit_rate/8, 12000 + s->bit_rate/32, s->sample_rate / 2) : (s->sample_rate / 2))

Definition at line 32 of file psymodel.h.

Referenced by ff_psy_preprocess_init(), and psy_3gpp_init().

Function Documentation

int ff_psy_init ( FFPsyContextctx,
AVCodecContextavctx,
int  num_lens,
const uint8_t **  bands,
const int *  num_bands,
int  num_groups,
const uint8_tgroup_map 
)

Initialize psychoacoustic model.

Parameters
ctx model context
avctx codec context
num_lens number of possible frame lengths
bands scalefactor band lengths for all frame lengths
num_bands number of scalefactor bands for all frame lengths
num_groups number of channel groups
group_map array with # of channels in group - 1, for each group
Returns
zero if successful, a negative value if not

Definition at line 31 of file psymodel.c.

Referenced by aac_encode_init().

FFPsyChannelGroup* ff_psy_find_group ( FFPsyContextctx,
int  channel 
)

Determine what group a channel belongs to.

Parameters
ctx psymodel context
channel channel to locate the group for
Returns
pointer to the FFPsyChannelGroup this channel belongs to

Definition at line 66 of file psymodel.c.

Referenced by psy_3gpp_analyze().

void ff_psy_end ( FFPsyContextctx )

Cleanup model context at the end.

Parameters
ctx model context

Definition at line 76 of file psymodel.c.

Referenced by aac_encode_end().

struct FFPsyPreprocessContext* ff_psy_preprocess_init ( AVCodecContextavctx )
read

psychoacoustic model audio preprocessing initialization

Definition at line 96 of file psymodel.c.

Referenced by aac_encode_init().

void ff_psy_preprocess ( struct FFPsyPreprocessContextctx,
float **  audio,
int  channels 
)

Preprocess several channel in audio frame in order to compress it better.

Parameters
ctx preprocessing context
audio samples to be filtered (in place)
channels number of channel to preprocess

Definition at line 125 of file psymodel.c.

Referenced by aac_encode_frame().

void ff_psy_preprocess_end ( struct FFPsyPreprocessContextctx )

Cleanup audio preprocessing module.

Definition at line 138 of file psymodel.c.

Referenced by aac_encode_end().


Generated on Sat Jan 25 2014 19:52:14 for FFmpeg by   doxygen 1.8.2

AltStyle によって変換されたページ (->オリジナル) /