Commit 92dda2de authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge branch '1971_basop_port_mr_2219_ext_orient_sanity_check' into 'main'

Port 378 - Float MR 2219 to BASOP

See merge request !2169
parents 34259621 85756094
Loading
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -130,6 +130,9 @@ typedef enum
    IVAS_ERR_BITSTREAM_READER_INVALID_FORMAT,
    IVAS_ERR_NO_FILE_OPEN,
    IVAS_ERR_SAMPLING_RATE_UNKNOWN,
#ifdef FIX_1370_EXTERNAL_ORIENTATION_CHECK
    IVAS_ERR_EXTERNAL_ORIENTATION_INVALID_FORMAT,
#endif

    /*----------------------------------------*
     *    renderer (lib_rend only)            *
@@ -269,6 +272,10 @@ static inline const char *ivas_error_to_string( ivas_error error_code )
            return "Invalid input format";
        case IVAS_ERR_INVALID_INDEX:
            return "Invalid index";
#ifdef FIX_1370_EXTERNAL_ORIENTATION_CHECK
        case IVAS_ERR_EXTERNAL_ORIENTATION_INVALID_FORMAT:
            return "Euler angles were detected in the input but only Quaternions are supported";
#endif
        default:
            break;
    }
+1 −0
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@
#define UNIFIED_DECODING_PATHS_LEFTOVERS                /* VA: issue 880: remove leftovers after NONBE_UNIFIED_DECODING_PATHS */
#define FIX_NCHAN_BUFFERS                               /* VA: issue 1322: Correct the number of float buffers (channels) at the decoder */
#define FIX_RENDERER_STACK                              /* VA: issue 1322: reduction of renderers' buffers size */
#define FIX_1370_EXTERNAL_ORIENTATION_CHECK             /* Nokia: add sanity check for Euler angles for external orientations */

// object-editing feature porting
#define TMP_FIX_SPLIT_REND                              // temporary fix to split-rendering (it follows the later state of the framework but it is needed now because of current test-conditions)
+8 −0
Original line number Diff line number Diff line
@@ -193,6 +193,14 @@ ivas_error ExternalOrientationFileReading(
    }

    ( externalOrientationReader->frameCounter )++;
#ifdef FIX_1370_EXTERNAL_ORIENTATION_CHECK

    /* Only Quaternion orientations are supported, raise an error if Euler angles are detected in the input */
    if ( w == -3.0f )
    {
        return IVAS_ERR_EXTERNAL_ORIENTATION_INVALID_FORMAT;
    }
#endif

    pQuaternion->w_fx = float_to_fix( w, Q29 );
    pQuaternion->x_fx = float_to_fix( x, Q29 );