Commit 24b079f6 authored by TYAGIRIS's avatar TYAGIRIS
Browse files

Merge branch 'main' into isar_pose_correction_unused_bits

parents e8d0c5f8 f3e8758a
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -342,10 +342,14 @@ void ivas_get_dirac_sba_max_md_bits(
    {
        *bits_frame_nominal = ACELP_16k40 / FRAMES_PER_SEC;
        *metadata_max_bits = 103;
        /* OSBA needs an additional 2-bits safety margin to avoid acelp crashes */
        /* OSBA needs an additional 5-bits safety margin to avoid acelp crashes */
        if ( ivas_format == SBA_ISM_FORMAT )
        {
#ifdef NONBE_FIX_SBA_SIGNALING_BITS_B
            ( *metadata_max_bits ) -= 7;
#else
            ( *metadata_max_bits ) -= 3;
#endif
        }
    }
    else if ( sba_total_brate <= IVAS_32k )
+0 −6
Original line number Diff line number Diff line
@@ -982,20 +982,14 @@ ivas_error ivas_ism_metadata_enc_create(

ivas_error ivas_ism_metadata_dec_create(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                      */
#ifdef NONBE_FIX_1065_ISM_MD_HANDLE
    const int16_t n_ISms,                                       /* i  : number of separately coded objects          */
#else
    const int16_t n_ISms,                                       /* i  : number of objects                           */
#endif
    int32_t element_brate_tmp[]                                 /* o  : element bitrate per object                  */
);

#ifdef NONBE_FIX_1065_ISM_MD_HANDLE
void ivas_ism_reset_metadata_handle_dec(
    ISM_METADATA_HANDLE hIsmMeta                                /* i/o: ISM metadata handle                         */
);

#endif
ivas_error ivas_ism_enc(
    Encoder_Struct *st_ivas,                                    /* i/o: IVAS encoder structure                      */
    float *data[],                                             /* i  : input signal [channels][samples]            */
+2 −4
Original line number Diff line number Diff line
@@ -160,7 +160,6 @@
#define FIX_NUM_SUBFRAME_UPDATE

#define FIX_1053_REVERB_RECONFIGURATION                 /* Philips: issue 1053: fix for dynamic switching of acoustic environment */
#define FIX_1060_USAN_ARRAY_BOUNDS                      /* FhG: issue 1060: USAN array-bounds errors */


/* #################### End BE switches ################################## */
@@ -169,11 +168,10 @@
/* any switch which is non-be wrt selection floating point code */
/* all switches in this category should start with "NONBE_" */

#define NONBE_FIX_1045_ISM_BITRATE_SWITCHING            /* Eri: Difference between ROM/File HRTF in ISM bitrate switching */
#define NONBE_FIX_1067_QUATERNIONSLERP_INACCURACIES     /* Philips: issue 1067: QuaternionSlerp inaccuracies in corner cases */
#define NONBE_FIX_1065_ISM_MD_HANDLE                    /* VA: issue 1065: Allocate only the necessary number of ISM MD decoder handles. */
#define NONBE_FIX_1028_1DB_TCX_LEVEL_DROP               /* VA: Harmonize the logic setting LP weighting factor between TCX encoder and TCX decoder */

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

/* ##################### End NON-BE switches ########################### */

/* ################## End DEVELOPMENT switches ######################### */
+0 −5
Original line number Diff line number Diff line
@@ -2317,13 +2317,8 @@ void ivas_dirac_dec_render_sf(

                                for ( l = 0; l < hSpatParamRendCom->num_freq_bands; l++ )
                                {
#ifdef FIX_1060_USAN_ARRAY_BOUNDS
                                    Cldfb_RealBuffer[j2][k][l] += g * *( tc_re++ );
                                    Cldfb_ImagBuffer[j2][k][l] += g * *( tc_im++ );
#else
                                    Cldfb_RealBuffer[j2][0][k * hSpatParamRendCom->num_freq_bands + l] += g * *( tc_re++ );
                                    Cldfb_ImagBuffer[j2][0][k * hSpatParamRendCom->num_freq_bands + l] += g * *( tc_im++ );
#endif
                                }
                                w1 += hSpatParamRendCom->num_freq_bands;
                            }
+15 −10
Original line number Diff line number Diff line
@@ -444,22 +444,36 @@ ivas_error ivas_dec_setup(
            /* the number of objects is written at the end of the bitstream, in the SBA metadata */
            st_ivas->nchan_ism = 2 * st_ivas->bit_stream[ivas_total_brate / FRAMES_PER_SEC - 1] + st_ivas->bit_stream[ivas_total_brate / FRAMES_PER_SEC - 2] + 1;

#ifndef NONBE_FIX_SBA_SIGNALING_BITS_B
            if ( ivas_total_brate < IVAS_24k4 || ivas_total_brate >= IVAS_256k )
            {
#endif
                /* read Ambisonic (SBA) planar flag */
                st_ivas->sba_planar = st_ivas->bit_stream[num_bits_read];
                num_bits_read += SBA_PLANAR_BITS;
#ifndef NONBE_FIX_SBA_SIGNALING_BITS_B
            }
#endif

            /* read Ambisonic (SBA) order (0 for signaling OSBA format at low bitrates)*/
            st_ivas->sba_order = st_ivas->bit_stream[num_bits_read + 1];
            st_ivas->sba_order += 2 * st_ivas->bit_stream[num_bits_read];
            num_bits_read += SBA_ORDER_BITS;

            /* read Ambisonic (SBA) order */
#ifdef NONBE_FIX_SBA_SIGNALING_BITS_B
            /* 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 + 1];
                st_ivas->sba_order += 2 * st_ivas->bit_stream[num_bits_read];
                num_bits_read += SBA_ORDER_BITS;
            }
#else
            if ( ivas_total_brate < IVAS_256k )
            {
                st_ivas->sba_order = 3;
            }
#endif

            if ( st_ivas->ini_frame > 0 && ivas_total_brate != st_ivas->last_active_ivas_total_brate )
            {
@@ -777,7 +791,6 @@ static ivas_error ivas_read_format(
                            st_ivas->ivas_format = MASA_ISM_FORMAT;
                        }
                    }

                    ( *num_bits_read )++;
                }
                break;
@@ -1314,11 +1327,7 @@ ivas_error ivas_init_decoder(
            }
        }

#ifdef NONBE_FIX_1065_ISM_MD_HANDLE
        if ( ( error = ivas_ism_metadata_dec_create( st_ivas, st_ivas->nchan_ism, element_brate_tmp ) ) != IVAS_ERR_OK )
#else
        if ( ( error = ivas_ism_metadata_dec_create( st_ivas, st_ivas->nSCE, element_brate_tmp ) ) != IVAS_ERR_OK )
#endif
        {
            return error;
        }
@@ -1652,7 +1661,6 @@ ivas_error ivas_init_decoder(

            reset_indices_dec( st_ivas->hSCE[0]->hCoreCoder[0] );

#ifdef NONBE_FIX_1065_ISM_MD_HANDLE
            if ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
            {
                if ( ( error = ivas_ism_metadata_dec_create( st_ivas, st_ivas->nchan_ism, NULL ) ) != IVAS_ERR_OK )
@@ -1662,14 +1670,11 @@ ivas_error ivas_init_decoder(
            }
            else
            {
#endif
                if ( ( error = ivas_ism_metadata_dec_create( st_ivas, 1, NULL ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
#ifdef NONBE_FIX_1065_ISM_MD_HANDLE
            }
#endif
        }
        else if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC )
        {
Loading