Commit 23465028 authored by vaclav's avatar vaclav
Browse files
parents 9cb7207a 5609487f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -178,6 +178,7 @@
#define NONBE_1200_ISM_JBM_BRATE_SW_FLUSH               /* VA: issue 1200: fix bug in renderer flush in ISM JBM bitrate switching */
#define NONBE_FIX_1205_TD_STEREO_MOD_CT                 /* VA: fix mismatch of coder_type (mod_ct) btw. TD stereo encoder and decoder */
#define NONBE_1203_MDCT2DFT_SWITCHING                   /* VA: issue 1203: fix severe artifacts during MDCT to DFT stereo switching when MDCT ITD is not used */
#define NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH             /* VA: issue 1220: fix bug in renderer flush in OMASA 1ISM JBM bitrate switching */

/* ##################### End NON-BE switches ########################### */

+11 −0
Original line number Diff line number Diff line
@@ -1517,7 +1517,11 @@ ivas_error ivas_jbm_dec_flush_renderer(
        {
            if ( ism_mode_old == ISM_MASA_MODE_DISC )
            {
#ifdef NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH
                float *tc_local[MAX_NUM_OBJECTS];
#else
                float *tc_local[MAX_TRANSPORT_CHANNELS];
#endif

                for ( ch_idx = 0; ch_idx < st_ivas->nchan_ism; ch_idx++ )
                {
@@ -1525,6 +1529,12 @@ ivas_error ivas_jbm_dec_flush_renderer(
                    mvr2r( st_ivas->hMasaIsmData->delayBuffer[ch_idx], tc_local[ch_idx], st_ivas->hMasaIsmData->delayBuffer_size );
                }

#ifdef NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH
                if ( ( error = ivas_td_binaural_renderer_sf( st_ivas, p_output, hTcBuffer->n_samples_granularity ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
#else
                if ( st_ivas->nchan_ism > 0 )
                {
                    if ( ( error = ivas_td_binaural_renderer_sf( st_ivas, p_output, hTcBuffer->n_samples_granularity ) ) != IVAS_ERR_OK )
@@ -1541,6 +1551,7 @@ ivas_error ivas_jbm_dec_flush_renderer(
                    st_ivas->hTcBuffer->slots_rendered += 1;
                    st_ivas->hTcBuffer->subframes_rendered += 1;
                }
#endif
            }
        }
        else if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
+5 −1
Original line number Diff line number Diff line
@@ -99,11 +99,15 @@ ivas_error ivas_td_binaural_renderer_sf(
    int16_t nchan_ism_internal, nchan_ism, ch_offset;

    /* Set the number of ISMs */
#ifdef NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH
    if ( st_ivas->ivas_format == MASA_ISM_FORMAT || ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->nchan_ism > 0 ) )
#else
    if ( st_ivas->ivas_format == MASA_ISM_FORMAT )
#endif
    {
        nchan_ism_internal = st_ivas->nchan_ism;
        nchan_ism = st_ivas->nchan_ism;
        ch_offset = 2;
        ch_offset = CPE_CHANNELS;
    }
    else if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
    {
+13 −0
Original line number Diff line number Diff line
@@ -748,14 +748,26 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm(
)
{
    int16_t n;
#ifdef NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH
    float data_separated_objects[BINAURAL_CHANNELS][L_FRAME48k];
#else
    float data_separated_objects[MAX_NUM_OBJECTS][L_FRAME48k];
#endif
    ivas_error error;
#ifdef NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH
    float *p_sepobj[BINAURAL_CHANNELS];
#else
    float *p_sepobj[MAX_NUM_OBJECTS];
#endif
    int16_t slot_idx_start;

    slot_idx_start = st_ivas->hSpatParamRendCom->slots_rendered;

#ifdef NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH
    for ( n = 0; n < BINAURAL_CHANNELS; n++ )
#else
    for ( n = 0; n < MAX_NUM_OBJECTS; n++ )
#endif
    {
        p_sepobj[n] = &data_separated_objects[n][0];
    }
@@ -806,6 +818,7 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm(
        {
            return error;
        }

        for ( n = 0; n < BINAURAL_CHANNELS; n++ )
        {
            v_add( output_f[n], p_sepobj[n], output_f[n], *nSamplesRendered );
+12 −14
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ from tests.constants import (
    MIN_ENC_FILE_LENGTH_DIFF,
    MIN_ENC_STATS_DIFF,
    SCRIPTS_DIR,
    MAX_ENC_DIFF,
)

PASSTHROUGH_CONF = [
@@ -256,19 +257,16 @@ def test_param_file_tests(

            print("")
            cmp_result_msg += enc_test_result_msg
            props = parse_properties(cmp_result_msg, False, props_to_record)

            props = parse_properties(cmp_result_msg, False, [MAX_ENC_DIFF])
            for k, v in props.items():
                dut_encoder_frontend.record_property(k, v)

    if encoder_only:
        if enc_test_result:
            pytest.fail("Too high difference in encoder statistics found.")
            else:
                # remove DUT stats file when test result is OK (to save disk space)
                if not keep_files:
                    os.remove(dut_stats_file)

    if encoder_only:
        return  # don't proceed with the decoder if user specified --encoder_only on the command line
        return

    # check for networkSimulator_g192 command line
    if sim_opts != "":
@@ -483,6 +481,9 @@ def test_param_file_tests(
                    print("REF output metadata missing for expected file: " + md_file)
                metadata_differs = True

        if enc_test_result:
            pytest.fail("Too high difference in encoder statistics found.")

        if tracefile_last_rtp_numbers_differ:
            pytest.fail(
                "Last RTP sequence num in tracefiles differ for JBM decoding - Not all frames were decoded in both ref and dut."
@@ -501,9 +502,6 @@ def test_param_file_tests(
                    msg += "metadata only"
                pytest.fail(msg)

        if enc_test_result:
            pytest.fail("Too high difference in encoder statistics found.")

        # remove DUT output files when test result is OK (to save disk space)
        if not keep_files:
            os.remove(f"{dut_base_path}/param_file/dec/{output_file}")
@@ -552,7 +550,7 @@ def encode(
        ref_stats_file = None
        dut_stats_file = None

    if update_ref in [1, 2] and not os.path.exists(ref_out_file):
    if update_ref == 1 or (update_ref == 2 and not os.path.exists(ref_out_file)):
        check_and_makedir(ref_out_dir)

        # call REF encoder
@@ -714,7 +712,7 @@ def decode(
    dut_out_file = f"{dut_out_dir}/{output_file}"
    ref_out_file = f"{ref_out_dir}/{output_file}"

    if update_ref == 1 or update_ref == 2 and not os.path.exists(ref_out_file):
    if update_ref == 1 or (update_ref == 2 and not os.path.exists(ref_out_file)):
        check_and_makedir(ref_out_dir)
        add_option_list = dec_opts_list
        if tracefile_dec != "":