Loading lib_com/ivas_stat_com.h +2 −1 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ typedef struct #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 } ISM_METADATA_FRAME, *ISM_METADATA_HANDLE; Loading lib_enc/ivas_ism_metadata_enc.c +19 −6 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ #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 Loading Loading @@ -258,12 +259,21 @@ ivas_error ivas_ism_metadata_enc( #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 kleast 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 ) || ( fabsf( hIsmMeta[ch]->elevation - hIsmMeta[ch]->last_true_elevation ) > ISM_MD_FEC_DIFF ) ) { hIsmMeta[ch]->ism_metadata_flag = 1; hIsmMeta[ch]->ism_md_inc_diff_cnt = 0; } else if ( hIsmMeta[ch]->ism_md_inc_diff_cnt < ISM_MD_INC_DIFF_CNT_MAX || hIsmMeta[ch]->ism_md_fec_cnt_enc == ISM_MD_FEC_CNT_MAX ) { hIsmMeta[ch]->ism_metadata_flag = 1; } } #endif } } Loading Loading @@ -526,6 +536,7 @@ ivas_error ivas_ism_metadata_enc( { hIsmMeta[ch]->ism_md_fec_cnt_enc = 0; } hIsmMeta[ch]->ism_md_inc_diff_cnt = min( hIsmMeta[ch]->ism_md_inc_diff_cnt++, ISM_MD_INC_DIFF_CNT_MAX ); #endif } Loading Loading @@ -615,6 +626,7 @@ ivas_error ivas_ism_metadata_enc_create( 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 } Loading Loading @@ -1102,6 +1114,7 @@ void ivas_ism_metadata_sid_enc( #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 } } Loading Loading
lib_com/ivas_stat_com.h +2 −1 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ typedef struct #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 } ISM_METADATA_FRAME, *ISM_METADATA_HANDLE; Loading
lib_enc/ivas_ism_metadata_enc.c +19 −6 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ #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 Loading Loading @@ -258,12 +259,21 @@ ivas_error ivas_ism_metadata_enc( #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 kleast 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 ) || ( fabsf( hIsmMeta[ch]->elevation - hIsmMeta[ch]->last_true_elevation ) > ISM_MD_FEC_DIFF ) ) { hIsmMeta[ch]->ism_metadata_flag = 1; hIsmMeta[ch]->ism_md_inc_diff_cnt = 0; } else if ( hIsmMeta[ch]->ism_md_inc_diff_cnt < ISM_MD_INC_DIFF_CNT_MAX || hIsmMeta[ch]->ism_md_fec_cnt_enc == ISM_MD_FEC_CNT_MAX ) { hIsmMeta[ch]->ism_metadata_flag = 1; } } #endif } } Loading Loading @@ -526,6 +536,7 @@ ivas_error ivas_ism_metadata_enc( { hIsmMeta[ch]->ism_md_fec_cnt_enc = 0; } hIsmMeta[ch]->ism_md_inc_diff_cnt = min( hIsmMeta[ch]->ism_md_inc_diff_cnt++, ISM_MD_INC_DIFF_CNT_MAX ); #endif } Loading Loading @@ -615,6 +626,7 @@ ivas_error ivas_ism_metadata_enc_create( 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 } Loading Loading @@ -1102,6 +1114,7 @@ void ivas_ism_metadata_sid_enc( #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 } } Loading