Go to the documentation of this file.
29 const uint8_t **
bands,
const int* num_bands,
30 int num_groups,
const uint8_t *group_map)
38 ctx->num_bands =
av_memdup(num_bands, num_lens *
sizeof(
ctx->num_bands[0]));
41 if (!
ctx->ch || !
ctx->group || !
ctx->bands || !
ctx->num_bands) {
47 for (
i = 0;
i < num_groups;
i++) {
52 ctx->group[
i].num_ch = group_map[
i] + 1;
53 for (j = 0; j <
ctx->group[
i].num_ch * 2; j++)
54 ctx->group[
i].ch[j] = &
ctx->ch[k++];
57 switch (
ctx->avctx->codec_id) {
63 return ctx->model->init(
ctx);
72 ch +=
ctx->group[
i++].num_ch;
74 return &
ctx->group[
i-1];
79 if (
ctx->model &&
ctx->model->end)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
int nb_channels
Number of channels in this layout.
void * av_memdup(const void *p, size_t size)
Duplicate a buffer with av_malloc().
AVChannelLayout ch_layout
Audio channel layout.
av_cold void ff_psy_end(FFPsyContext *ctx)
Cleanup model context at the end.
const FFPsyModel ff_aac_psy_model
static const float bands[]
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.
#define i(width, name, range_min, range_max)
int cutoff
Audio cutoff bandwidth (0 means "automatic")
void * av_calloc(size_t nmemb, size_t size)
psychoacoustic information for an arbitrary group of channels
main external API structure.
codec-specific psychoacoustic model implementation
FFPsyChannelGroup * ff_psy_find_group(FFPsyContext *ctx, int channel)
Determine what group a channel belongs to.
context used by psychoacoustic model