Commit c310371e authored by vaillancour's avatar vaillancour
Browse files

merge main

parents 4ab99a12 82ff6a30
Loading
Loading
Loading
Loading
Loading
+14 −28
Original line number Diff line number Diff line
@@ -2043,8 +2043,7 @@ static void cldfb_init_proto_and_twiddles(
                hs->rot_vec_syn_delay_re_fx = NULL;
                hs->p_filter_sf = (Word16) 17036;
                hs->p_filter = CLDFB80_10_fx;
                hs->q_scale = norm_s( (Word16) CLDFB80_10_SCALE );
                hs->scale = (Word16) ( CLDFB80_10_SCALE * ( 1 << hs->q_scale ) );
                hs->scale = CLDFB80_10_SCALE_FX_Q8;
#endif
            }
            else if ( hs->prototype == CLDFB_PROTOTYPE_5_00MS )
@@ -2064,8 +2063,7 @@ static void cldfb_init_proto_and_twiddles(
                hs->rot_vec_syn_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->p_filter_sf = (Word16) 15388;
                hs->p_filter = LDQMF_10_fx;
                hs->q_scale = norm_s( (Word16) LDQMF_10_SCALE );
                hs->scale = (Word16) ( LDQMF_10_SCALE * ( 1 << hs->q_scale ) );
                hs->scale = LDQMF_10_SCALE_FX_Q8;
#endif
            }
            break;
@@ -2098,8 +2096,7 @@ static void cldfb_init_proto_and_twiddles(
                hs->rot_vec_syn_delay_re_fx = NULL;
                hs->p_filter_sf = (Word16) 17051;
                hs->p_filter = CLDFB80_16_fx;
                hs->q_scale = norm_s( (Word16) CLDFB80_16_SCALE );
                hs->scale = (Word16) ( CLDFB80_16_SCALE * ( 1 << hs->q_scale ) );
                hs->scale = CLDFB80_16_SCALE_FX_Q8;
#endif
            }
            else if ( hs->prototype == CLDFB_PROTOTYPE_5_00MS )
@@ -2119,8 +2116,7 @@ static void cldfb_init_proto_and_twiddles(
                hs->rot_vec_syn_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->p_filter_sf = (Word16) 15388;
                hs->p_filter = LDQMF_16_fx;
                hs->q_scale = norm_s( (Word16) LDQMF_16_SCALE );
                hs->scale = (Word16) ( LDQMF_16_SCALE * ( 1 << hs->q_scale ) );
                hs->scale = LDQMF_16_SCALE_FX_Q8;
#endif
            }
            break;
@@ -2153,8 +2149,7 @@ static void cldfb_init_proto_and_twiddles(
                hs->rot_vec_syn_delay_re_fx = NULL;
                hs->p_filter_sf = (Word16) 17050;
                hs->p_filter = CLDFB80_20_fx;
                hs->q_scale = norm_s( (Word16) CLDFB80_20_SCALE );
                hs->scale = (Word16) ( CLDFB80_20_SCALE * ( 1 << hs->q_scale ) );
                hs->scale = CLDFB80_20_SCALE_FX_Q8;
#endif
            }
            else if ( hs->prototype == CLDFB_PROTOTYPE_5_00MS )
@@ -2174,8 +2169,7 @@ static void cldfb_init_proto_and_twiddles(
                hs->rot_vec_syn_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->p_filter_sf = (Word16) 15390;
                hs->p_filter = LDQMF_20_fx;
                hs->q_scale = norm_s( (Word16) LDQMF_20_SCALE );
                hs->scale = (Word16) ( LDQMF_20_SCALE * ( 1 << hs->q_scale ) );
                hs->scale = LDQMF_20_SCALE_FX_Q8;
#endif
            }
            break;
@@ -2208,8 +2202,7 @@ static void cldfb_init_proto_and_twiddles(
                hs->rot_vec_syn_delay_re_fx = NULL;
                hs->p_filter_sf = (Word16) 17051;
                hs->p_filter = CLDFB80_30_fx;
                hs->q_scale = norm_s( (Word16) CLDFB80_30_SCALE );
                hs->scale = (Word16) ( CLDFB80_30_SCALE * ( 1 << hs->q_scale ) );
                hs->scale = CLDFB80_30_SCALE_FX_Q8;
#endif
            }
            else if ( hs->prototype == CLDFB_PROTOTYPE_5_00MS )
