summaryrefslogtreecommitdiffstats
path: root/libhb/common.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2014-01-25 23:24:48 +0000
committerRodeo <[email protected]>2014-01-25 23:24:48 +0000
commitd7ad9c9682d83dc8f59bd6ff86d3ec422c1f6adb (patch)
tree2dffccb32b266858c1d52f3d63463e83c049937a /libhb/common.c
parentebf885ce8a75dd392e2acab9a8a0e29032e05f71 (diff)
decavcodec: DRC support.
Adds DRC support for E-AC-3 audio (as well as any future libavcodec decoders with DRC support). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5995 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/common.c')
-rw-r--r--libhb/common.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libhb/common.c b/libhb/common.c
index a0e6b7a58..813ece48e 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -3709,6 +3709,28 @@ int hb_subtitle_can_pass( int source, int mux )
}
}
+int hb_audio_can_apply_drc(uint32_t codec, uint32_t codec_param, int encoder)
+{
+ if (encoder & HB_ACODEC_PASS_FLAG)
+ {
+ // can't apply DRC to passthrough audio
+ return 0;
+ }
+ else if (codec & HB_ACODEC_FF_MASK)
+ {
+ return (codec_param == AV_CODEC_ID_AC3 ||
+ codec_param == AV_CODEC_ID_EAC3);
+ }
+ else if (codec == HB_ACODEC_AC3)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
/**********************************************************************
* hb_metadata_init
**********************************************************************