[vlc-commits] Simple: slightly different matrixes for 7.x and 6.1 stereo downmix
Jean-Baptiste Kempf
git at videolan.org
Thu Apr 18 16:10:08 CEST 2013
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Apr 18 16:09:48 2013 +0200| [ca1b7afd3d824e4789c57a01aa50bdd12a67adfc] | committer: Jean-Baptiste Kempf
Simple: slightly different matrixes for 7.x and 6.1 stereo downmix
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ca1b7afd3d824e4789c57a01aa50bdd12a67adfc
---
modules/audio_filter/channel_mixer/simple.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/audio_filter/channel_mixer/simple.c b/modules/audio_filter/channel_mixer/simple.c
index 3e6b013..f1ec884 100644
--- a/modules/audio_filter/channel_mixer/simple.c
+++ b/modules/audio_filter/channel_mixer/simple.c
@@ -116,8 +116,8 @@ static void DoWork_7_x_to_2_0( filter_t * p_filter, block_t * p_in_buf, block_t
const float *p_src = (const float *)p_in_buf->p_buffer;
for( int i = p_in_buf->i_nb_samples; i--; )
{
- *p_dest++ = p_src[6] + 0.5 * p_src[0] + p_src[2] / 4 + p_src[4] / 4;
- *p_dest++ = p_src[6] + 0.5 * p_src[1] + p_src[3] / 4 + p_src[5] / 4;
+ *p_dest++ = p_src[6] * 0.7071 + p_src[0] + p_src[2] / 4 + p_src[4] / 4;
+ *p_dest++ = p_src[6] * 0.7071 + p_src[1] + p_src[3] / 4 + p_src[5] / 4;
p_src += 7;
@@ -131,8 +131,8 @@ static void DoWork_6_1_to_2_0( filter_t * p_filter, block_t * p_in_buf, block_t
const float *p_src = (const float *)p_in_buf->p_buffer;
for( int i = p_in_buf->i_nb_samples; i--; )
{
- *p_dest++ = p_src[0] + 0.7071 * (p_src[3] + (p_src[2] + p_src[5]) / 2);
- *p_dest++ = p_src[1] + 0.7071 * (p_src[4] + (p_src[2] + p_src[5]) / 2);
+ *p_dest++ = p_src[0] + p_src[3] + 0.7071 * (p_src[2] + p_src[5]);
+ *p_dest++ = p_src[1] + p_src[4] + 0.7071 * (p_src[2] + p_src[5]);
p_src += 6;
More information about the vlc-commits
mailing list