Commit aaef5531 authored by Jonas Svedberg's avatar Jonas Svedberg
Browse files

fixed ptr+=2 increment in new function

parent 134e81f9
Loading
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -125,14 +125,13 @@ int16_t msvq_stage1_dct_search(

    /* init search state  ptr's  at the top */
    set_f( dist1_ptr, FLT_MAX, maxC_st1 );
    st1_mse_pair = &( dist1_ptr[0] );         /* req. ptr init +=2 */
    st1_idx_pair = &( indices_st1_local[0] ); /* req. ptr init +=2 */
    st1_mse_pair = &( dist1_ptr[0] );         /* req. ptr post upd +=2 */
    st1_idx_pair = &( indices_st1_local[0] ); /* req. ptr post upd +=2 */
    set_f( mse_trunc_segm, 0.0f, n_segm );

    for ( segm = 0; segm < n_segm; segm++ )
    {                      /*  point to a  new paired location for each segment  */  
        st1_mse_pair += 2; /* req. ptr init  */
        st1_idx_pair += 2; /* req.  ptr init */
        p_max = 0;         /* req. to point to one of 1 or 0, this init  can potentially be omitted here as p_max is always 1 or 0 */
        p_max = 0;         /* req. to point to one of 1 or 0, this init  can potentially be omitted here,as p_max is always 1 or 0 */

        /* compute segment common trunction error in dctN domain */
        mse_trunc_segm[segm] += sum2_f( (const float *) ( &( dct_target[cols_per_segment[segm]] ) ), trunc_dct_cols_per_segment[segm] );
@@ -192,6 +191,9 @@ int16_t msvq_stage1_dct_search(
            /* Cost: weighted sum with cond moves ('if') => 8 in float ,   7 in BASOP with L_lshr  */
        } /* j in section */

        st1_mse_pair += 2; /* req. ptr init  */
        st1_idx_pair += 2; /* req.  ptr init */

    } /* next segment */

    for ( j = 0; j < maxC_st1; j++ )