@@ -2229,8 +2222,7 @@ static void cldfb_init_proto_and_twiddles(
                hs->rot_vec_syn_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->p_filter_sf = (Word16) 15388;
                hs->p_filter = LDQMF_30_fx;
                hs->q_scale = norm_s( (Word16) LDQMF_30_SCALE );
                hs->scale = (Word16) ( LDQMF_30_SCALE * ( 1 << hs->q_scale ) );
                hs->scale = LDQMF_30_SCALE_FX_Q8;
#endif
            }
            break;
@@ -2263,8 +2255,7 @@ static void cldfb_init_proto_and_twiddles(
                hs->rot_vec_syn_delay_re_fx = NULL;
                hs->p_filter_sf = (Word16) 17050;
                hs->p_filter = CLDFB80_32_fx;
                hs->q_scale = norm_s( (Word16) CLDFB80_32_SCALE );
                hs->scale = (Word16) ( CLDFB80_32_SCALE * ( 1 << hs->q_scale ) );
                hs->scale = CLDFB80_32_SCALE_FX_Q8;
#endif
            }
            else if ( hs->prototype == CLDFB_PROTOTYPE_5_00MS )
@@ -2284,8 +2275,7 @@ static void cldfb_init_proto_and_twiddles(
                hs->rot_vec_syn_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->p_filter_sf = (Word16) 15392;
                hs->p_filter = LDQMF_32_fx;
                hs->q_scale = norm_s( (Word16) LDQMF_32_SCALE );
                hs->scale = (Word16) ( LDQMF_32_SCALE * ( 1 << hs->q_scale ) );
                hs->scale = LDQMF_32_SCALE_FX_Q8;
#endif
            }
            break;
@@ -2318,8 +2308,7 @@ static void cldfb_init_proto_and_twiddles(
                hs->rot_vec_syn_delay_re_fx = NULL;
                hs->p_filter_sf = (Word16) 17051;
                hs->p_filter = CLDFB80_40_fx;
                hs->q_scale = norm_s( (Word16) CLDFB80_40_SCALE );
                hs->scale = (Word16) ( CLDFB80_40_SCALE * ( 1 << hs->q_scale ) );
                hs->scale = CLDFB80_40_SCALE_FX_Q8;
#endif
            }
            else if ( hs->prototype == CLDFB_PROTOTYPE_5_00MS )
@@ -2339,8 +2328,7 @@ static void cldfb_init_proto_and_twiddles(
                hs->rot_vec_syn_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->p_filter_sf = (Word16) 15391;
                hs->p_filter = LDQMF_40_fx;
                hs->q_scale = norm_s( (Word16) LDQMF_40_SCALE );
                hs->scale = (Word16) ( LDQMF_40_SCALE * ( 1 << hs->q_scale ) );
                hs->scale = LDQMF_40_SCALE_FX_Q8;
#endif
            }
            break;
@@ -2373,8 +2361,7 @@ static void cldfb_init_proto_and_twiddles(
                hs->rot_vec_syn_delay_im_fx = NULL;
                hs->p_filter_sf = (Word16) 17051;
                hs->p_filter = CLDFB80_60_fx;
                hs->q_scale = norm_s( (Word16) CLDFB80_60_SCALE );
                hs->scale = (Word16) ( CLDFB80_60_SCALE * ( 1 << hs->q_scale ) );
                hs->scale = CLDFB80_60_SCALE_FX_Q8;
#endif
            }
            else if ( hs->prototype == CLDFB_PROTOTYPE_5_00MS )
