[vlc-commits] araw: add 8.1 support (fixes #4896)
Rémi Denis-Courmont
git at videolan.org
Thu Nov 1 20:47:15 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Nov 1 21:44:38 2012 +0200| [779f3102406bd7bccb0c7687acffef3eb5e8cfa3] | committer: Rémi Denis-Courmont
araw: add 8.1 support (fixes #4896)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=779f3102406bd7bccb0c7687acffef3eb5e8cfa3
---
include/vlc_es.h | 1 +
modules/codec/araw.c | 24 ++++++------------------
2 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/include/vlc_es.h b/include/vlc_es.h
index 0660f63..23312c6 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -123,6 +123,7 @@ struct audio_format_t
#define AOUT_CHANS_6_0 (AOUT_CHANS_4_0 | AOUT_CHANS_MIDDLE)
#define AOUT_CHANS_7_0 (AOUT_CHANS_6_0 | AOUT_CHAN_CENTER)
#define AOUT_CHANS_7_1 (AOUT_CHANS_5_1 | AOUT_CHANS_MIDDLE)
+#define AOUT_CHANS_8_1 (AOUT_CHANS_7_1 | AOUT_CHAN_REARCENTER)
#define AOUT_CHANS_4_0_MIDDLE (AOUT_CHANS_FRONT | AOUT_CHANS_MIDDLE)
#define AOUT_CHANS_4_CENTER_REAR (AOUT_CHANS_FRONT | AOUT_CHANS_CENTER)
diff --git a/modules/codec/araw.c b/modules/codec/araw.c
index 67c07fd..aabec31 100644
--- a/modules/codec/araw.c
+++ b/modules/codec/araw.c
@@ -74,24 +74,12 @@ struct decoder_sys_t
date_t end_date;
};
-static const int pi_channels_maps[] =
+static const uint16_t pi_channels_maps[] =
{
0,
- AOUT_CHAN_CENTER,
- AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT,
- AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER,
- AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_REARLEFT
- | AOUT_CHAN_REARRIGHT,
- AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER
- | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT,
- AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER
- | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT | AOUT_CHAN_LFE,
- AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER
- | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT
- | AOUT_CHAN_MIDDLELEFT | AOUT_CHAN_MIDDLERIGHT,
- AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER
- | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT
- | AOUT_CHAN_MIDDLELEFT | AOUT_CHAN_MIDDLERIGHT | AOUT_CHAN_LFE
+ AOUT_CHAN_CENTER, AOUT_CHANS_2_0, AOUT_CHANS_3_0,
+ AOUT_CHANS_4_0, AOUT_CHANS_5_0, AOUT_CHANS_5_1,
+ AOUT_CHANS_7_0, AOUT_CHANS_7_1, AOUT_CHANS_8_1,
};
static const int16_t ulawtos16[256] =
@@ -214,9 +202,9 @@ static int DecoderOpen( vlc_object_t *p_this )
}
if( p_dec->fmt_in.audio.i_channels <= 0 ||
- p_dec->fmt_in.audio.i_channels > 8 )
+ p_dec->fmt_in.audio.i_channels > 9 )
{
- msg_Err( p_dec, "bad channels count (1-8): %i",
+ msg_Err( p_dec, "bad channels count (1-9): %i",
p_dec->fmt_in.audio.i_channels );
return VLC_EGENERIC;
}
More information about the vlc-commits
mailing list