Commit 045e4e85 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_387_ISM_MD_FEC

parent 868186bc
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -74,10 +74,8 @@ typedef struct
    float last_true_azimuth;   /* MD smoothing in DTX- last true Q azimuth value */
    float last_true_elevation; /* MD smoothing in DTX- last true Q elevation value */

#ifdef FIX_387_ISM_MD_FEC
    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 */
#endif
#ifdef FIX_435_ISM_MERGE_BUG
    float last_true_radius; /* last true Q radius value */
#endif
+0 −1
Original line number Diff line number Diff line
@@ -147,7 +147,6 @@

/*#define FIX_XXX_JBM_FIFO_BUFFER  */                   /* FhG: prevent wraparound of a length identifier in cause of large frames and many channels*/

#define FIX_387_ISM_MD_FEC                              /* VA: Issue 387: fix MD discontinuity in ISM FEC */

#define FIX_418_SID_BITRATE                             /* Eri: Issue 418: Using the correct bitrate for unified stereo SID */
#define PARAMMC_SHORT_ENC_MDFT                          /* FhG: Issue 410: complexity optimization for parametric Multichannel modes */
+0 −12
Original line number Diff line number Diff line
@@ -56,11 +56,9 @@
#define ISM_MAX_RADIUS_DIFF_IDX    ( ISM_RADIUS_NBITS - 1 /*zero*/ - 1 /*sign*/ )

#define ISM_FEC_MAX 10
#ifdef FIX_387_ISM_MD_FEC
#define ISM_MD_FEC_DIFF         10
#define ISM_MD_INC_DIFF_CNT_MAX 6
#define ISM_MD_FEC_CNT_MAX      25
#endif
#ifdef FIX_435_ISM_MERGE_BUG
#define ISM_MD_RAD_FEC_DIFF 1
#endif
@@ -235,7 +233,6 @@ ivas_error ivas_ism_metadata_enc(
#else
            hIsmMeta[ch]->ism_metadata_flag = localVAD[ch] || hSCE[ch]->hCoreCoder[0]->lp_noise > 10;
#endif
#ifdef FIX_387_ISM_MD_FEC
                /* 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 )
                {
@@ -268,7 +265,6 @@ ivas_error ivas_ism_metadata_enc(
                        hIsmMeta[ch]->position_angle.angle1_diff_cnt = ISM_FEC_MAX;
                    }
                }
#endif
#ifdef FIX_435_ISM_MERGE_BUG
            }
#endif
@@ -416,11 +412,9 @@ ivas_error ivas_ism_metadata_enc(
                    nb_bits_metadata[ch] = hBstr->nb_bits_tot - nb_bits_start;
                }

#ifdef FIX_387_ISM_MD_FEC
                /* Updates */
                hIsmMeta[ch]->last_true_azimuth = hIsmMeta[ch]->azimuth;
                hIsmMeta[ch]->last_true_elevation = hIsmMeta[ch]->elevation;
#endif
#ifdef FIX_435_ISM_MERGE_BUG
                hIsmMeta[ch]->last_true_radius = hIsmMeta[ch]->radius;
#endif
@@ -561,7 +555,6 @@ ivas_error ivas_ism_metadata_enc(
    {
        hIsmMeta[ch]->last_ism_metadata_flag = hIsmMeta[ch]->ism_metadata_flag;

#ifdef FIX_387_ISM_MD_FEC
        if ( hIsmMeta[ch]->ism_metadata_flag == 0 )
        {
            hIsmMeta[ch]->ism_md_fec_cnt_enc++;
@@ -572,7 +565,6 @@ ivas_error ivas_ism_metadata_enc(
        }
        hIsmMeta[ch]->ism_md_inc_diff_cnt++;
        hIsmMeta[ch]->ism_md_inc_diff_cnt = min( hIsmMeta[ch]->ism_md_inc_diff_cnt, ISM_MD_INC_DIFF_CNT_MAX );
#endif
    }

    for ( ch = 0; ch < nchan_transport; ch++ )
@@ -663,12 +655,10 @@ ivas_error ivas_ism_metadata_enc_create(
        st_ivas->hIsmMetaData[ch]->last_azimuth = 0.0f;
        st_ivas->hIsmMetaData[ch]->last_elevation = 0.0f;

#ifdef FIX_387_ISM_MD_FEC
        st_ivas->hIsmMetaData[ch]->last_true_azimuth = 0.0f;
        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;
#endif
#ifdef FIX_435_ISM_MERGE_BUG
        st_ivas->hIsmMetaData[ch]->last_true_radius = 1.0f;
#endif
@@ -1157,10 +1147,8 @@ void ivas_ism_metadata_sid_enc(
                    hIsmMetaData->position_angle.last_angle2_idx = idx_elevation << ( ISM_ELEVATION_NBITS - nBits_elevation );
                }

#ifdef FIX_387_ISM_MD_FEC
                hIsmMetaData->ism_md_fec_cnt_enc = 0;
                hIsmMeta[ch]->ism_md_inc_diff_cnt = ISM_MD_INC_DIFF_CNT_MAX;
#endif
            }
        }