@@ -2394,8 +2381,7 @@ static void cldfb_init_proto_and_twiddles(
                hs->rot_vec_syn_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->p_filter_sf = (Word16) 15391;
                hs->p_filter = LDQMF_60_fx;
                hs->q_scale = norm_s( (Word16) LDQMF_60_SCALE );
                hs->scale = (Word16) ( LDQMF_60_SCALE * ( 1 << hs->q_scale ) );
                hs->scale = LDQMF_60_SCALE_FX_Q8;
#endif
            }
            break;
+14 −0
Original line number Diff line number Diff line
@@ -794,6 +794,13 @@ typedef enum
#define CLDFB80_32_SCALE                   88.303848f
#define CLDFB80_40_SCALE                   88.304726f
#define CLDFB80_60_SCALE                   88.028412f
#define CLDFB80_10_SCALE_FX_Q8             ( 22603 )
#define CLDFB80_16_SCALE_FX_Q8             ( 22605 )
#define CLDFB80_20_SCALE_FX_Q8             ( 22605 )
#define CLDFB80_30_SCALE_FX_Q8             ( 22588 )
#define CLDFB80_32_SCALE_FX_Q8             ( 22606 )
#define CLDFB80_40_SCALE_FX_Q8             ( 22606 )
#define CLDFB80_60_SCALE_FX_Q8             ( 22535 )

#define LDQMF_10_SCALE                      84.567841f
#define LDQMF_16_SCALE                      84.567932f
@@ -802,6 +809,13 @@ typedef enum
#define LDQMF_32_SCALE                      84.568001f
#define LDQMF_40_SCALE                      84.567986f
#define LDQMF_60_SCALE                      84.303284f
#define LDQMF_10_SCALE_FX_Q8                ( 21649 )
#define LDQMF_16_SCALE_FX_Q8                ( 21649 )
#define LDQMF_20_SCALE_FX_Q8                ( 21649 )
#define LDQMF_30_SCALE_FX_Q8                ( 21632 )
#define LDQMF_32_SCALE_FX_Q8                ( 21649 )
#define LDQMF_40_SCALE_FX_Q8                ( 21649 )
#define LDQMF_60_SCALE_FX_Q8                ( 21582 )

#define L_FFT                               256                     /* Spectral analysis - length of the FFT */
#define LOG2_L_FFT                          8                       /* Spectral analysis - log2 of L_FFT */
+10 −10
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@
 *--------------------------------------------------------------------------*/

/*! r: delay value in ns */
#ifndef IVAS_FLOAT_FIXED
int32_t get_delay(
    const int16_t enc_dec,          /* i  : encoder/decoder flag                */
    const int32_t io_fs,            /* i  : input/output sampling frequency     */
@@ -111,13 +112,7 @@ int32_t get_delay(

    return delay;
}

/*--------------------------------------------------------------------------
 *  get_delay_fx()
 *
 *  Function returns various types of delays in the codec in ns.
 *--------------------------------------------------------------------------*/

#else
Word32 get_delay_fx(                                 /* o  : delay value in ms                         */
                     const Word16 what_delay,        /* i  : what delay? (ENC or DEC)                  */
                     const Word32 io_fs,             /* i  : input/output sampling frequency           */
@@ -130,6 +125,7 @@ Word32 get_delay_fx( /* o : delay value in ms
)
{
    Word32 delay = 0;
    move32();

    IF( EQ_16( what_delay, ENC ) )
    {
@@ -141,17 +137,19 @@ Word32 get_delay_fx( /* o : delay value in ms
        ELSE
        {
            delay = IVAS_ENC_DELAY_NS;
            move32();
            test();
            IF( EQ_16( ivas_format, MASA_FORMAT ) || EQ_16( ivas_format, MASA_ISM_FORMAT ) )
            {
                delay = 0; /* All delay is compensated in the decoder with MASA */
                move32();
            }
        }
        test();
        IF( EQ_16( ivas_format, SBA_FORMAT ) || EQ_16( ivas_format, SBA_ISM_FORMAT ) )
        {
            /* compensate for DirAC/SPAR filterbank delay */
            delay += IVAS_FB_ENC_DELAY_NS;
            delay = L_add( delay, IVAS_FB_ENC_DELAY_NS );
        }
    }
    ELSE
