Commit 845d289a authored by multrus's avatar multrus
Browse files

Merge branch 'main' into 74-stereo-13-2kbps-command-line-limited-bw-differs-from-bitrate-limited-bw

parents f9203133 d967323c
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ scripts/c-code_instrument/
scripts/ifdef_instrument.list
scripts/ref/
scripts/test/
scripts/out/
scripts/self_test_summary.txt

# Python files that pop up when running scripts
+3 −11
Original line number Diff line number Diff line
@@ -1978,21 +1978,13 @@ ivas_error preview_indices(

            /* Read SBA planar flag and SBA order */
            st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA] == 1 );
#ifndef SBA_ORDER_BITSTREAM
            st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 );
            st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 );
#else
            st_ivas->hDecoderConfig->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 );
            st_ivas->hDecoderConfig->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 );
            st_ivas->sba_analysis_order = st_ivas->hDecoderConfig->sba_order;
#endif

#ifdef SBA_ORDER_BITSTREAM
            /*Hard coding the the sba_oder as 1 as higher not supported below 256k bitrate*/
            if ( total_brate < IVAS_256k )
            {
                st_ivas->sba_analysis_order = 1;
            }
            st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( total_brate, st_ivas->sba_order );
#endif

#ifdef SBA_ORDER_BITSTREAM
            ivas_sba_config( total_brate, st_ivas->sba_analysis_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &( st_ivas->nSCE ), &( st_ivas->nCPE ), &( st_ivas->element_mode_init ), st_ivas->sba_mode );
#else
+1 −2
Original line number Diff line number Diff line
@@ -67,8 +67,7 @@
#define MAX16B_FLT                      32767.0f
#define MIN16B_FLT                      ( -32768.0f )
#define PCM16_TO_FLT_FAC                32768.0f


#define MDFT_NORM_SCALING               ( 1.0f / PCM16_TO_FLT_FAC )
#define MAX_FRAME_COUNTER               200
#define MAX_BITS_PER_FRAME              10240           /* Bits per frame for max. bitrate 512kbps */

+1 −0
Original line number Diff line number Diff line
@@ -831,6 +831,7 @@ typedef enum {

#define SBA_PLANAR_BITS                         1
#define SBA_ORDER_BITS                          2
#define SBA_MIN_BRATE_HOA                       IVAS_256k
#define SBA_NHARM_HOA3                          16
#define SBA_T_DESIGN_11_SIZE                    70

+14 −12
Original line number Diff line number Diff line
@@ -2155,9 +2155,7 @@ void stereo_mdct_core_dec(
void splitAvailableBits(
    const int16_t total_bits,                                   /* i  : total available bits for TCX coding     */
    const int16_t split_ratio,                                  /* i  : split ratio                             */
#ifdef LBR_SBA_CORE_CODING_TUNING
    const int16_t isSBAStereoMode,                              /* i  : signal core coding for sba              */
#endif
    int16_t *bits_ch0,                                          /* o  : bits for channel 0                      */
    int16_t *bits_ch1                                           /* o  : bits for channel 1                      */
);
@@ -2175,9 +2173,7 @@ void parse_stereo_from_bitstream(
    STEREO_MDCT_DEC_DATA_HANDLE hStereoMdct,                    /* i/o: MDCT stereo decoder structure           */
    Decoder_State **sts,                                        /* i/o: decoder state structure                 */
    const int16_t mct_on,                                       /* i  : flag mct block (1) or stereo (0)        */
#ifdef LBR_SBA_CORE_CODING_TUNING
    const int16_t isSBAStereoMode,                              /* i: flag core coding for sba         */
#endif
    Decoder_State *st0,                                         /* i/o: decoder state structure for Bstr        */
    int16_t ms_mask[NB_DIV][MAX_SFB]                            /* o  : bandwise MS mask                        */
);
@@ -2513,10 +2509,8 @@ ivas_error stereo_memory_enc(
    const int16_t max_bwidth,                                   /* i  : maximum audio bandwidth                 */
    float *tdm_last_ratio,                                      /* o  : TD stereo last ratio                    */
    const IVAS_FORMAT ivas_format                               /* i  : IVAS format                             */
#ifdef LBR_SBA_CORE_CODING_TUNING
    ,
    const int16_t nchan_transport                               /* i  : number transport chans                  */
#endif

);

@@ -3013,11 +3007,7 @@ void ivas_dirac_param_est_enc(
 *----------------------------------------------------------------------------------*/

/*! r: SBA format mode */
#ifdef LBR_SBA_CORE_CODING_TUNING
SBA_MODE ivas_sba_mode_select( 
#else
int16_t ivas_sba_mode_select( 
#endif
    const int32_t ivas_total_brate                              /* i  : IVAS total bitrate                      */
);

@@ -3043,15 +3033,25 @@ void ivas_init_dec_get_num_cldfb_instances(
    int16_t *numCldfbSyntheses                                  /* o  : number of CLDFB synthesis instances     */
);

/*! r: Ambisonic (SBA) order */
int16_t ivas_sba_get_order(
    const int16_t nb_channels,                                  /* i  : Number of ambisonic channels            */
    const int16_t sba_planar                                    /* i  : SBA planar flag                         */
);

#ifdef SBA_ORDER_BITSTREAM
/*! r: Ambisonic (SBA) order used for analysis and coding */
int16_t ivas_sba_get_analysis_order(
    const int32_t ivas_total_brate,                             /* i  : IVAS total bitrate                      */
    const int16_t sba_order                                     /* i  : Ambisonic (SBA) order                   */
);
#endif

int16_t ivas_sba_get_order_transport(
    const int16_t nchan_transport                               /* i  : Number of transport channels            */
);

/*!r: number of Ambisonic channels */
int16_t ivas_sba_get_nchan(
    const int16_t sba_order,                                    /* i  : Ambisonic (SBA) order                   */
    const int16_t sba_planar                                    /* i  : SBA planar flag                         */
@@ -3717,7 +3717,9 @@ void ivas_spar_config(
void ivas_sba_upmixer_renderer(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder struct                     */
    float output[][L_FRAME48k],                                 /* i/o: transport/output audio channels         */
#ifndef SPAR_SCALING_HARMONIZATION
    const int16_t nchan_remapped,                               /* i  : num channels after remapping of TCs     */
#endif
    const int16_t output_frame                                  /* i  : output frame length                     */
);

@@ -3868,7 +3870,7 @@ ivas_error ivas_spar_md_enc_open(
    const ENCODER_CONFIG_HANDLE hEncoderConfig                  /* i  : configuration structure                 */
#ifdef SBA_ORDER_BITSTREAM
    ,
    int16_t sba_order
    const int16_t sba_order                                     /* i  : Ambisonic (SBA) order                   */
#endif
);

@@ -3884,7 +3886,7 @@ ivas_error ivas_spar_md_enc_process(
    const int16_t dtx_silence_mode
#ifdef SBA_ORDER_BITSTREAM
    ,
    int16_t sba_order
    const int16_t sba_order                                     /* i  : Ambisonic (SBA) order                   */
#endif
);

Loading