summaryrefslogtreecommitdiff
path: root/libavcodec/ac3dec.h
diff options
context:
space:
mode:
authorJean-Francois Thibert <jfthibert@google.com>2014-08-26 19:16:06 -0400
committerMichael Niedermayer <michaelni@gmx.at>2014-08-27 14:31:39 +0200
commit12df9b9a151026c4b382df8852fad38165b49f95 (patch)
tree5b2f03eae9dc3e3eb44cdb0b1cd930a5d0e03012 /libavcodec/ac3dec.h
parent7a67ab5cba8ed5509be5d058fe9e5612ef39d3b0 (diff)
downloadffmpeg-12df9b9a151026c4b382df8852fad38165b49f95.tar.gz
Improved AC3 decoder level support (heavy drc, dialnorm)
Added support for AC3 heavy dynamic range compression used to restrict the output range and added a setting to specify the output target level and use the dialog normalization field to apply it in the digital domain. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ac3dec.h')
-rw-r--r--libavcodec/ac3dec.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/ac3dec.h b/libavcodec/ac3dec.h
index 3ac44ee17e..a213bc0870 100644
--- a/libavcodec/ac3dec.h
+++ b/libavcodec/ac3dec.h
@@ -84,6 +84,9 @@ typedef struct AC3DecodeContext {
int bitstream_mode; ///< bitstream mode (bsmod)
int channel_mode; ///< channel mode (acmod)
int lfe_on; ///< lfe channel in use
+ int dialog_normalization[2]; ///< dialog level in dBFS (dialnorm)
+ int compression_exists[2]; ///< compression field is valid for frame (compre)
+ int compression_gain[2]; ///< gain to apply for heavy compression (compr)
int channel_map; ///< custom channel map
int preferred_downmix; ///< Preferred 2-channel downmix mode (dmixmod)
int center_mix_level; ///< Center mix level index
@@ -103,6 +106,8 @@ typedef struct AC3DecodeContext {
float ltrt_surround_mix_level;
float loro_center_mix_level;
float loro_surround_mix_level;
+ int target_level; ///< target level in dBFS
+ float level_gain[2];
///@name Frame syntax parameters
int snr_offset_strategy; ///< SNR offset strategy (snroffststr)
@@ -161,6 +166,8 @@ typedef struct AC3DecodeContext {
///@name Dynamic range
INTFLOAT dynamic_range[2]; ///< dynamic range
INTFLOAT drc_scale; ///< percentage of dynamic range compression to be applied
+ int heavy_compression; ///< apply heavy compression
+ INTFLOAT heavy_dynamic_range[2]; ///< heavy dynamic range compression
///@}
///@name Bandwidth