FFmpeg
downmix_info.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Tim Walker <tdskywalker@gmail.com>
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef AVUTIL_DOWNMIX_INFO_H
22 #define AVUTIL_DOWNMIX_INFO_H
23 
24 #include "frame.h"
25 
26 /**
27  * @file
28  * audio downmix medatata
29  */
30 
31 /**
32  * @addtogroup lavu_audio
33  * @{
34  */
35 
36 /**
37  * @defgroup downmix_info Audio downmix metadata
38  * @{
39  */
40 
41 /**
42  * Possible downmix types.
43  */
45  AV_DOWNMIX_TYPE_UNKNOWN, /**< Not indicated. */
46  AV_DOWNMIX_TYPE_LORO, /**< Lo/Ro 2-channel downmix (Stereo). */
47  AV_DOWNMIX_TYPE_LTRT, /**< Lt/Rt 2-channel downmix, Dolby Surround compatible. */
48  AV_DOWNMIX_TYPE_DPLII, /**< Lt/Rt 2-channel downmix, Dolby Pro Logic II compatible. */
49  AV_DOWNMIX_TYPE_NB /**< Number of downmix types. Not part of ABI. */
50 };
51 
52 /**
53  * This structure describes optional metadata relevant to a downmix procedure.
54  *
55  * All fields are set by the decoder to the value indicated in the audio
56  * bitstream (if present), or to a "sane" default otherwise.
57  */
58 typedef struct AVDownmixInfo {
59  /**
60  * Type of downmix preferred by the mastering engineer.
61  */
63 
64  /**
65  * Absolute scale factor representing the nominal level of the center
66  * channel during a regular downmix.
67  */
69 
70  /**
71  * Absolute scale factor representing the nominal level of the center
72  * channel during an Lt/Rt compatible downmix.
73  */
75 
76  /**
77  * Absolute scale factor representing the nominal level of the surround
78  * channels during a regular downmix.
79  */
81 
82  /**
83  * Absolute scale factor representing the nominal level of the surround
84  * channels during an Lt/Rt compatible downmix.
85  */
87 
88  /**
89  * Absolute scale factor representing the level at which the LFE data is
90  * mixed into L/R channels during downmixing.
91  */
92  double lfe_mix_level;
94 
95 /**
96  * Get a frame's AV_FRAME_DATA_DOWNMIX_INFO side data for editing.
97  *
98  * If the side data is absent, it is created and added to the frame.
99  *
100  * @param frame the frame for which the side data is to be obtained or created
101  *
102  * @return the AVDownmixInfo structure to be edited by the caller, or NULL if
103  * the structure cannot be allocated.
104  */
106 
107 /**
108  * @}
109  */
110 
111 /**
112  * @}
113  */
114 
115 #endif /* AVUTIL_DOWNMIX_INFO_H */
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:389
AVDownmixInfo::surround_mix_level_ltrt
double surround_mix_level_ltrt
Absolute scale factor representing the nominal level of the surround channels during an Lt/Rt compati...
Definition: downmix_info.h:86
AV_DOWNMIX_TYPE_UNKNOWN
@ AV_DOWNMIX_TYPE_UNKNOWN
Not indicated.
Definition: downmix_info.h:45
AVDownmixInfo
This structure describes optional metadata relevant to a downmix procedure.
Definition: downmix_info.h:58
AVDownmixInfo::surround_mix_level
double surround_mix_level
Absolute scale factor representing the nominal level of the surround channels during a regular downmi...
Definition: downmix_info.h:80
AVDownmixInfo::center_mix_level_ltrt
double center_mix_level_ltrt
Absolute scale factor representing the nominal level of the center channel during an Lt/Rt compatible...
Definition: downmix_info.h:74
frame.h
AVDownmixType
AVDownmixType
Possible downmix types.
Definition: downmix_info.h:44
AVDownmixInfo::lfe_mix_level
double lfe_mix_level
Absolute scale factor representing the level at which the LFE data is mixed into L/R channels during ...
Definition: downmix_info.h:92
AVDownmixInfo::center_mix_level
double center_mix_level
Absolute scale factor representing the nominal level of the center channel during a regular downmix.
Definition: downmix_info.h:68
AVDownmixInfo::preferred_downmix_type
enum AVDownmixType preferred_downmix_type
Type of downmix preferred by the mastering engineer.
Definition: downmix_info.h:62
AV_DOWNMIX_TYPE_LORO
@ AV_DOWNMIX_TYPE_LORO
Lo/Ro 2-channel downmix (Stereo).
Definition: downmix_info.h:46
AV_DOWNMIX_TYPE_NB
@ AV_DOWNMIX_TYPE_NB
Number of downmix types.
Definition: downmix_info.h:49
frame
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
Definition: filter_design.txt:264
AV_DOWNMIX_TYPE_DPLII
@ AV_DOWNMIX_TYPE_DPLII
Lt/Rt 2-channel downmix, Dolby Pro Logic II compatible.
Definition: downmix_info.h:48
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.
Definition: downmix_info.c:24
AV_DOWNMIX_TYPE_LTRT
@ AV_DOWNMIX_TYPE_LTRT
Lt/Rt 2-channel downmix, Dolby Surround compatible.
Definition: downmix_info.h:47