Commit b459e67f authored by emerit's avatar emerit
Browse files

fix test fail

parent 8f597bac
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -968,6 +968,14 @@ static ivas_error ivas_read_format(
                    if ( st_ivas->sba_order == 0 )
                    {
                        st_ivas->ivas_format = SBA_ISM_FORMAT;
#ifdef FIX_CREND_SIMPLIFY_CODE
                        /* read the real Ambisonic order when the above bits are used to signal OSBA format */
                        if ( ivas_total_brate < IVAS_24k4 )
                        {
                            st_ivas->sba_order = st_ivas->bit_stream[*num_bits_read + 2 + SBA_PLANAR_BITS + SBA_ORDER_BITS];
                            st_ivas->sba_order += 2 * st_ivas->bit_stream[*num_bits_read + 1 + SBA_PLANAR_BITS + SBA_ORDER_BITS];
                        }
#endif
                    }
                }
                ( *num_bits_read )++;
@@ -1207,6 +1215,7 @@ ivas_error ivas_init_decoder_front(
        }
    }

#ifndef FIX_CREND_SIMPLIFY_CODE
    /*-------------------------------------------------------------------*
     * Allocate HRTF binary handle
     *--------------------------------------------------------------------*/
@@ -1241,7 +1250,7 @@ ivas_error ivas_init_decoder_front(
            return error;
        }
    }

#endif
    /*-------------------------------------------------------------------*
     * Allocate and initialize Binaural Renderer configuration handle
     *--------------------------------------------------------------------*/
+15 −0
Original line number Diff line number Diff line
@@ -154,9 +154,24 @@ ivas_error ivas_masa_decode(
            if ( ivas_format == MASA_FORMAT )
            {
                /* re-read the number of objects, needed in case of bad frame  */
#ifdef FIX_CREND_SIMPLIFY_CODE
                ch = 5 - ( st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 3] + 2 * st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 2] );

                if ( ch == 5 )
                {
                    ch = 0;
                }
                st_ivas->nchan_ism = ch;
#else
                st_ivas->nchan_ism = 5 - ( st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 3] + 2 * st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 2] );
#endif
            }

#ifdef FIX_CREND_SIMPLIFY_CODE
            if ( ivas_format == MASA_FORMAT && st_ivas->nchan_ism > 0 )
#else
            if ( ivas_format == MASA_FORMAT && st_ivas->nchan_ism != 5 )
#endif
            {
                /* there was OMASA in the input */
                hMasa->config.input_ivas_format = MASA_ISM_FORMAT;