@@ -172,6 +170,7 @@ Word32 get_delay_fx( /* o : delay value in ms
        ELSE /* IVAS */
        {
            delay = IVAS_DEC_DELAY_NS;
            move32();

#ifdef SPLIT_REND_WITH_HEAD_ROT

@@ -181,7 +180,7 @@ Word32 get_delay_fx( /* o : delay value in ms
                IF( hCldfb != NULL )
                {
                    /* compensate for filterbank delay */
                    delay += IVAS_FB_DEC_DELAY_NS;
                    delay = L_add( delay, IVAS_FB_DEC_DELAY_NS );
                }
#ifdef SPLIT_REND_WITH_HEAD_ROT
            }
@@ -189,10 +188,11 @@ Word32 get_delay_fx( /* o : delay value in ms
            test();
            IF( EQ_16( ivas_format, MASA_FORMAT ) || EQ_16( ivas_format, MASA_ISM_FORMAT ) )
            {
                delay += IVAS_ENC_DELAY_NS; /* Compensate also the encoder delay in the decoder with MASA */
                delay = L_add( delay, IVAS_ENC_DELAY_NS ); /* Compensate also the encoder delay in the decoder with MASA */
            }
        }
    }

    return delay;
}
#endif
+4 −0
Original line number Diff line number Diff line
@@ -1603,6 +1603,10 @@ typedef enum
 *----------------------------------------------------------------------------------*/

#define BINAURAL_MAXBANDS                       60                          /* Max number of bands */
#ifdef IVAS_FLOAT_FIXED
#define BINAURAL_MAXBANDS_Q25                   2013265920                  /* Max number of bands in Q25 */
#define ONE_BY_48000_Q31                        44740
#endif
#define BINAURAL_CONVBANDS                      50                          /* Bands upto which convolution is performed */
#define BINAURAL_NTAPS                           3
#define BINAURAL_NTAPS_SBA                       BINAURAL_NTAPS
+5 −17
Original line number Diff line number Diff line
@@ -384,12 +384,12 @@ ivas_error create_cpe_dec(
ivas_error create_mct_dec_fx(
	Decoder_Struct *st_ivas /* i/o: IVAS decoder structure  */
);
#endif // IVAS_FLOAT_FIXED
#else // IVAS_FLOAT_FIXED

ivas_error create_mct_dec(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder handle                     */
);

#endif
ivas_error mct_dec_reconfigure(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    const uint16_t b_nchan_change                               /* i  : flag indicating different channel count */
@@ -4553,24 +4553,12 @@ void ivas_dirac_dec_get_response(
    const int16_t ambisonics_order
);
#ifdef IVAS_FLOAT_FIXED
void ivas_dirac_dec_get_response_fixed(
    const Word16 azimuth,
    const Word16 elevation,
    Word32 *response,
    const Word16 ambisonics_order );

void ivas_dirac_dec_get_response_fixed_Q(
    const Word16 azimuth,
    const Word16 elevation,
    Word32 *response,
    const Word16 ambisonics_order,
    Word16 Q);

void ivas_dirac_dec_get_response_fx(
    const Word16 azimuth,
    const Word16 elevation,
    Word32 * response,
    const Word16 ambisonics_order);
    const Word16 ambisonics_order,
    Word16 Q_out);
#endif

void calculate_hodirac_sector_parameters(
@@ -6668,7 +6656,7 @@ void ivas_binRenderer(
void ivas_binRenderer_fx(
  BINAURAL_RENDERER_HANDLE hBinRenderer,                                                 /* i/o: binaural renderer handle                     */
  COMBINED_ORIENTATION_HANDLE hCombinedOrientationData,                                  /* i  : combined head and external orientation handle*/
  const int16_t numTimeSlots,                                                            /* i  : number of time slots to render               */
  const Word16 numTimeSlots,                                                             /* i  : number of time slots to render               */
  Word32 Cldfb_RealBuffer_Binaural_fx[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o  : Binaural signals */
  Word32 Cldfb_ImagBuffer_Binaural_fx[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o  : Binaural signals */
  Word32 RealBuffer_fx[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX],                /* i  : LS signals       */
Loading