summaryrefslogtreecommitdiffstats
path: root/libhb/common.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2012-06-18 21:11:48 +0000
committerRodeo <[email protected]>2012-06-18 21:11:48 +0000
commitfc3e44b2ba28772fa559d39bd57b7a595a83292f (patch)
tree738449c393dcd8da6edf6881e53353b35e5c47b8 /libhb/common.c
parent510564b19b5a6d7ac77091cd02ec9c557941399f (diff)
libhb: drop HB_INPUT_CH_LAYOUT_*
AV_CH_LAYOUT_* works for us, and as its usage becomes more widespread in libhb, translating between the two formats gets increasingly tedious. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4754 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/common.c')
-rw-r--r--libhb/common.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/libhb/common.c b/libhb/common.c
index 87f4766bb..93c98ffa4 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -720,37 +720,35 @@ int hb_get_best_mixdown( uint32_t codec, int layout, int mixdown )
// Audio pass-thru. No mixdown.
return HB_AMIXDOWN_NONE;
}
- switch (layout & HB_INPUT_CH_LAYOUT_DISCRETE_NO_LFE_MASK)
+ switch (layout & ~AV_CH_LOW_FREQUENCY)
{
// mono input
- case HB_INPUT_CH_LAYOUT_MONO:
+ case AV_CH_LAYOUT_MONO:
best_mixdown = HB_AMIXDOWN_MONO;
break;
// Dolby Pro Logic (a.k.a. Dolby Surround), 4.0 channels (matrix-encoded)
// The A52 flags don't allow for a way to distinguish between DPL1 and
// DPL2 on a DVD so we always assume a DPL1 source for A52_DOLBY.
- case HB_INPUT_CH_LAYOUT_DOLBY:
+ case AV_CH_LAYOUT_STEREO_DOWNMIX:
// 3 or 4 discrete channels
- // case HB_INPUT_CH_LAYOUT_3F: // FIXME: can it be downmixed to Dolby?
- // case HB_INPUT_CH_LAYOUT_2F1R: // FIXME: can it be downmixed to Dolby?
- case HB_INPUT_CH_LAYOUT_2F2R:
- case HB_INPUT_CH_LAYOUT_3F1R:
- // a52dec and libdca can't upmix to 6ch,
- // so we must downmix these.
- // libdca only supports DPLII if the source is 3F2R to begin with
+ case AV_CH_LAYOUT_2_1:
+ case AV_CH_LAYOUT_2_2:
+ case AV_CH_LAYOUT_QUAD:
+ case AV_CH_LAYOUT_4POINT0:
+ case AV_CH_LAYOUT_SURROUND:
+ // a52dec and libdca can't upmix to 6ch, so we must downmix these.
+ // libdca only supports DPLII if the source is 3F2R to begin with.
best_mixdown = HB_AMIXDOWN_DOLBY;
break;
// 5 to 8 discrete channels
- case HB_INPUT_CH_LAYOUT_4F2R:
- case HB_INPUT_CH_LAYOUT_3F4R:
- case HB_INPUT_CH_LAYOUT_3F2R:
- if (!(layout & HB_INPUT_CH_LAYOUT_HAS_LFE))
+ case AV_CH_LAYOUT_5POINT0:
+ case AV_CH_LAYOUT_7POINT0:
+ if (!(layout & AV_CH_LOW_FREQUENCY))
{
// we don't do 5-channel discrete
- // a52dec and libdca can't upmix to 6ch,
- // so we must downmix this.
+ // a52dec and libdca can't upmix to 6ch, so we must downmix this.
best_mixdown = HB_AMIXDOWN_DOLBYPLII;
}
else