summaryrefslogtreecommitdiff
path: root/libavcodec/ac3.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/ac3.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/ac3.h')
-rw-r--r--libavcodec/ac3.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/ac3.h b/libavcodec/ac3.h
index 542f79d711..871640b8c8 100644
--- a/libavcodec/ac3.h
+++ b/libavcodec/ac3.h
@@ -67,7 +67,8 @@
#define AC3_RENAME(x) x ## _fixed
#define AC3_NORM(norm) (1<<24)/(norm)
#define AC3_MUL(a,b) ((((int64_t) (a)) * (b))>>12)
-#define AC3_RANGE(x) (x)
+#define AC3_RANGE(x) (x|((x&128)<<1))
+#define AC3_HEAVY_RANGE(x) (x<<1)
#define AC3_DYNAMIC_RANGE(x) (x)
#define AC3_SPX_BLEND(x) (x)
#define AC3_DYNAMIC_RANGE1 0
@@ -86,6 +87,7 @@
#define AC3_NORM(norm) (1.0f/(norm))
#define AC3_MUL(a,b) ((a) * (b))
#define AC3_RANGE(x) (dynamic_range_tab[(x)])
+#define AC3_HEAVY_RANGE(x) (heavy_dynamic_range_tab[(x)])
#define AC3_DYNAMIC_RANGE(x) (powf(x, s->drc_scale))
#define AC3_SPX_BLEND(x) (x)* (1.0f/32)
#define AC3_DYNAMIC_RANGE1 1.0f