Commit c8cbebb7 authored by multrus's avatar multrus
Browse files

[cleanup] accept CONF_DISTATT

parent 1d895339
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -524,30 +524,16 @@ int main(
            goto cleanup;
        }

#ifdef CONF_DISTATT
        if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, arg.directivityPatternId, renderConfig.directivity_fx ) ) != IVAS_ERR_OK )
#else
        if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, arg.directivityPatternId, renderConfig.directivity ) ) != IVAS_ERR_OK )
#endif
        {
            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] );
            goto cleanup;
        }
#ifndef CONF_DISTATT
        FOR( Word16 i = 0; i < 4; i++ )
        {
            renderConfig.directivity_fx[i * 3] = (Word16) ( renderConfig.directivity[i * 3] * ( 1u << 6 ) );
            renderConfig.directivity_fx[i * 3 + 1] = (Word16) ( renderConfig.directivity[i * 3 + 1] * ( 1u << 6 ) );
            renderConfig.directivity_fx[i * 3 + 2] = (Word16) ( renderConfig.directivity[i * 3 + 2] * ( ( 1u << 15 ) - 1 ) );
        }
#endif
#ifdef CONF_DISTATT
        if ( ( error = RenderConfigReader_getDistanceAttenuation( renderConfigReader, renderConfig.distAtt_fx ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "Failed to get Distance Attenuation \n\n" );
            goto cleanup;
        }
#endif
        if ( ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
        {
            if ( asked_frame_size != IVAS_RENDER_FRAMESIZE_20MS &&
+0 −2
Original line number Diff line number Diff line
@@ -344,10 +344,8 @@ typedef struct _IVAS_RENDER_CONFIG
    ISAR_SPLIT_REND_CONFIG_DATA split_rend_config;
    float directivity[IVAS_MAX_NUM_OBJECTS * 3];
    Word16 directivity_fx[IVAS_MAX_NUM_OBJECTS * 3]; // has the following q-factor pattern: {6, 6, 15, 6, 6, 15, 6, 6, 15, 6, 6, 15}
#ifdef CONF_DISTATT
    float distAtt[3];
    Word32 distAtt_fx[3]; /* {Q27, Q30, Q30} */
#endif

} IVAS_RENDER_CONFIG_DATA, *IVAS_RENDER_CONFIG_HANDLE;

+0 −1
Original line number Diff line number Diff line
@@ -86,7 +86,6 @@

/* #################### Start BASOP porting switches ############################ */

#define CONF_DISTATT                                    /* Eri: Make distance attenuation configurable */
#define FIX_1068_ASAN_IN_MC_2_BINAURAL_ROOM_IR          /* issue 1068 : Memory leak in MC to BINAURAL_ROOM decoding with bitrate switching*/
#define NONBE_FIX_1052_SBA_EXT                          /* Dlb: SBA external output support */
#define NONBE_FIX_MC_LFE_LPF                            /* Dlb: Adding the LFE LPF filter back for MC content. */
+0 −17
Original line number Diff line number Diff line
@@ -62,11 +62,7 @@ ivas_error ivas_td_binaural_open_fx(
        move16();
    }

#ifdef CONF_DISTATT
    return ivas_td_binaural_open_unwrap_fx( &st_ivas->hHrtfTD, st_ivas->hDecoderConfig->output_Fs, *num_src, st_ivas->ivas_format, st_ivas->transport_config, st_ivas->hRenderConfig->directivity_fx, st_ivas->hRenderConfig->distAtt_fx, st_ivas->hTransSetup, &st_ivas->hBinRendererTd, &st_ivas->binaural_latency_ns, SrcInd );
#else
    return ivas_td_binaural_open_unwrap_fx( &st_ivas->hHrtfTD, st_ivas->hDecoderConfig->output_Fs, *num_src, st_ivas->ivas_format, st_ivas->transport_config, st_ivas->hRenderConfig->directivity_fx, st_ivas->hTransSetup, &st_ivas->hBinRendererTd, &st_ivas->binaural_latency_ns, SrcInd );
#endif
}


@@ -345,7 +341,6 @@ ivas_error ivas_td_binaural_renderer_sf_splitBinaural(
        {
            continue;
        }
#ifdef CONF_DISTATT
        IF( ( error = ivas_td_binaural_open_unwrap_fx( &st_ivas->hHrtfTD,
                                                       st_ivas->hDecoderConfig->output_Fs,
                                                       st_ivas->nchan_transport,
@@ -357,18 +352,6 @@ ivas_error ivas_td_binaural_renderer_sf_splitBinaural(
                                                       &st_ivas->hTdRendHandles[i],
                                                       &st_ivas->binaural_latency_ns,
                                                       SrcInd ) ) != IVAS_ERR_OK )
#else
        IF( ( error = ivas_td_binaural_open_unwrap_fx( &st_ivas->hHrtfTD,
                                                       st_ivas->hDecoderConfig->output_Fs,
                                                       st_ivas->nchan_transport,
                                                       st_ivas->ivas_format,
                                                       st_ivas->transport_config,
                                                       st_ivas->hRenderConfig->directivity_fx,
                                                       st_ivas->hTransSetup,
                                                       &st_ivas->hTdRendHandles[i],
                                                       &st_ivas->binaural_latency_ns,
                                                       SrcInd ) ) != IVAS_ERR_OK )
#endif
        {
            return error;
        }
+0 −2
Original line number Diff line number Diff line
@@ -2929,9 +2929,7 @@ ivas_error IVAS_DEC_FeedRenderConfig(
    }

    Copy( renderConfig.directivity_fx, hRenderConfig->directivity_fx, 3 * MAX_NUM_OBJECTS );
#ifdef CONF_DISTATT
    Copy32( renderConfig.distAtt_fx, hRenderConfig->distAtt_fx, 3 );
#endif

    hRenderConfig->split_rend_config = renderConfig.split_rend_config;

Loading