Commit c4f42b4f authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Handling incomplete early reflections configuration

parent 947aac89
Loading
Loading
Loading
Loading
+7 −11
Original line number Diff line number Diff line
@@ -1830,7 +1830,7 @@ ivas_error RenderConfigReader_read(
    uint32_t fgHasMethod, fgHasNBands, fgHasFreqs, fgHasDefaultGrid, fgHasStartFreq, fgHasFreqHop;
    uint32_t aeHasFgIdx, aeHasPredelay, aeHasRt60, aeHasDsr;
#ifdef CONTROL_METADATA_EARLY_REFLECTIONS
    uint32_t aeHasER, aeHasERsize, aeHasERabs;
    uint32_t aeHasERsize, aeHasERabs;
#endif
#else
    int16_t nBandsInput;
@@ -2206,7 +2206,7 @@ ivas_error RenderConfigReader_read(

                aeHasFgIdx = aeHasPredelay = aeHasRt60 = aeHasDsr = FALSE;
#ifdef CONTROL_METADATA_EARLY_REFLECTIONS
                aeHasER = aeHasERsize = aeHasERabs = FALSE;
                aeHasERsize = aeHasERabs = FALSE;
#endif
                params_idx = 0;
                pValue = (char *) calloc( strlen( pParams ), sizeof( char ) );
@@ -2302,7 +2302,7 @@ ivas_error RenderConfigReader_read(
                        if ( pRenderConfigReader->pAE[acIdx].pEarlyReflections == NULL )
                        {
#ifdef DEBUGGING
                            fprintf( stderr, "Rendering configuration: early reflections absorption coefficients specified without room size preceding." );
                            fprintf( stderr, "Rendering configuration: early reflections absorption coefficients specified without room size preceding.\n\n" );
#endif
                            return IVAS_ERR_INVALID_RENDER_CONFIG;
                        }
@@ -2322,7 +2322,7 @@ ivas_error RenderConfigReader_read(
                        if ( pRenderConfigReader->pAE[acIdx].pEarlyReflections == NULL )
                        {
#ifdef DEBUGGING
                            fprintf( stderr, "Rendering configuration: early reflections listener origin specified without room size preceding." );
                            fprintf( stderr, "Rendering configuration: early reflections listener origin specified without room size preceding.\n\n" );
#endif
                            return IVAS_ERR_INVALID_RENDER_CONFIG;
                        }
@@ -2344,7 +2344,7 @@ ivas_error RenderConfigReader_read(
                        if ( pRenderConfigReader->pAE[acIdx].pEarlyReflections == NULL )
                        {
#ifdef DEBUGGING
                            fprintf( stderr, "Rendering configuration: early reflections low complexity flag specified without room size preceding." );
                            fprintf( stderr, "Rendering configuration: early reflections low complexity flag specified without room size preceding.\n\n" );
#endif
                            return IVAS_ERR_INVALID_RENDER_CONFIG;
                        }
@@ -2380,11 +2380,7 @@ ivas_error RenderConfigReader_read(
                    fprintf( stderr, "Renderer configuration: DSR missing from 'acousticEnvironment' %d.\n\n", acIdx );
                }
#ifdef CONTROL_METADATA_EARLY_REFLECTIONS
                if ( aeHasER == TRUE && aeHasERsize == FALSE )
                {
                    fprintf( stderr, "Renderer configuration: early reflections room size missing from 'acousticEnvironment' %d.\n\n", acIdx );
                }
                if ( aeHasER == TRUE && aeHasERabs == FALSE )
                if ( aeHasERsize == TRUE && aeHasERabs == FALSE )
                {
                    fprintf( stderr, "Renderer configuration: early reflections absorption coefficients missing from 'acousticEnvironment' %d.\n\n", acIdx );
                }
@@ -2395,7 +2391,7 @@ ivas_error RenderConfigReader_read(
                    return IVAS_ERR_INVALID_RENDER_CONFIG;
                }
#ifdef CONTROL_METADATA_EARLY_REFLECTIONS
                if ( aeHasER && ( aeHasERsize == FALSE || aeHasERabs == FALSE ) )
                if ( aeHasERsize == TRUE && aeHasERabs == FALSE )
                {
                    return IVAS_ERR_INVALID_RENDER_CONFIG;
                }