FFmpeg
Loading...
Searching...
No Matches
Audio downmix metadata

Data Structures

struct  AVDownmixInfo
 This structure describes optional metadata relevant to a downmix procedure. More...
 
struct  AVDownmixMatrix
 This structure describes optional metadata relevant to a downmix procedure in the form of a remixing matrix allocated as an array of AVDownmixCoeff. More...
 

Typedefs

typedef double AVDownmixCoeff
 Data type for storing coefficients, which are allocated as a part of AVDownmixMatrix and should be retrieved with av_downmix_matrix_coeff.
 

Enumerations

enum  AVDownmixType {
  AV_DOWNMIX_TYPE_UNKNOWN , AV_DOWNMIX_TYPE_LORO , AV_DOWNMIX_TYPE_LTRT , AV_DOWNMIX_TYPE_DPLII ,
  AV_DOWNMIX_TYPE_NB
}
 Possible downmix types. More...
 

Functions

AVDownmixInfoav_downmix_info_update_side_data (AVFrame *frame)
 Get a frame's AV_FRAME_DATA_DOWNMIX_INFO side data for editing.
 
static av_always_inline AVDownmixCoeffav_downmix_matrix_coeff (AVDownmixMatrix *dm, unsigned int out, unsigned int in)
 Get a pointer to the coeff that represents the weight of input channel in in output channel out.
 
AVDownmixMatrixav_downmix_matrix_alloc (enum AVDownmixType type, int in_ch_count, size_t *out_size)
 Allocates memory for AVDownmixMatrix of the given type, plus an array of in_ch_count times the implicit output channel count from type of AVDownmixCoeff and initializes the variables.
 

Detailed Description

Typedef Documentation

◆ AVDownmixCoeff

Data type for storing coefficients, which are allocated as a part of AVDownmixMatrix and should be retrieved with av_downmix_matrix_coeff.

Definition at line 144 of file downmix_info.h.

Enumeration Type Documentation

◆ AVDownmixType

Possible downmix types.

Enumerator
AV_DOWNMIX_TYPE_UNKNOWN 

Not indicated.

AV_DOWNMIX_TYPE_LORO 

Lo/Ro 2-channel downmix (Stereo).

AV_DOWNMIX_TYPE_LTRT 

Lt/Rt 2-channel downmix, Dolby Surround compatible.

AV_DOWNMIX_TYPE_DPLII 

Lt/Rt 2-channel downmix, Dolby Pro Logic II compatible.

AV_DOWNMIX_TYPE_NB 

Number of downmix types.

Not part of ABI.

Definition at line 45 of file downmix_info.h.

Function Documentation

◆ av_downmix_info_update_side_data()

AVDownmixInfo * av_downmix_info_update_side_data ( AVFrame * frame)

Get a frame's AV_FRAME_DATA_DOWNMIX_INFO side data for editing.

If the side data is absent, it is created and added to the frame.

Parameters
framethe frame for which the side data is to be obtained or created
Returns
the AVDownmixInfo structure to be edited by the caller, or NULL if the structure cannot be allocated.

Definition at line 25 of file downmix_info.c.

Referenced by ac3_decode_frame().

◆ av_downmix_matrix_coeff()

static av_always_inline AVDownmixCoeff * av_downmix_matrix_coeff ( AVDownmixMatrix * dm,
unsigned int out,
unsigned int in )
static

Get a pointer to the coeff that represents the weight of input channel in in output channel out.

in must be between 0 and in_ch_count - 1. out must be between 0 and the implicit output channel count from downmix_type - 1.

Definition at line 154 of file downmix_info.h.

Referenced by dump_downmix_matrix(), and ff_dca_export_downmix_matrix().

◆ av_downmix_matrix_alloc()

AVDownmixMatrix * av_downmix_matrix_alloc ( enum AVDownmixType type,
int in_ch_count,
size_t * out_size )

Allocates memory for AVDownmixMatrix of the given type, plus an array of in_ch_count times the implicit output channel count from type of AVDownmixCoeff and initializes the variables.

Can be freed with a normal av_free() call.

Parameters
out_sizeif non-NULL, the size in bytes of the resulting data array is written here.

Definition at line 53 of file downmix_info.c.

Referenced by ff_dca_export_downmix_matrix().