Commit a7d3687d authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR

parent 0b7a7439
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -180,7 +180,6 @@
/* all switches in this category should start with "NONBE_" */

#define NONBE_FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT   /* fix 1070 USAN: nullptr-with-offset and Segfaults in 7_1_4 to BINAURAL and BINAURAL_ROOM_REVERB decoding with bitrate switching and head rotation*/ 
#define NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR            /* Nok: issue 1074 fixing number of objects signaling in OMASA low rate */
#define NONBE_FIX_1096_NAN_VALUES_IN_DIRAC_TO_STEREO    /* FhG: avoid sidegain DFT-Stereo param to be larger than 1 when converting from Dirac parameters */
/* ##################### End NON-BE switches ########################### */

+0 −10
Original line number Diff line number Diff line
@@ -208,7 +208,6 @@ ivas_error ivas_dec_setup(

            if ( st_ivas->nchan_ism > 0 )
            {
#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
                /* the input_ivas_format should be MASA_ISM_FORMAT, but we cannot initialize it now */
                /* info about the number of objects:
                          '00' - MASA format at the encoder
@@ -223,15 +222,6 @@ ivas_error ivas_dec_setup(
                    st_ivas->nchan_ism = 1;
                }
                /* for MASA_ISM_FORMAT at input the number of MASA transport channels is always 2 and the corresponding bit is not used here*/
#else
                /* the input_ivas_format should be MASA_ISM_FORMAT, but we cannot initialize it now */
                if ( st_ivas->nchan_transport == 2 && st_ivas->nchan_ism == 3 )
                {
                    st_ivas->nchan_ism = 4;
                }

                /* for MASA_ISM_FORMAT at input the number of MASA transport channels is always 2 */
#endif
                st_ivas->nchan_transport = 2;
                element_mode_flag = 1;
            }
+0 −12
Original line number Diff line number Diff line
@@ -151,7 +151,6 @@ ivas_error ivas_masa_decode(
    {
        if ( !( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) )
        {
#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
            if ( ivas_format == MASA_FORMAT )
            {
                /* re-read the number of objects, needed in case of bad frame  */
@@ -196,7 +195,6 @@ ivas_error ivas_masa_decode(
            }
            else
            {
#endif
                if ( ivas_format != MASA_ISM_FORMAT )
                {
                    /* number of transport channels is always 2 for MASA_ISM format */
@@ -295,14 +293,6 @@ ivas_error ivas_masa_decode(
                    }
                }

#ifndef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
                /* read 2 bits:
                          '00' - MASA format at the encoder
                          '01' - MASA_ISM_FORMAT at the encoder, with 1 object
                          '10' - MASA_ISM_FORMAT at the encoder, with 2 objects
                          '11' - MASA_ISM_FORMAT at the encoder, with 3 or 4 objects; reading if 3 or 4 object is performed later
                */
#endif
                byteBuffer = st->bit_stream[( st->next_bit_pos )--];
                byteBuffer = byteBuffer + 2 * st->bit_stream[( st->next_bit_pos )--];

@@ -320,9 +310,7 @@ ivas_error ivas_masa_decode(
                byteBuffer = st->bit_stream[( st->next_bit_pos )--];
                ( *nb_bits_read )++;
                hMasa->config.numberOfDirections = (uint8_t) ( byteBuffer + 1 );
#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
            }
#endif
        }
        else
        {
+0 −27
Original line number Diff line number Diff line
@@ -420,7 +420,6 @@ ivas_error ivas_masa_encode(
        {
            if ( ivas_format == MASA_ISM_FORMAT && ism_mode == ISM_MODE_NONE )
            {
#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
                /* use the MASA number of transport channels bit to signal if there are 1 or 2 objects */
                if ( nchan_ism == 1 || nchan_ism == 2 )
                {
@@ -431,17 +430,6 @@ ivas_error ivas_masa_encode(
                    /* for 3 or 4 objects write already the number of MASA directions */
                    push_next_indice( hMetaData, hQMetaData->no_directions - 1, MASA_TRANSP_BITS );
                }
#else
                /* use the MASA number of transport channels bit to signal if there are 3 or 4 objects */
                if ( nchan_ism == 4 )
                {
                    push_next_indice( hMetaData, 1, MASA_TRANSP_BITS );
                }
                else
                {
                    push_next_indice( hMetaData, 0, MASA_TRANSP_BITS );
                }
#endif
            }
            else
            {
@@ -453,7 +441,6 @@ ivas_error ivas_masa_encode(

        if ( ivas_format == MASA_ISM_FORMAT && ism_mode == ISM_MODE_NONE )
        {
#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
            if ( nchan_ism >= 3 ) /* if 3 or 4 objects */
            {
                push_next_indice( hMetaData, 5 - nchan_ism, MASA_HEADER_BITS );
@@ -462,16 +449,6 @@ ivas_error ivas_masa_encode(
            {
                push_next_indice( hMetaData, 3, MASA_HEADER_BITS );
            }
#else
            if ( nchan_ism <= 3 )
            {
                push_next_indice( hMetaData, nchan_ism, MASA_HEADER_BITS );
            }
            else
            {
                push_next_indice( hMetaData, nchan_ism - 1, MASA_HEADER_BITS );
            }
#endif
            hQMetaData->metadata_max_bits -= MASA_HEADER_BITS;
        }
        else
@@ -481,16 +458,12 @@ ivas_error ivas_masa_encode(
            push_next_indice( hMetaData, 0, MASA_HEADER_BITS );
            hQMetaData->metadata_max_bits -= MASA_HEADER_BITS;
        }
#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
        if ( !( ivas_format == MASA_ISM_FORMAT && ism_mode == ISM_MODE_NONE && nchan_ism > 2 ) )
        {
#endif
            /* write number of directions */
            push_next_indice( hMetaData, hQMetaData->no_directions - 1, 1 );
            hQMetaData->metadata_max_bits -= 1;
#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
        }
#endif
        /* write subframe mode */
        push_next_indice( hMetaData, hQMetaData->q_direction[0].cfg.nblocks == 1 ? 1 : 0, MASA_SUBFRAME_BITS );
        hQMetaData->metadata_max_bits -= MASA_SUBFRAME_BITS;