Commit 6ff25aaf authored by vaclav's avatar vaclav
Browse files

k = (int16_t) ( ivas_total_brate / FRAMES_PER_SEC );

parent efe3279d
Loading
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -152,8 +152,6 @@ ivas_error ivas_dec_get_format_fx(
     * Read other signaling (ISM/MC mode, number of channels, etc.)
     *-------------------------------------------------------------------*/

    k = extract_l( Mpy_32_32_r( ivas_total_brate, ONE_BY_FRAMES_PER_SEC_Q31 ) );

    IF( is_DTXrate( ivas_total_brate ) == 0 )
    {
        /*-------------------------------------------------------------------*
@@ -175,6 +173,7 @@ ivas_error ivas_dec_get_format_fx(
            nchan_ism = 1;
            move16();
#ifdef FIX_HRTF_LOAD
            k = extract_l( Mpy_32_32_r( ivas_total_brate, ONE_BY_FRAMES_PER_SEC_Q31 ) );
            k = sub( k, 1 );
            WHILE( st_ivas->bit_stream[k] && ( nchan_ism < MAX_NUM_OBJECTS ) )
#else
@@ -241,6 +240,7 @@ ivas_error ivas_dec_get_format_fx(
        ELSE IF( EQ_32( st_ivas->ivas_format, MASA_FORMAT ) )
        {
            /* read number of MASA transport channels */
            k = extract_l( Mpy_32_32_r( ivas_total_brate, ONE_BY_FRAMES_PER_SEC_Q31 ) );
            IF( st_ivas->bit_stream[k - 1] )
            {
                st_ivas->nchan_transport = 2;
@@ -310,6 +310,7 @@ ivas_error ivas_dec_get_format_fx(
            move16();

            /* the number of objects are written at the end of the bitstream */
            k = extract_l( Mpy_32_32_r( ivas_total_brate, ONE_BY_FRAMES_PER_SEC_Q31 ) );
            nchan_ism = add( add( shl( st_ivas->bit_stream[k - 1], 1 ), st_ivas->bit_stream[k - 2] ), 1 );
            st_ivas->ism_mode = ivas_omasa_ism_mode_select_fx( ivas_total_brate, nchan_ism );

@@ -328,6 +329,7 @@ ivas_error ivas_dec_get_format_fx(
        ELSE IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) )
        {
            /* the number of objects is written at the end of the bitstream, in the SBA metadata */
            k = extract_l( Mpy_32_32_r( ivas_total_brate, ONE_BY_FRAMES_PER_SEC_Q31 ) );
            nchan_ism = add( add( shl( st_ivas->bit_stream[k - 1], 1 ), st_ivas->bit_stream[k - 2] ), 1 );

            test();
@@ -463,6 +465,7 @@ ivas_error ivas_dec_get_format_fx(
                move16();
                BREAK;
            case SID_MASA_2TC:
                k = extract_l( Mpy_32_32_r( ivas_total_brate, ONE_BY_FRAMES_PER_SEC_Q31 ) );
                IF( st_ivas->bit_stream[k - 1 - SID_FORMAT_NBITS] == 1 )
                {
                    st_ivas->element_mode_init = IVAS_CPE_MDCT;
@@ -492,6 +495,7 @@ ivas_error ivas_dec_get_format_fx(
            nchan_ism = 1;
            move16();
#ifdef FIX_HRTF_LOAD
            k = extract_l( Mpy_32_32_r( ivas_total_brate, ONE_BY_FRAMES_PER_SEC_Q31 ) );
            k = sub( sub( k, 1 ), SID_FORMAT_NBITS );
            WHILE( st_ivas->bit_stream[k] && ( nchan_ism < MAX_NUM_OBJECTS ) )
#else
@@ -930,7 +934,7 @@ ivas_error ivas_dec_setup(
                st_ivas->nchan_transport = 1;
                move16();
                BREAK;
            case SID_MASA_2TC:; // empyt statement for declaration
            case SID_MASA_2TC:
                k = extract_l( Mpy_32_32_r( ivas_total_brate, ONE_BY_FRAMES_PER_SEC_Q31 ) );
                IF( EQ_16( st_ivas->bit_stream[( k - 1 ) - SID_FORMAT_NBITS], 1 ) )
                {