Commit 86dace7b authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[fix] bug in stereo to ambisonics rendering

parent 1ed3f9a6
Loading
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -964,8 +964,10 @@ ivas_error ivas_jbm_dec_render(
            {
                for ( n = 0; n < *nSamplesRendered; n++ )
                {
                    p_output[0][n] = 0.5f * ( p_output[0][n] + p_output[1][n] ); /* W = 0.5 * ( L + R ) */
                    p_output[1][n] = 0.5f * ( p_output[0][n] - p_output[1][n] ); /* Y = 0.5 * ( L - R ) */
                    float tmp;
                    tmp = p_output[0][n];
                    p_output[0][n] = 0.5f * ( tmp + p_output[1][n] ); /* W = 0.5 * ( L + R ) */
                    p_output[1][n] = 0.5f * ( tmp - p_output[1][n] ); /* Y = 0.5 * ( L - R ) */
                }
            }
        }