Commit f622dfaa authored by vasilache's avatar vasilache
Browse files

fix 1074

parent f3e8758a
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -171,6 +171,7 @@

#define NONBE_FIX_SBA_SIGNALING_BITS_B                  /* FhG: issue 1061: option B: signal sba order additionally in OSBA */

#define NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR            /* Nok: issue 1074 fixing number of objects signaling in OMASA low rate */
/* ##################### End NON-BE switches ########################### */

/* ################## End DEVELOPMENT switches ######################### */
+18 −0
Original line number Diff line number Diff line
@@ -366,12 +366,30 @@ 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
                          '01' - MASA_ISM_FORMAT at the encoder, with 4 objects
                          '10' - MASA_ISM_FORMAT at the encoder, with 3 objects
                          '11' - MASA_ISM_FORMAT at the encoder, with 1 or 2 objects
                          reading if 3 or 4 object is performed later
                */
                st_ivas->nchan_ism = 5 - st_ivas->nchan_ism;
                if ( st_ivas->nchan_transport == 1 && st_ivas->nchan_ism == 2 )
                {
                    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;
            }
+10 −0
Original line number Diff line number Diff line
@@ -249,6 +249,15 @@ ivas_error ivas_masa_decode(
                }
            }

#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
            /* read 2 bits:
                          '00' - MASA format at the encoder
                          '01' - MASA_ISM_FORMAT at the encoder, with 4 object
                          '10' - MASA_ISM_FORMAT at the encoder, with 3 objects
                          '11' - MASA_ISM_FORMAT at the encoder, with 1 or 2 objects
                          reading if 3 or 4 object is performed later
             */
#else
            /* read 2 bits:
                          '00' - MASA format at the encoder
                          '01' - MASA_ISM_FORMAT at the encoder, with 1 object
@@ -256,6 +265,7 @@ ivas_error ivas_masa_decode(
                          '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 )--];

+19 −0
Original line number Diff line number Diff line
@@ -420,6 +420,13 @@ 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 )
                {
                    push_next_indice( hMetaData, nchan_ism - 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 )
                {
@@ -429,6 +436,7 @@ ivas_error ivas_masa_encode(
                {
                    push_next_indice( hMetaData, 0, MASA_TRANSP_BITS );
                }
#endif
            }
            else
            {
@@ -440,6 +448,16 @@ 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 );
            }
            else
            {
                push_next_indice( hMetaData, 3, MASA_HEADER_BITS );
            }
#else
            if ( nchan_ism <= 3 )
            {
                push_next_indice( hMetaData, nchan_ism, MASA_HEADER_BITS );
@@ -448,6 +466,7 @@ ivas_error ivas_masa_encode(
            {
                push_next_indice( hMetaData, nchan_ism - 1, MASA_HEADER_BITS );
            }
#endif
            hQMetaData->metadata_max_bits -= MASA_HEADER_BITS;
        }
        else