Commit d5f52b8e authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

Merge branch 'main' of forge.3gpp.org:ivas-codec-pc/ivas-codec into...

Merge branch 'main' of forge.3gpp.org:ivas-codec-pc/ivas-codec into 1166-potential-divide-by-zero-in-td-renderer
parents fdf9aff2 da6dd8ef
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2248,9 +2248,13 @@ coverage-test-on-main-scheduled:
    - cp IVAS_rend IVAS_rend_ref # Copy exec to be able to run renderer script
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v -n auto --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v -n auto --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v -n auto --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec --use_ltv
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v -n auto --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec --use_ltv
    # need to ignore non-zero exit codes as limiter is active and thus the different framesiszes will not be BE in all cases
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --dut_encoder_path ./IVAS_cod --dut_decoder_path ./IVAS_dec --dut_fr 5 --decoder_only || true
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --dut_encoder_path ./IVAS_cod --dut_decoder_path ./IVAS_dec --dut_fr 10 --decoder_only || true
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --dut_encoder_path ./IVAS_cod --dut_decoder_path ./IVAS_dec --dut_fr 5 --decoder_only --use_ltv || true
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --dut_encoder_path ./IVAS_cod --dut_decoder_path ./IVAS_dec --dut_fr 10 --decoder_only --use_ltv || true
    - python3 -m pytest -q -n auto tests/renderer/test_renderer.py --create_ref
    - python3 -m pytest -q -n auto tests/renderer/test_renderer.py --create_cut    
    - lcov -c -d obj -o coverage_stv.info # extract coverage of short test vectors here
+0 −3
Original line number Diff line number Diff line
@@ -173,9 +173,7 @@
/*#define FIX_1123_PARAMBIN_16BIT_ROM*/                 /* FhG,Nok: issue 1123: update ParamBin ROM tables and scripts to generate 16 bit tables instead of float */
#define FIX_RETURN                                      /* VA: fix location of function returns */
#endif
#define FIX_1129_EXT_REND_OUTPUT_HIGH                   /* Philips: issue 1129: External renderer BINAURAL_ROOM_REVERB format output level too high compared to internal rendering output */
#define FIX_1135_EXT_RENDERER_HANDLES                   /* VA: issue 1135: Memory usage reduction in external renderer: Allocate only handles that are really needed. */
#define FIX_1159_SPLIT_RENDERING_CONFIG                 /* VA: issue 1159: Execute split rendering config only for split rendering outputs. */
#define FIX_1166_TDREND_DIV0                            /* FhG,Eri: issue 1166: potential divide by zero in TD Renderer */

/* #################### End BE switches ################################## */
@@ -185,7 +183,6 @@
/* all switches in this category should start with "NONBE_" */

#define NONBE_FIX_1141_OSBA_ROOM_RENDERING                    /* FhG: Fix for issue 1141: render objects in OSBA decoder with room effect */
#define NONBE_FIX_1143_MASA_BRSW                              /* Nok: Fix for issue 1143: MSAN use of uninitialized value in masa decoding to binaural with dtx bitrate switching and 5 % FER */


