Commit d960ffa1 authored by Jan Kiene's avatar Jan Kiene
Browse files

accept EULER2QUAT_FIX

parent fb4a10a3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -179,7 +179,6 @@
#define NONBE_FIX_539_MASA_384K_CHIRP                   /* Nokia: issue 539, puts the normalization of the energy ratios at the correct place, affect MASA 384k only */

/* Fixes for bugs found during split rendering contribution development */
#define EULER2QUAT_FIX                                  /* Dlb: Fix for Euler2Quat()/Quat2EulerDegree functions */
#define SBA_CREND_ROT_OPT                               /* Dlb: Optimisation for rotateFrameSba() used for SHD rotations in external renderer */
#define TD_TDREND_FIX_NULLPTR_ACCESS                    /* FhG: avoid nullptr access in ivas_rend_TDObjRendOpen */
#define TD_REND_FIX_DIV_BY_ZERO                         /* FhG: avoid division by zero in sincResample fn */
+0 −5
Original line number Diff line number Diff line
@@ -1195,11 +1195,6 @@ ivas_error IVAS_DEC_FeedHeadTrackData(
    {
        /* check for Euler angle signaling */
#ifdef SPLIT_REND_WITH_HEAD_ROT
#ifndef EULER2QUAT_FIX
        /* TODO: temp change until Euler2Quat() is fixed*/
        if ( ( hIvasDec->st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) &&
             ( hIvasDec->st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
#endif
#endif
        {
            if ( orientation[i].w == -3.0f )
+0 −6
Original line number Diff line number Diff line
@@ -225,17 +225,11 @@ void Quat2EulerDegree(
{
    if ( quat.w != -3.0 )
    {
#ifdef EULER2QUAT_FIX
        float p;
#endif
        *yaw = atan2f( 2 * ( quat.w * quat.x + quat.y * quat.z ), 1 - 2 * ( quat.x * quat.x + quat.y * quat.y ) );
#ifdef EULER2QUAT_FIX
        p = 2 * ( quat.w * quat.y - quat.z * quat.x );
        p = max( -1.0f, min( 1.0f, p ) );
        *pitch = asinf( p );
#else
        *pitch = asinf( 2 * ( quat.w * quat.y - quat.z * quat.x ) );
#endif
        *roll = atan2f( 2 * ( quat.w * quat.z + quat.x * quat.y ), 1 - 2 * ( quat.y * quat.y + quat.z * quat.z ) );
        *yaw *= _180_OVER_PI;
        *pitch *= _180_OVER_PI;
+0 −4
Original line number Diff line number Diff line
@@ -5013,11 +5013,7 @@ ivas_error IVAS_REND_SetHeadRotation(
                     ( hIvasRend->inputsSplitPost[0].base.inConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
                     ( hIvasRend->inputsSplitPost[0].base.inConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
                {
#ifndef EULER2QUAT_FIX
                    rotQuat = headRot[i]; /* TODO: temp change until Euler2Quat() is fixed*/
#else
                    Euler2Quat( deg2rad( headRot[i].x ), deg2rad( headRot[i].y ), deg2rad( headRot[i].z ), &rotQuat );
#endif
                }
                else
#endif