22 #ifndef AVCODEC_PSYMODEL_H 23 #define AVCODEC_PSYMODEL_H 28 #define PSY_MAX_BANDS 128 30 #define PSY_MAX_CHANS 20 35 #define AAC_CUTOFF_FROM_BITRATE(bit_rate,channels,sample_rate) (bit_rate ? FFMIN3(FFMIN3( \ 36 FFMAX(bit_rate/channels/5, bit_rate/channels*15/32 - 5500), \ 37 3000 + bit_rate/channels/4, \ 38 12000 + bit_rate/channels/16), \ 40 sample_rate / 2): (sample_rate / 2)) 41 #define AAC_CUTOFF(s) ( \ 42 (s->flags & AV_CODEC_FLAG_QSCALE) \ 43 ? s->sample_rate / 2 \ 44 : AAC_CUTOFF_FROM_BITRATE(s->bit_rate, s->channels, s->sample_rate) \ 71 uint8_t coupling[PSY_MAX_BANDS];
158 const uint8_t **bands,
const int *num_bands,
159 int num_groups,
const uint8_t *group_map);
int num_groups
number of channel groups
Definition: psymodel.h:95
uint8_t ** bands
scalefactor band sizes for possible frame sizes
Definition: psymodel.h:98
FFPsyChannelGroup * group
channel group information
Definition: psymodel.h:94
psychoacoustic information for an arbitrary group of channels
Definition: psymodel.h:68
int alloc
number of bits allocated by the psy, or -1 if no allocation was done
Definition: psymodel.h:105
Definition: psymodel.c:93
int * num_bands
number of scalefactor bands for possible frame sizes
Definition: psymodel.h:99
int * window_sizes
sequence of window sizes inside one frame (for eg. WMA)
Definition: psymodel.h:83
int size
size of the bitresevoir in bits
Definition: psymodel.h:103
context used by psychoacoustic model
Definition: psymodel.h:89
single band psychoacoustic information
Definition: psymodel.h:50
single channel psychoacoustic information
Definition: psymodel.h:60
int num_windows
number of windows in a frame
Definition: psymodel.h:80
codec-specific psychoacoustic model implementation
Definition: psymodel.h:114
uint8_t num_ch
number of channels in this group
Definition: psymodel.h:70
float entropy
total PE for this channel
Definition: psymodel.h:62
Libavcodec external API header.
main external API structure.
Definition: avcodec.h:1518
void * model_priv_data
psychoacoustic model implementation private data
Definition: psymodel.h:108
int bits
number of bits used in the bitresevoir
Definition: psymodel.h:104
int window_shape
window shape (sine/KBD/whatever)
Definition: psymodel.h:79
int cutoff
lowpass frequency cutoff for analysis
Definition: psymodel.h:96
const struct FFPsyModel * model
encoder-specific model functions
Definition: psymodel.h:91
windowing related information
Definition: psymodel.h:77
channel
Use these values when setting the channel map with ebur128_set_channel().
Definition: ebur128.h:39
int num_lens
number of scalefactor band sets
Definition: psymodel.h:100
FFPsyChannel * ch
single channel information
Definition: psymodel.h:93
AVCodecContext * avctx
encoder context
Definition: psymodel.h:90