Commit 7d964601 authored by vaclav's avatar vaclav
Browse files

ensure absolute coding of MD

parent 535c6f78
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -268,10 +268,23 @@ ivas_error ivas_ism_metadata_enc(
                    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 )
                else if ( hIsmMeta[ch]->ism_md_inc_diff_cnt < ISM_MD_INC_DIFF_CNT_MAX )
                {
                    hIsmMeta[ch]->ism_metadata_flag = 1;

                    if ( hIsmMeta[ch]->ism_md_inc_diff_cnt % 2 == 0 )
                    {
                        hIsmMeta[ch]->angle[0].azimuth_diff_cnt = ISM_FEC_MAX;
                    }
                    else
                    {
                        hIsmMeta[ch]->angle[0].elevation_diff_cnt = ISM_FEC_MAX;
                    }
                }
                else if ( hIsmMeta[ch]->ism_md_fec_cnt_enc == ISM_MD_FEC_CNT_MAX )
                {
                    hIsmMeta[ch]->ism_metadata_flag = 1;
                    hIsmMeta[ch]->angle[0].azimuth_diff_cnt = ISM_FEC_MAX;
                }
            }
#endif