Commit 0dc355b5 authored by vaclav's avatar vaclav
Browse files

accept NONBE_FIX_730_DPID_NOT_SET_CORRECTLY

parent 847dfb9e
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -632,11 +632,7 @@ int main(

        if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, arg.directivityPatternId, renderConfig.directivity ) ) != IVAS_ERR_OK )
        {
#ifdef NONBE_FIX_730_DPID_NOT_SET_CORRECTLY
            fprintf( stderr, "Failed to get directivity patterns for one or more of IDs: %d %d %d %d\n\n", arg.directivityPatternId[0], arg.directivityPatternId[1], arg.directivityPatternId[2], arg.directivityPatternId[3] );
#else
            fprintf( stderr, "Failed to get directivity for objects: %d %d %d %d\n\n", arg.directivityPatternId[0], arg.directivityPatternId[1], arg.directivityPatternId[2], arg.directivityPatternId[3] );
#endif
            goto cleanup;
        }

+0 −4
Original line number Diff line number Diff line
@@ -2636,11 +2636,7 @@ static CmdlnArgs defaultArgs(

    for ( int32_t i = 0; i < RENDERER_MAX_ISM_INPUTS; ++i )
    {
#ifdef NONBE_FIX_730_DPID_NOT_SET_CORRECTLY
        args.directivityPatternId[i] = 65535;
#else
        args.directivityPatternId[i] = 0;
#endif
    }

    args.acousticEnvironmentId = 65535;
+0 −1
Original line number Diff line number Diff line
@@ -174,7 +174,6 @@
#ifdef JBM_FOR_OSBA
#define OSBA_ROOM_IR
#endif
#define NONBE_FIX_730_DPID_NOT_SET_CORRECTLY                  /* Eri: issue 730: write dpid read from file in correct index, print informative error message when DPID specified is not found. */
#define NONBE_FIX_825_SBA_JBM_MONO_STEREO_OUTPUT              /* FhG: issue #825: Resolve "JBM SBA: AGC and PCA run twice for MONO and STEREO output"   */
#define NONBE_FIX_808_JBM_PARAMUPMIX_RS                       /* FhG: Issue 808: fix JBM MC rate switching */
#define NONBE_FIX_846_JBM_MASA_SIDSTART                       /* FhG: Issue #846: fix JBM for MASA DTX when the first frame is a SID frame */
+3 −18
Original line number Diff line number Diff line
@@ -2617,9 +2617,6 @@ ivas_error RenderConfigReader_read(
                    return IVAS_ERR_INVALID_RENDER_CONFIG;
                }
                idx = strtol( strtok( NULL, ":" ), NULL, 0 );
#ifndef NONBE_FIX_730_DPID_NOT_SET_CORRECTLY
                pRenderConfigReader->pDP->id = idx;
#endif

                params_idx = 0;
                pValue = (char *) calloc( strlen( pParams ), sizeof( char ) );
@@ -2627,20 +2624,16 @@ ivas_error RenderConfigReader_read(
                {
                    params_idx += (int32_t) ( strlen( item ) + strlen( pValue ) + 2 );
#ifdef DEBUGGING
#ifdef NONBE_FIX_730_DPID_NOT_SET_CORRECTLY
                    fprintf( stderr, "        PARAM: %s -> %s, DIRECTIVITYPATTERN -> %u\n", item, pValue, idx );
#else
                    fprintf( stderr, "        PARAM: %s -> %s\n", item, pValue );
#endif
#endif
                    /* Allocate memory for directivity arrays*/
                    if ( ( pRenderConfigReader->pDP[accDPIdx].pDirectivity = (float *) malloc( 3 * sizeof( float ) ) ) == NULL )
                    {
                        return IVAS_ERR_FAILED_ALLOC;
                    }
#ifdef NONBE_FIX_730_DPID_NOT_SET_CORRECTLY

                    pRenderConfigReader->pDP[accDPIdx].id = idx;
#endif

                    if ( strcmp( item, "DIRECTIVITY" ) == 0 )
                    {
                        if ( read_txt_vector( pValue, 3, pRenderConfigReader->pDP[accDPIdx].pDirectivity ) )
@@ -2841,12 +2834,9 @@ ivas_error RenderConfigReader_getDirectivity(
)
{
    uint16_t n, m;
#ifdef NONBE_FIX_730_DPID_NOT_SET_CORRECTLY
    uint16_t last_specified_id;
#endif
    bool idExists;


    if ( pRenderConfigReader == NULL )
    {
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
@@ -2862,7 +2852,6 @@ ivas_error RenderConfigReader_getDirectivity(
    }
    else
    {
#ifdef NONBE_FIX_730_DPID_NOT_SET_CORRECTLY
        last_specified_id = id[0];

        /* set unpspecified Directivity Patterns ID to last specified ID */
@@ -2884,7 +2873,7 @@ ivas_error RenderConfigReader_getDirectivity(
        {
            id[n] = last_specified_id;
        }
#endif

        for ( n = 0; n < MAX_NUM_OBJECTS; n++ )
        {
            idExists = false;
@@ -2893,11 +2882,7 @@ ivas_error RenderConfigReader_getDirectivity(
                if ( id[n] == pRenderConfigReader->pDP[m].id )
                {
                    idExists = true;
#ifdef NONBE_FIX_730_DPID_NOT_SET_CORRECTLY
                    mvr2r( pRenderConfigReader->pDP[m].pDirectivity, directivity + ( n * 3 ), 3 );
#else
                    mvr2r( pRenderConfigReader->pDP[id[n]].pDirectivity, directivity + ( n * 3 ), 3 );
#endif
                    break;
                }
            }