Commit f6aa8433 authored by bayers's avatar bayers
Browse files

Merge branch '472-evs-conformance-broken-for-jbm' into 'main'

Resolve "EVS conformance broken for JBM"

See merge request !648
parents 8b3000a3 c8789236
Loading
Loading
Loading
Loading
Loading
+26 −19
Original line number Diff line number Diff line
@@ -1237,6 +1237,9 @@ static bool shrink_frm(
        energy = -65;
        quality = 5;
#ifdef JBM_TSM_ON_TCS
        if ( ps->evs_compat_mode == false )
        {

            xtract = maxScaling;
            /* take samples already in the renderer buf into account */
            xtract += ps->l_r_buf;
@@ -1251,7 +1254,9 @@ static bool shrink_frm(
                /* exceeded the possible shrinking, go back one renderer ts*/
                xtract -= ps->l_ts;
            }
#else
        }
        else
#endif
            if ( maxScaling != 0U && s_end > maxScaling + 1 )
        {
            xtract = maxScaling;
@@ -1261,7 +1266,6 @@ static bool shrink_frm(
            /* set to last valid element (i.e. element[len - 1] but note for stereo last element is last pair of samples) */
            xtract = s_end - ps->num_channels;
        }
#endif
    }
    else
    {
@@ -1485,10 +1489,13 @@ static bool extend_frm(
            quality = 5;
            xtract[n] = s_start + ps->num_channels;
#ifdef JBM_TSM_ON_TCS
            if ( ps->evs_compat_mode == false )
            {
                /* take renderer buffer samples into accout */
                xtract[n] += ps->l_r_buf;
                /* snap to next renderer time slot border to resynchronize */
                xtract[n] -= ( ( N - 1 ) * l_seg - xtract[n] + ps->l_r_buf ) % ps->l_ts;
            }
#endif
        }
        else