Commit 810ab22d authored by vaclav's avatar vaclav
Browse files

fix ivas_dec_get_format_fx() for OSBA and OMASA decoding

parent 67dbc18f
Loading
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -252,7 +252,7 @@ ivas_error ivas_dec_get_format_fx(
            /* this should be non-zero if original input format was MASA_ISM_FORMAT */
            st_ivas->ism_mode = ISM_MODE_NONE;
            move16();
            nchan_ism = st_ivas->bit_stream[k - 3] + shl( st_ivas->bit_stream[k - 2], 1 );
            nchan_ism = add( st_ivas->bit_stream[k - 3], shl( st_ivas->bit_stream[k - 2], 1 ) );

            IF( nchan_ism > 0 )
            {
@@ -266,11 +266,19 @@ ivas_error ivas_dec_get_format_fx(
                */
                nchan_ism = sub( 5, nchan_ism );
                test();
#ifdef FIX_HRTF_LOAD
                IF( EQ_16( st_ivas->nchan_transport, 1 ) && EQ_16( nchan_ism, 2 ) )
                {
                    nchan_ism = 1;
                    move16();
                }
#else
                IF( EQ_16( st_ivas->nchan_transport, 1 ) && EQ_16( st_ivas->nchan_ism, 2 ) )
                {
                    st_ivas->nchan_ism = 1;
                    move16();
                }
#endif

                /* for MASA_ISM_FORMAT at input the number of MASA transport channels is always 2 and the corresponding bit is not used here*/
                st_ivas->nchan_transport = 2;
@@ -337,7 +345,7 @@ ivas_error ivas_dec_get_format_fx(
            sba_order = st_ivas->bit_stream[num_bits_read + 1];
            move16();
#ifdef FIX_HRTF_LOAD
            sba_order = add( st_ivas->sba_order, shl( st_ivas->bit_stream[num_bits_read], 1 ) );
            sba_order = add( sba_order, shl( st_ivas->bit_stream[num_bits_read], 1 ) );
#else
            sba_order = shl( st_ivas->bit_stream[num_bits_read], 1 );
#endif