Commit ca1b7afd authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Simple: slightly different matrixes for 7.x and 6.1 stereo downmix

parent 39fd6666
...@@ -116,8 +116,8 @@ static void DoWork_7_x_to_2_0( filter_t * p_filter, block_t * p_in_buf, block_t ...@@ -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; const float *p_src = (const float *)p_in_buf->p_buffer;
for( int i = p_in_buf->i_nb_samples; i--; ) 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.7071 + 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[1] + p_src[3] / 4 + p_src[5] / 4;
p_src += 7; 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 ...@@ -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; const float *p_src = (const float *)p_in_buf->p_buffer;
for( int i = p_in_buf->i_nb_samples; i--; ) 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[0] + p_src[3] + 0.7071 * (p_src[2] + p_src[5]);
*p_dest++ = p_src[1] + 0.7071 * (p_src[4] + (p_src[2] + p_src[5]) / 2); *p_dest++ = p_src[1] + p_src[4] + 0.7071 * (p_src[2] + p_src[5]);
p_src += 6; p_src += 6;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment