Commit 533e0d36 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_435_ISM_MERGE_BUG

parent 36659924
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -76,9 +76,7 @@ typedef struct

    int16_t ism_md_fec_cnt_enc;  /* counter of continuous frames where MD are not transmitted */
    int16_t ism_md_inc_diff_cnt; /* counter of continuous frames where MD are transmitted in inactive segments when MD significantly changes */
#ifdef FIX_435_ISM_MERGE_BUG
    float last_true_radius; /* last true Q radius value */
#endif

} ISM_METADATA_FRAME, *ISM_METADATA_HANDLE;

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

#define HR_METADATA                                     /* Nok: Contribution #45: encode directional MASA metadata with more bits at 384k and 512k */

#define FIX_435_ISM_MERGE_BUG                           /* Eri: Merge bug fix for ISM NULL metadata and tcx_only cases */
#define FIX_355_REFACTOR_PARAMBIN_TO_5MS                /* Nokia: Fixes issue 355 by refactoring parametric binauralizer code to 5 ms mode */
#define FIX_411_EVS_BE_TESTS_ON_WINDOWS_FAILING         /* Eri: Fix incorrect use of stack variable used for channel aware config file */
#define COMBINED_FORMAT_SIGNALING                       /* VA: Introduce a signaling bit for combined format coding */
+0 −14
Original line number Diff line number Diff line
@@ -59,9 +59,7 @@
#define ISM_MD_FEC_DIFF         10
#define ISM_MD_INC_DIFF_CNT_MAX 6
#define ISM_MD_FEC_CNT_MAX      25
#ifdef FIX_435_ISM_MERGE_BUG
#define ISM_MD_RAD_FEC_DIFF 1
#endif
#define INTER_OBJECT_PARAM_CHECK ( ( ISM_FEC_MAX / 2 ) - 2 ) /* note: constant must be less than (ISM_FEC_MAX / number of coded parameters)  */


@@ -225,22 +223,16 @@ ivas_error ivas_ism_metadata_enc(
        }
        else if ( ism_mode == ISM_MODE_DISC )
        {
#ifdef FIX_435_ISM_MERGE_BUG
            if ( hIsmMeta[ch]->ism_metadata_flag == 1 )
            {
                /* In case of low level noise for low bitrate inactive frames, do not sent metadata */
                hIsmMeta[ch]->ism_metadata_flag = localVAD[ch] || hSCE[ch]->hCoreCoder[0]->lp_noise > 10 || hSCE[ch]->hCoreCoder[0]->tcxonly;
#else
            hIsmMeta[ch]->ism_metadata_flag = localVAD[ch] || hSCE[ch]->hCoreCoder[0]->lp_noise > 10;
#endif
                /* in inactive frames, send MD 1) in ISM_MD_INC_DIFF_CNT_MAX consecutive frames when MD significantly change, 2) at least every ISM_MD_FEC_DIFF frames */
                if ( hIsmMeta[ch]->ism_metadata_flag == 0 )
                {
                    if ( ( fabsf( hIsmMeta[ch]->azimuth - hIsmMeta[ch]->last_true_azimuth ) > ISM_MD_FEC_DIFF ) ||
                         ( fabsf( hIsmMeta[ch]->elevation - hIsmMeta[ch]->last_true_elevation ) > ISM_MD_FEC_DIFF )
#ifdef FIX_435_ISM_MERGE_BUG
                         || ( fabsf( hIsmMeta[ch]->radius - hIsmMeta[ch]->last_true_radius ) > ISM_MD_RAD_FEC_DIFF )
#endif
                    )
                    {
                        hIsmMeta[ch]->ism_metadata_flag = 1;
@@ -265,9 +257,7 @@ ivas_error ivas_ism_metadata_enc(
                        hIsmMeta[ch]->position_angle.angle1_diff_cnt = ISM_FEC_MAX;
                    }
                }
#ifdef FIX_435_ISM_MERGE_BUG
            }
#endif
        }
    }

@@ -415,9 +405,7 @@ ivas_error ivas_ism_metadata_enc(
                /* Updates */
                hIsmMeta[ch]->last_true_azimuth = hIsmMeta[ch]->azimuth;
                hIsmMeta[ch]->last_true_elevation = hIsmMeta[ch]->elevation;
#ifdef FIX_435_ISM_MERGE_BUG
                hIsmMeta[ch]->last_true_radius = hIsmMeta[ch]->radius;
#endif
            }
        }

@@ -654,9 +642,7 @@ ivas_error ivas_ism_metadata_enc_create(
        st_ivas->hIsmMetaData[ch]->last_true_elevation = 0.0f;
        st_ivas->hIsmMetaData[ch]->ism_md_fec_cnt_enc = 0;
        st_ivas->hIsmMetaData[ch]->ism_md_inc_diff_cnt = ISM_MD_INC_DIFF_CNT_MAX;
#ifdef FIX_435_ISM_MERGE_BUG
        st_ivas->hIsmMetaData[ch]->last_true_radius = 1.0f;
#endif
    }

    if ( ( error = ivas_ism_config( st_ivas->hEncoderConfig->ivas_total_brate, nchan_transport, n_ISms, NULL, 0, NULL, NULL, element_brate_tmp, NULL, NULL ) ) != IVAS_ERR_OK )