#define NONE_BE_FIX_816_LFE_PLC_FLOAT                   /* DLB: issue 816: reduce required precision to float for LFE-PLC*/
+0 −5
Original line number Diff line number Diff line
@@ -1393,14 +1393,9 @@ ivas_error ivas_masa_dec_reconfigure(
        sts = st_ivas->hCPE[cpe_id]->hCoreCoder;
        sts[0]->bit_stream = bit_stream + num_bits;
        num_bits += (int16_t) ( st_ivas->hCPE[cpe_id]->element_brate / FRAMES_PER_SEC );
#ifdef NONBE_FIX_1143_MASA_BRSW
        if ( ( ivas_total_brate < MASA_STEREO_MIN_BITRATE && last_ivas_total_brate >= MASA_STEREO_MIN_BITRATE ) ||
             ( ivas_total_brate < MASA_STEREO_MIN_BITRATE && last_ivas_total_brate == FRAME_NO_DATA ) ||
             ( ivas_total_brate < MASA_STEREO_MIN_BITRATE && last_ivas_total_brate == IVAS_SID_5k2 ) )
#else
        if ( ( ivas_total_brate < MASA_STEREO_MIN_BITRATE && last_ivas_total_brate >= MASA_STEREO_MIN_BITRATE ) ||
             ( ivas_total_brate < MASA_STEREO_MIN_BITRATE && last_ivas_total_brate == FRAME_NO_DATA ) )
#endif
        {
            st_ivas->hCPE[cpe_id]->nchan_out = 1;
            if ( ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirACRend != NULL ) || ( ( st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) && st_ivas->hDiracDecBin[0] != NULL ) )
+0 −4
Original line number Diff line number Diff line
@@ -2230,17 +2230,13 @@ ivas_error IVAS_DEC_FeedRenderConfig(
        hRenderConfig->split_rend_config.poseCorrectionMode = ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE;
    }

#ifdef FIX_1159_SPLIT_RENDERING_CONFIG
    if ( is_split_rendering_enabled( hIvasDec->st_ivas->hDecoderConfig, hRenderConfig ) )
    {
#endif
        if ( ( error = isar_split_rend_validate_config( &hRenderConfig->split_rend_config, ( hIvasDec->st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 ) ) != IVAS_ERR_OK )
        {
            return error;
        }
#ifdef FIX_1159_SPLIT_RENDERING_CONFIG
    }
#endif

    return IVAS_ERR_OK;
}
+0 −20
Original line number Diff line number Diff line
@@ -609,9 +609,6 @@ static ivas_error validateOutputSampleRate(
        /* Otherwise rendering to binaural, support the same set as IVAS decoder */
        switch ( sampleRate )
        {
#ifndef FIX_1159_SPLIT_RENDERING_CONFIG
            case 8000:
#endif
            case 16000:
            case 32000:
            case 48000:
@@ -2567,9 +2564,7 @@ static ivas_error updateSbaPanGains(
                    break;
                }
                case IVAS_AUDIO_CONFIG_BINAURAL:
#ifdef FIX_1129_EXT_REND_OUTPUT_HIGH
                case IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB:
#endif
                    if ( hRendCfg->split_rend_config.rendererSelection == ISAR_SPLIT_REND_RENDERER_SELECTION_FASTCONV )
                    {
                        if ( ( error = ivas_rend_openCldfbRend( &inputSba->cldfbRendWrapper, inConfig, outConfig, &rendCtx.pSplitRendWrapper->multiBinPoseData, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK )
@@ -2590,9 +2585,6 @@ static ivas_error updateSbaPanGains(
                    }
                    break;
                case IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR:
#ifndef FIX_1129_EXT_REND_OUTPUT_HIGH
                case IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB:
#endif
                    if ( ( error = initSbaPanGainsForMcOut( inputSba, IVAS_AUDIO_CONFIG_7_1_4, NULL ) ) != IVAS_ERR_OK )
                    {
                        return error;
@@ -4468,17 +4460,13 @@ ivas_error IVAS_REND_FeedRenderConfig(

    hRenderConfig->split_rend_config.codec = renderConfig.split_rend_config.codec;

#ifdef FIX_1159_SPLIT_RENDERING_CONFIG
    if ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
#endif
        if ( ( error = isar_split_rend_validate_config( &hRenderConfig->split_rend_config, ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 ) ) != IVAS_ERR_OK )
        {
            return error;
        }
#ifdef FIX_1159_SPLIT_RENDERING_CONFIG
    }
#endif

    /* Must re-initialize split rendering config in case renderer config is updated after adding renderer inputs */
    /* if its not initialized yet then no need to re-initialize, initialization will happen while adding inputs*/
@@ -6923,19 +6911,11 @@ static ivas_error renderInputSba(
                case IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM:
                    error = renderSbaToSplitBinaural( sbaInput, outConfig, outAudio );
                    break;
#ifdef FIX_1129_EXT_REND_OUTPUT_HIGH
                case IVAS_AUDIO_CONFIG_BINAURAL:
                case IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB:
                    error = renderSbaToBinaural( sbaInput, outConfig, outAudio );
                    break;
                case IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR:
#else
                case IVAS_AUDIO_CONFIG_BINAURAL:
                    error = renderSbaToBinaural( sbaInput, outConfig, outAudio );
                    break;
                case IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR:
                case IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB:
#endif
                    error = renderSbaToBinauralRoom( sbaInput, outConfig, outAudio );
                    break;
                default:
Loading