22 #ifndef AVCODEC_PSYMODEL_H 23 #define AVCODEC_PSYMODEL_H 28 #define PSY_MAX_BANDS 128 30 #define PSY_MAX_CHANS 20 141 const uint8_t **bands,
const int *num_bands,
142 int num_groups,
const uint8_t *group_map);
#define PSY_MAX_BANDS
maximum possible number of bands
int num_groups
number of channel groups
uint8_t ** bands
scalefactor band sizes for possible frame sizes
FFPsyChannelGroup * group
channel group information
psychoacoustic information for an arbitrary group of channels
int * num_bands
number of scalefactor bands for possible frame sizes
int * window_sizes
sequence of window sizes inside one frame (for eg. WMA)
struct FFPsyPreprocessContext * ff_psy_preprocess_init(AVCodecContext *avctx)
psychoacoustic model audio preprocessing initialization
int size
size of the bitresevoir in bits
context used by psychoacoustic model
single band psychoacoustic information
single channel psychoacoustic information
int num_windows
number of windows in a frame
codec-specific psychoacoustic model implementation
uint8_t num_ch
number of channels in this group
void ff_psy_preprocess_end(struct FFPsyPreprocessContext *ctx)
Cleanup audio preprocessing module.
float entropy
total PE for this channel
Libavcodec external API header.
main external API structure.
static void(WINAPI *cond_broadcast)(pthread_cond_t *cond)
void * model_priv_data
psychoacoustic model implementation private data
int bits
number of bits used in the bitresevoir
#define PSY_MAX_CHANS
maximum number of channels
FFPsyChannelGroup * ff_psy_find_group(FFPsyContext *ctx, int channel)
Determine what group a channel belongs to.
int window_shape
window shape (sine/KBD/whatever)
const struct FFPsyModel * model
encoder-specific model functions
void ff_psy_end(FFPsyContext *ctx)
Cleanup model context at the end.
windowing related information
static av_cold int init(AVCodecParserContext *s)
int num_lens
number of scalefactor band sets
FFPsyChannel * ch
single channel information
static int analyze(const uint8_t *buf, int size, int packet_size, int *index)
AVCodecContext * avctx
encoder context
void ff_psy_preprocess(struct FFPsyPreprocessContext *ctx, float **audio, int channels)
Preprocess several channel in audio frame in order to compress it better.
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.