Skip to content
GitLab
Explore
Sign in
Show whitespace changes
Inline
Side-by-side
Some changes are not shown.
For a faster browsing experience, only
20 of 311+
files are shown.
lib_enc/ivas_mc_param_enc.c
View file @
600f3f77
...
...
@@ -56,15 +56,15 @@
static
void
ivas_param_mc_dmx
(
PARAM_MC_ENC_HANDLE
hParamMC
,
float
*
data_f
[],
float
data_dmx
[][
L_FRAME48k
],
const
int16_t
input_frame
,
const
int16_t
nchan_input
,
const
int16_t
nchan_transport
);
static
void
ivas_param_mc_param_est_enc
(
PARAM_MC_ENC_HANDLE
hParamMC
,
float
*
data_f
[],
float
Cy_sum
[][
MAX_
CICP
_CHANNELS
][
MAX_
CICP
_CHANNELS
],
float
Cx_sum
[][
PARAM_MC_MAX_TRANSPORT_CHANS
][
PARAM_MC_MAX_TRANSPORT_CHANS
],
const
int16_t
input_frame
,
const
int16_t
nchan_input
,
const
int16_t
nchan_transport
);
static
void
ivas_param_mc_param_est_enc
(
PARAM_MC_ENC_HANDLE
hParamMC
,
float
*
data_f
[],
float
Cy_sum
[][
MAX_
LS
_CHANNELS
][
MAX_
LS
_CHANNELS
],
float
Cx_sum
[][
PARAM_MC_MAX_TRANSPORT_CHANS
][
PARAM_MC_MAX_TRANSPORT_CHANS
],
const
int16_t
input_frame
,
const
int16_t
nchan_input
,
const
int16_t
nchan_transport
);
static
void
ivas_param_mc_parameter_quantizer
(
const
float
*
x
,
const
int16_t
L
,
const
int16_t
sz_quantizer
,
const
float
*
quantizer
,
int16_t
*
quant_idx
,
float
*
y
);
static
void
ivas_param_mc_transient_detection
(
PARAM_MC_ENC_HANDLE
hParamMC
,
TRAN_DET_HANDLE
hTranDet
,
int16_t
*
bAttackPresent
,
int16_t
*
attackIdx
);
static
void
ivas_param_mc_quantize_iccs
(
PARAM_MC_ENC_HANDLE
hParamMC
,
float
Cy
[
MAX_
CICP
_CHANNELS
][
MAX_
CICP
_CHANNELS
],
const
int16_t
freq_idx
,
const
int16_t
nchan_input
,
int16_t
*
ICC_idx_out
);
static
void
ivas_param_mc_quantize_iccs
(
PARAM_MC_ENC_HANDLE
hParamMC
,
float
Cy
[
MAX_
LS
_CHANNELS
][
MAX_
LS
_CHANNELS
],
const
int16_t
freq_idx
,
const
int16_t
nchan_input
,
int16_t
*
ICC_idx_out
);
static
void
ivas_param_mc_quantize_ilds
(
PARAM_MC_ENC_HANDLE
hParamMC
,
float
Cy
[
MAX_
CICP
_CHANNELS
][
MAX_
CICP
_CHANNELS
],
float
Cx
[
PARAM_MC_MAX_TRANSPORT_CHANS
][
PARAM_MC_MAX_TRANSPORT_CHANS
],
const
int16_t
freq_idx
,
const
int16_t
nchan_input
,
const
int16_t
nchan_transport
,
int16_t
*
ILD_idx_out
,
float
ILD_q
[
PARAM_MC_SZ_ILD_MAP
]
);
static
void
ivas_param_mc_quantize_ilds
(
PARAM_MC_ENC_HANDLE
hParamMC
,
float
Cy
[
MAX_
LS
_CHANNELS
][
MAX_
LS
_CHANNELS
],
float
Cx
[
PARAM_MC_MAX_TRANSPORT_CHANS
][
PARAM_MC_MAX_TRANSPORT_CHANS
],
const
int16_t
freq_idx
,
const
int16_t
nchan_input
,
const
int16_t
nchan_transport
,
int16_t
*
ILD_idx_out
,
float
ILD_q
[
PARAM_MC_SZ_ILD_MAP
]
);
static
void
ivas_param_mc_write_bs
(
const
PARAM_MC_ENC_HANDLE
hParamMC
,
int16_t
*
ILD_idx
,
int16_t
*
ICC_idx
,
uint16_t
bit_buffer
[
PARAM_MC_MAX_BITS
],
int16_t
*
bit_pos
);
...
...
@@ -349,7 +349,7 @@ void ivas_param_mc_enc(
)
{
int16_t
k
;
float
Cy_sum
[
PARAM_MC_MAX_PARAMETER_BANDS
][
MAX_
CICP
_CHANNELS
][
MAX_
CICP
_CHANNELS
];
float
Cy_sum
[
PARAM_MC_MAX_PARAMETER_BANDS
][
MAX_
LS
_CHANNELS
][
MAX_
LS
_CHANNELS
];
float
Cx_sum
[
PARAM_MC_MAX_PARAMETER_BANDS
][
PARAM_MC_MAX_TRANSPORT_CHANS
][
PARAM_MC_MAX_TRANSPORT_CHANS
];
float
ILD_q
[
PARAM_MC_MAX_PARAMETER_BANDS
][
PARAM_MC_SZ_ILD_MAP
];
int16_t
ILD_idx
[
PARAM_MC_MAX_PARAMETER_BANDS
*
PARAM_MC_SZ_ILD_MAP
];
...
...
@@ -373,9 +373,9 @@ void ivas_param_mc_enc(
for
(
band
=
0
;
band
<
PARAM_MC_MAX_PARAMETER_BANDS
;
band
++
)
{
for
(
ch
=
0
;
ch
<
MAX_
CICP
_CHANNELS
;
ch
++
)
for
(
ch
=
0
;
ch
<
MAX_
LS
_CHANNELS
;
ch
++
)
{
set_zero
(
Cy_sum
[
band
][
ch
],
MAX_
CICP
_CHANNELS
);
set_zero
(
Cy_sum
[
band
][
ch
],
MAX_
LS
_CHANNELS
);
}
for
(
ch
=
0
;
ch
<
PARAM_MC_MAX_TRANSPORT_CHANS
;
ch
++
)
{
...
...
@@ -555,7 +555,7 @@ static void ivas_param_mc_dmx(
static
void
ivas_param_mc_param_est_enc
(
PARAM_MC_ENC_HANDLE
hParamMC
,
/* i/o: Parametric MC encoder handle */
float
*
data_f
[],
/* i : Input frame in the time domain */
float
Cy_sum
[][
MAX_
CICP
_CHANNELS
][
MAX_
CICP
_CHANNELS
],
/* o : Covariance matrix for the original frame */
float
Cy_sum
[][
MAX_
LS
_CHANNELS
][
MAX_
LS
_CHANNELS
],
/* o : Covariance matrix for the original frame */
float
Cx_sum
[][
PARAM_MC_MAX_TRANSPORT_CHANS
][
PARAM_MC_MAX_TRANSPORT_CHANS
],
/* o : Covariance matrix for the downmixed frame */
const
int16_t
input_frame
,
/* i : Input frame length */
const
int16_t
nchan_input
,
/* i : number of input channels */
...
...
@@ -571,16 +571,16 @@ static void ivas_param_mc_param_est_enc(
int16_t
band_step
;
const
int16_t
*
map_ls
=
Param_MC_index
;
/* Loudspeakers mapping */
int16_t
idx_ls
;
float
*
pcm_in
[
MAX_
CICP
_CHANNELS
];
float
slot_frame_f_real
[
MAX_
CICP
_CHANNELS
][
DIRAC_NO_FB_BANDS_MAX
];
/* Output of the MDFT FB - real part */
float
slot_frame_f_imag
[
MAX_
CICP
_CHANNELS
][
DIRAC_NO_FB_BANDS_MAX
];
/* Output of the MDFT FB - imag part */
float
*
p_slot_frame_f_real
[
MAX_
CICP
_CHANNELS
];
/* Output of the MDFT FB - real part */
float
*
p_slot_frame_f_imag
[
MAX_
CICP
_CHANNELS
];
/* Output of the MDFT FB - imag part */
float
*
pcm_in
[
MAX_
LS
_CHANNELS
];
float
slot_frame_f_real
[
MAX_
LS
_CHANNELS
][
DIRAC_NO_FB_BANDS_MAX
];
/* Output of the MDFT FB - real part */
float
slot_frame_f_imag
[
MAX_
LS
_CHANNELS
][
DIRAC_NO_FB_BANDS_MAX
];
/* Output of the MDFT FB - imag part */
float
*
p_slot_frame_f_real
[
MAX_
LS
_CHANNELS
];
/* Output of the MDFT FB - real part */
float
*
p_slot_frame_f_imag
[
MAX_
LS
_CHANNELS
];
/* Output of the MDFT FB - imag part */
float
dmx_real
[
PARAM_MC_MAX_TRANSPORT_CHANS
];
/* Downmix channel - Real Part */
float
dmx_imag
[
PARAM_MC_MAX_TRANSPORT_CHANS
];
/* Downmix channel - Imag Part */
float
a
,
b
,
c
,
d
;
/* Tmp complex values */
float
Cy_sum_imag
[
PARAM_MC_MAX_PARAM_BAND_ABS_COV_ENC
][
MAX_
CICP
_CHANNELS
][
MAX_
CICP
_CHANNELS
];
float
Cy_sum_imag
[
PARAM_MC_MAX_PARAM_BAND_ABS_COV_ENC
][
MAX_
LS
_CHANNELS
][
MAX_
LS
_CHANNELS
];
float
Cx_sum_imag
[
PARAM_MC_MAX_PARAM_BAND_ABS_COV_ENC
][
PARAM_MC_MAX_TRANSPORT_CHANS
][
PARAM_MC_MAX_TRANSPORT_CHANS
];
float
real_part
,
imag_part
;
int16_t
start_ts
;
...
...
@@ -597,9 +597,9 @@ static void ivas_param_mc_param_est_enc(
for
(
cur_param_band
=
0
;
cur_param_band
<
PARAM_MC_MAX_PARAM_BAND_ABS_COV_ENC
;
cur_param_band
++
)
{
for
(
ch_idx1
=
0
;
ch_idx1
<
MAX_
CICP
_CHANNELS
;
ch_idx1
++
)
for
(
ch_idx1
=
0
;
ch_idx1
<
MAX_
LS
_CHANNELS
;
ch_idx1
++
)
{
set_zero
(
Cy_sum_imag
[
cur_param_band
][
ch_idx1
],
MAX_
CICP
_CHANNELS
);
set_zero
(
Cy_sum_imag
[
cur_param_band
][
ch_idx1
],
MAX_
LS
_CHANNELS
);
}
for
(
ch_idx1
=
0
;
ch_idx1
<
PARAM_MC_MAX_TRANSPORT_CHANS
;
ch_idx1
++
)
...
...
@@ -799,7 +799,7 @@ static void ivas_param_mc_param_est_enc(
}
if
(
hParamMC
->
hMetadataPMC
.
param_frame_idx
!=
hParamMC
->
hMetadataPMC
.
coding_band_mapping
[
cur_param_band
]
)
{
float
Nrg
[
MAX_
CICP
_CHANNELS
];
float
Nrg
[
MAX_
LS
_CHANNELS
];
/* get ICLDs */
for
(
k
=
0
;
k
<
nchan_input
;
++
k
)
...
...
@@ -934,7 +934,7 @@ static void ivas_param_mc_param_est_enc(
static
void
ivas_param_mc_quantize_ilds
(
PARAM_MC_ENC_HANDLE
hParamMC
,
/* i/o: Parametric MC encoder handle */
float
Cy
[
MAX_
CICP
_CHANNELS
][
MAX_
CICP
_CHANNELS
],
/* i : Covariance matrix of the input */
float
Cy
[
MAX_
LS
_CHANNELS
][
MAX_
LS
_CHANNELS
],
/* i : Covariance matrix of the input */
float
Cx
[
PARAM_MC_MAX_TRANSPORT_CHANS
][
PARAM_MC_MAX_TRANSPORT_CHANS
],
/* i : Covariance matrix of the dmx */
const
int16_t
freq_idx
,
/* i : frequency index being processed */
const
int16_t
nchan_input
,
/* i : number of input channels */
...
...
@@ -947,7 +947,7 @@ static void ivas_param_mc_quantize_ilds(
int16_t
Ny
;
int16_t
num_ilds_to_code
;
int16_t
ild_map_size
;
float
Nrg
[
MAX_
CICP
_CHANNELS
];
float
Nrg
[
MAX_
LS
_CHANNELS
];
float
ILD
[
PARAM_MC_SZ_ILD_MAP
];
const
PARAM_MC_ILD_MAPPING
*
h_ild_mapping
;
float
tot_ener
,
dmx_ener
,
ener_fac
,
delta_fac
;
...
...
@@ -956,7 +956,7 @@ static void ivas_param_mc_quantize_ilds(
push_wmops
(
"param_mc_prm_q"
);
/* Initialization */
set_zero
(
Nrg
,
MAX_
CICP
_CHANNELS
);
set_zero
(
Nrg
,
MAX_
LS
_CHANNELS
);
set_zero
(
ILD
,
PARAM_MC_SZ_ILD_MAP
);
Ny
=
nchan_input
;
...
...
@@ -1087,7 +1087,7 @@ static void ivas_param_mc_quantize_ilds(
static
void
ivas_param_mc_quantize_iccs
(
PARAM_MC_ENC_HANDLE
hParamMC
,
/* i/o: Parametric MC encoder handle */
float
Cy
[
MAX_
CICP
_CHANNELS
][
MAX_
CICP
_CHANNELS
],
/* i : Covariance matrix of the input */
float
Cy
[
MAX_
LS
_CHANNELS
][
MAX_
LS
_CHANNELS
],
/* i : Covariance matrix of the input */
const
int16_t
freq_idx
,
/* i : frequency index being processed */
const
int16_t
nchan_input
,
/* i : number of input channels */
int16_t
*
ICC_idx_out
/* o : quantizer indices */
...
...
@@ -1099,13 +1099,13 @@ static void ivas_param_mc_quantize_iccs(
int16_t
icc_map_size
;
float
a
;
int16_t
tmp_map
[
2
];
float
Nrg
[
MAX_
CICP
_CHANNELS
];
float
Nrg
[
MAX_
LS
_CHANNELS
];
float
ICC_vect
[
PARAM_MC_SZ_ICC_MAP
];
float
ICC_vect_q
[
PARAM_MC_SZ_ICC_MAP
];
int16_t
ICC_idx
[
PARAM_MC_SZ_ICC_MAP
];
/* Initialization */
set_zero
(
Nrg
,
MAX_
CICP
_CHANNELS
);
set_zero
(
Nrg
,
MAX_
LS
_CHANNELS
);
set_zero
(
ICC_vect
,
PARAM_MC_SZ_ICC_MAP
);
set_zero
(
ICC_vect_q
,
PARAM_MC_SZ_ICC_MAP
);
...
...
lib_enc/ivas_mct_core_enc.c
View file @
600f3f77
...
...
@@ -471,6 +471,10 @@ void ivas_mct_core_enc(
/*write IGF data to bitstream*/
for
(
ch
=
0
;
ch
<
nChannels
;
ch
++
)
{
#ifdef DEBUG_PLOT_BITS
int16_t
tmp
=
hBstr
->
nb_bits_tot
;
#endif
st
=
sts
[
ch
];
if
(
sts
[
ch
]
->
mct_chan_mode
==
MCT_CHAN_MODE_IGNORE
)
...
...
@@ -478,6 +482,10 @@ void ivas_mct_core_enc(
continue
;
}
enc_prm_igf_mdct
(
st
,
hBstr
);
#ifdef DEBUG_PLOT_BITS
tmp
=
hBstr
->
nb_bits_tot
-
tmp
;
dbgwrite
(
&
tmp
,
sizeof
(
int16_t
),
1
,
1
,
"./res/bits_IGF"
);
#endif
}
}
...
...
lib_enc/ivas_mdct_core_enc.c
View file @
600f3f77
...
...
@@ -1146,6 +1146,9 @@ void ivas_mdct_core_whitening_enc(
skipped_first_channel
=
0
;
for
(
ch
=
0
;
ch
<
CPE_CHANNELS
;
ch
++
)
{
#ifdef DEBUG_PLOT_BITS
int16_t
tmp
=
hBstr
->
nb_bits_tot
;
#endif
st
=
sts
[
ch
];
if
(
st
->
mct_chan_mode
==
MCT_CHAN_MODE_IGNORE
)
...
...
@@ -1170,6 +1173,11 @@ void ivas_mdct_core_whitening_enc(
}
encode_lpc_avq
(
hBstr
,
num_sns
,
param_lpc
[
ch
],
st
->
core
,
st
->
element_mode
);
#ifdef DEBUG_PLOT_BITS
tmp
=
hBstr
->
nb_bits_tot
-
tmp
;
dbgwrite
(
&
tmp
,
sizeof
(
int16_t
),
1
,
1
,
"./res/bits_SNS"
);
#endif
st
->
side_bits_frame_channel
+=
hBstr
->
nb_bits_tot
-
nbits_start_sns
;
}
}
...
...
lib_enc/ivas_qmetadata_enc.c
View file @
600f3f77
...
...
@@ -42,6 +42,10 @@
#include
"wmc_auto.h"
#include
"prot.h"
#include
"basop_settings.h"
#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS )
#include
<string.h>
#endif
/*-----------------------------------------------------------------------*
* Local function prototypes
...
...
@@ -1276,14 +1280,23 @@ void reset_metadata_spatial(
for
(
i
=
0
;
i
<
next_ind_sid
;
i
++
)
{
hMetaData
->
ind_list
[
i
].
nb_bits
=
-
1
;
#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS )
sprintf
(
hMetaData
->
ind_list
[
i
].
function_name
,
"RESET in reset_metadata_spatial"
);
#endif
}
for
(
j
=
0
,
i
=
next_ind_sid
;
i
<
last_ind_sid
;
i
++
,
j
++
)
{
hMetaData
->
ind_list
[
j
].
value
=
hMetaData
->
ind_list
[
i
].
value
;
hMetaData
->
ind_list
[
j
].
nb_bits
=
hMetaData
->
ind_list
[
i
].
nb_bits
;
#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS )
strncpy
(
hMetaData
->
ind_list
[
j
].
function_name
,
hMetaData
->
ind_list
[
i
].
function_name
,
100
);
#endif
hMetaData
->
nb_bits_tot
+=
hMetaData
->
ind_list
[
j
].
nb_bits
;
hMetaData
->
ind_list
[
i
].
nb_bits
=
-
1
;
#ifdef DBG_BISTREAM_ANALYSIS
sprintf
(
hMetaData
->
ind_list
[
i
].
function_name
,
"RESET in reset_metadata_spatial"
);
#endif
}
hMetaData
->
nb_ind_tot
=
j
;
...
...
@@ -1308,6 +1321,9 @@ void reset_metadata_spatial(
hMetaData
->
nb_ind_tot
--
;
hMetaData
->
nb_bits_tot
-=
hMetaData
->
ind_list
[
hMetaData
->
nb_ind_tot
].
nb_bits
;
hMetaData
->
ind_list
[
hMetaData
->
nb_ind_tot
].
nb_bits
=
-
1
;
#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS )
sprintf
(
hMetaData
->
ind_list
[
hMetaData
->
nb_ind_tot
].
function_name
,
"RESET in reset_metadata_spatial"
);
#endif
}
#ifdef DEBUGGING
assert
(
hMetaData
->
nb_bits_tot
==
nb_bits_metadata
&&
"Problem in metadata for SCE"
);
...
...
@@ -1963,6 +1979,9 @@ void restore_metadata_buffer(
for
(
i
=
next_ind_start
;
i
<
hMetaData
->
nb_ind_tot
;
i
++
)
{
hMetaData
->
ind_list
[
i
].
nb_bits
=
-
1
;
#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS )
sprintf
(
hMetaData
->
ind_list
[
i
].
function_name
,
"RESET in restore_metadata_buffer"
);
#endif
}
hMetaData
->
nb_bits_tot
=
bit_pos_start
;
hMetaData
->
nb_ind_tot
=
next_ind_start
;
...
...
lib_enc/ivas_spar_md_enc.c
View file @
600f3f77
...
...
@@ -449,7 +449,11 @@ static void write_metadata_buffer(
for
(
i
=
0
;
i
<
hMetaData_tmp
->
nb_ind_tot
;
i
++
)
{
#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS )
push_next_indice_
(
hMetaData_tmp
->
ind_list
[
i
].
function_name
,
hMetaData
,
hMetaData_tmp
->
ind_list
[
i
].
value
,
hMetaData_tmp
->
ind_list
[
i
].
nb_bits
);
#else
push_next_indice
(
hMetaData
,
hMetaData_tmp
->
ind_list
[
i
].
value
,
hMetaData_tmp
->
ind_list
[
i
].
nb_bits
);
#endif
}
return
;
...
...
lib_enc/ivas_stereo_mdct_stereo_enc.c
View file @
600f3f77
...
...
@@ -411,6 +411,14 @@ void stereo_coder_tcx(
nAvailBitsMS
[
k
]
=
(
(
mct_on
?
2
*
sts
[
0
]
->
bits_frame_channel
:
sts
[
0
]
->
bits_frame_nominal
)
-
sts
[
0
]
->
side_bits_frame_channel
-
sts
[
1
]
->
side_bits_frame_channel
-
(
nSubframes
==
2
?
OFFSET_BITS_TCX10
:
OFFSET_BITS_TCX20
)
)
/
nSubframes
;
if
(
mct_on
&&
nAvailBitsMS
[
k
]
<=
0
)
/*Force M/S when bit-budget is low for MCT*/
{
hStereoMdct
->
mdct_stereo_mode
[
k
]
=
1
;
hStereoMdct
->
IGFStereoMode
[
k
]
=
1
;
set_s
(
ms_mask
[
k
],
1
,
sfbConf
->
sfbCnt
);
}
else
{
MsStereoDecision
(
sfbConf
,
sts
[
0
]
->
hTcxEnc
->
spectrum
[
k
],
sts
[
1
]
->
hTcxEnc
->
spectrum
[
k
],
inv_spectrum
[
0
][
k
],
inv_spectrum
[
1
][
k
],
&
hStereoMdct
->
mdct_stereo_mode
[
k
],
&
ms_mask
[
k
][
0
],
nAvailBitsMS
[
k
]
);
if
(
sts
[
0
]
->
igf
)
...
...
@@ -422,6 +430,7 @@ void stereo_coder_tcx(
{
hStereoMdct
->
IGFStereoMode
[
k
]
=
hStereoMdct
->
mdct_stereo_mode
[
k
];
}
}
if
(
hStereoMdct
->
mdct_stereo_mode
[
k
]
!=
SMDCT_DUAL_MONO
||
hStereoMdct
->
IGFStereoMode
[
k
]
!=
SMDCT_DUAL_MONO
)
{
...
...
lib_enc/lib_enc.c
View file @
600f3f77
...
...
@@ -1241,6 +1241,13 @@ ivas_error IVAS_ENC_EncodeFrameToSerial(
st_ivas
->
ind_list
[
i
].
nb_bits
=
-
1
;
}
#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS )
for
(
i
=
0
;
i
<
st_ivas
->
ivas_max_num_indices
;
i
++
)
{
memset
(
st_ivas
->
ind_list
[
i
].
function_name
,
'A'
,
100
*
sizeof
(
char
)
);
}
#endif
/* de-allocate old buffer of metadata indices */
if
(
st_ivas
->
ind_list_metadata
!=
NULL
)
{
...
...
lib_enc/stat_enc.h
View file @
600f3f77
...
...
@@ -55,6 +55,9 @@ typedef struct
int16_t
id
;
/* id of the indice */
uint16_t
value
;
/* value of the quantized indice */
int16_t
nb_bits
;
/* number of bits used for the quantization of the indice */
#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS )
char
function_name
[
100
];
#endif
}
Indice
,
*
INDICE_HANDLE
;
/*----------------------------------------------------------------------------------*
...
...
lib_enc/transition_enc.c
View file @
600f3f77
...
...
@@ -178,7 +178,7 @@ void transition_enc(
if
(
*
tc_subfr
==
TC_0_0
)
{
/* this is called only to compute unused bits */
config_acelp1
(
ENC
,
st
->
total_brate
,
st
->
core_brate
,
st
->
core
,
st
->
extl
,
st
->
extl_brate
,
L_FRAME
,
-
1
,
&
(
st
->
acelp_cfg
),
hBstr
->
nb_bits_tot
,
TRANSITION
,
-
1
,
TC_0_0
,
3
,
NULL
,
unbits_ACELP
,
st
->
element_mode
,
&
i
/*dummy*/
,
0
/*tdm_lp_reuse_flag*/
,
0
/*tdm_low_rate_mode*/
,
st
->
idchan
,
st
->
active_cnt
,
0
/*tdm_Pitch_reuse_flag*/
,
st
->
tdm_LRTD_flag
,
0
/*GSC_IVAS_mode*/
);
config_acelp1
(
ENC
,
st
->
total_brate
,
st
->
core_brate
,
st
->
core
,
st
->
extl
,
st
->
extl_brate
,
L_FRAME
,
-
1
,
&
(
st
->
acelp_cfg
),
hBstr
->
nb_bits_tot
,
TRANSITION
,
-
1
,
TC_0_0
,
3
,
NULL
,
unbits_ACELP
,
st
->
element_mode
,
&
i
/*dummy*/
,
0
/*tdm_lp_reuse_flag*/
,
0
/*tdm_low_rate_mode*/
,
st
->
idchan
,
0
/*tdm_Pitch_reuse_flag*/
,
st
->
tdm_LRTD_flag
,
0
/*GSC_IVAS_mode*/
);
}
*
clip_gain
=
gp_clip
(
st
->
element_mode
,
st
->
core_brate
,
st
->
voicing
,
i_subfr
,
TRANSITION
,
xn
,
gp_cl
);
...
...
@@ -274,7 +274,7 @@ void transition_enc(
if
(
i_subfr
-
*
tc_subfr
<=
L_SUBFR
)
{
config_acelp1
(
ENC
,
st
->
total_brate
,
st
->
core_brate
,
st
->
core
,
st
->
extl
,
st
->
extl_brate
,
st
->
L_frame
,
-
1
,
&
(
st
->
acelp_cfg
),
hBstr
->
nb_bits_tot
,
TRANSITION
,
-
1
,
*
tc_subfr
,
2
,
NULL
,
unbits_ACELP
,
st
->
element_mode
,
&
i
/*dummy*/
,
0
/*tdm_lp_reuse_flag*/
,
0
/*tdm_low_rate_mode*/
,
st
->
idchan
,
st
->
active_cnt
,
0
/*tdm_Pitch_reuse_flag*/
,
st
->
tdm_LRTD_flag
,
0
/*GSC_IVAS_mode*/
);
config_acelp1
(
ENC
,
st
->
total_brate
,
st
->
core_brate
,
st
->
core
,
st
->
extl
,
st
->
extl_brate
,
st
->
L_frame
,
-
1
,
&
(
st
->
acelp_cfg
),
hBstr
->
nb_bits_tot
,
TRANSITION
,
-
1
,
*
tc_subfr
,
2
,
NULL
,
unbits_ACELP
,
st
->
element_mode
,
&
i
/*dummy*/
,
0
/*tdm_lp_reuse_flag*/
,
0
/*tdm_low_rate_mode*/
,
st
->
idchan
,
0
/*tdm_Pitch_reuse_flag*/
,
st
->
tdm_LRTD_flag
,
0
/*GSC_IVAS_mode*/
);
}
/*-----------------------------------------------------------------*
...
...
lib_isar/isar_lc3plus_common.c
View file @
600f3f77
...
...
@@ -33,7 +33,7 @@
#include
"options.h"
#include
"isar_lc3plus_common.h"
#include
"ivas_error.h"
#include
"lc3.h"
#include
"lc3
plus
.h"
/*-----------------------------------------------------------------------------------------*
* Function ISAR_LC3PLUS_LC3plusErrToIvasErr()
...
...
lib_isar/isar_lc3plus_common.h
View file @
600f3f77
...
...
@@ -37,7 +37,7 @@
#include
<stdint.h>
#include
"options.h"
#include
"ivas_error.h"
#include
"lc3.h"
#include
"lc3
plus
.h"
#include
"isar_lc3plus_payload.h"
/*! common configuration parameters between encoder and decoder */
...
...
lib_isar/isar_lc3plus_dec.c
View file @
600f3f77
...
...
@@ -36,7 +36,7 @@
#include
"ivas_prot.h"
#include
"isar_lc3plus_dec.h"
#include
"isar_lc3plus_common.h"
#include
"lc3.h"
#include
"lc3
plus
.h"
#include
"ivas_error_utils.h"
#include
"wmc_auto.h"
...
...
lib_isar/isar_lc3plus_dec.h
View file @
600f3f77
...
...
@@ -35,7 +35,7 @@
#include
<stdint.h>
#include
"options.h"
#include
"lc3.h"
#include
"lc3
plus
.h"
#include
"ivas_error.h"
#include
"ivas_cnst.h"
#include
"isar_lc3plus_common.h"
...
...
lib_isar/isar_lc3plus_enc.c
View file @
600f3f77
...
...
@@ -32,7 +32,7 @@
#include
"isar_lc3plus_enc.h"
#include
"isar_lc3plus_common.h"
#include
"lc3.h"
#include
"lc3
plus
.h"
#include
"ivas_error_utils.h"
#include
"prot.h"
#include
"wmc_auto.h"
...
...
lib_isar/isar_lc3plus_enc.h
View file @
600f3f77
...
...
@@ -35,7 +35,7 @@
#include
<stdint.h>
#include
"ivas_error.h"
#include
"lc3.h"
#include
"lc3
plus
.h"
#include
"isar_lc3plus_common.h"
#include
"isar_lc3plus_payload.h"
...
...
lib_isar/isar_lc3plus_payload.h
View file @
600f3f77
...
...
@@ -35,7 +35,7 @@
#include
<stdint.h>
#include
<stddef.h>
#include
"lc3.h"
#include
"lc3
plus
.h"
#include
"options.h"
...
...
lib_isar/lib_isar_pre_rend.c
View file @
600f3f77
...
...
@@ -53,8 +53,8 @@
*------------------------------------------------------------------------*/
ivas_error
ISAR_PRE_REND_open
(
SPLIT_REND_WRAPPER
*
hSplitBinRend
,
/* i/o: Split renderer pre-renerer handle
*/
ISAR_SPLIT_REND_CONFIG_DATA
*
pSplitRendConfig
,
/* i/o: Split renderer pre-renerer config
*/
SPLIT_REND_WRAPPER
*
hSplitBinRend
,
/* i/o: Split renderer pre-ren
d
erer handle */
ISAR_SPLIT_REND_CONFIG_DATA
*
pSplitRendConfig
,
/* i/o: Split renderer pre-ren
d
erer config */
const
int32_t
output_Fs
,
/* i : output sampling rate */
const
int16_t
cldfb_in_flag
,
/* i : Flag to indicate CLDFB or time doamin input */
const
int16_t
pcm_out_flag
,
/* i : Flag to indicate PCM output */
...
...
@@ -94,9 +94,7 @@ ivas_error ISAR_PRE_REND_open(
isCldfbNeeded
=
1
;
}
hSplitBinRend
->
hCldfbHandles
=
NULL
;
if
(
isCldfbNeeded
)
if
(
isCldfbNeeded
&&
hSplitBinRend
->
hCldfbHandles
==
NULL
)
{
if
(
(
hSplitBinRend
->
hCldfbHandles
=
(
CLDFB_HANDLES_WRAPPER_HANDLE
)
malloc
(
sizeof
(
CLDFB_HANDLES_WRAPPER
)
)
)
==
NULL
)
{
...
...
@@ -286,7 +284,7 @@ ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural(
const
int16_t
max_bands
,
/* i : CLDFB bands */
float
*
output
[],
/* i/o: PCM in/out buffer */
const
int16_t
low_res_pre_rend_rot
,
/* i : low time resolution pre-renderer flag */
const
int16_t
cldfb_in_flag
,
/* i : Flag to indicate CLDFB or time do
a
min input */
const
int16_t
cldfb_in_flag
,
/* i : Flag to indicate CLDFB or time dom
a
in input */
const
int16_t
pcm_out_flag
,
/* i : Flag to indicate PCM output */
const
int16_t
ro_md_flag
/* i : Flag to indicate real only metadata for yaw */
)
...
...
lib_lc3plus/ari_codec.c
View file @
600f3f77
...
...
@@ -705,7 +705,7 @@ void ac_shift_fl(Encoder_State_fl* st)
st
->
carry_count
=
st
->
carry_count
+
1
;
}
st
->
low
=
st
->
low
<<
8
;
st
->
low
=
(
LC3_INT
)((
LC3_UINT32
)
st
->
low
<<
8
)
;
st
->
low
=
(
st
->
low
)
&
(
16777215
);
/* 2^24 - 1 */
}
...
...
lib_lc3plus/functions.h
View file @
600f3f77
...
...
@@ -15,9 +15,9 @@
#include
"clib.h"
#include
"defines.h"
#include
"float.h"
#include
"lc3.h"
#include
"setup_dec_lc3.h"
#include
"setup_enc_lc3.h"
#include
"lc3
plus
.h"
#include
"setup_dec_lc3
plus
.h"
#include
"setup_enc_lc3
plus
.h"
#include
"structs.h"
#include
"util.h"
...
...
lib_lc3plus/lc3.c
→
lib_lc3plus/lc3
plus
.c
View file @
600f3f77
...
...
@@ -9,13 +9,13 @@
#include
"options.h"
#include
"wmc_auto.h"
#include
"lc3.h"
#include
"lc3
plus
.h"
#include
"defines.h"
#include
"functions.h"
#include
<stdio.h>
#include
"setup_dec_lc3.h"
#include
"setup_enc_lc3.h"
#include
"setup_dec_lc3
plus
.h"
#include
"setup_enc_lc3
plus
.h"
#define RETURN_IF(cond, error) \
if (cond) \
...
...
@@ -88,9 +88,9 @@ static int null_in_list(void **list, int n)
/* return pointer to aligned base + base_size, *base_size += size + 4 bytes align */
void
*
balloc
(
void
*
base
,
size_t
*
base_size
,
size_t
size
)
{
uintptr_t
ptr
=
((
uintptr_t
)
base
+
*
base_size
+
3
)
&
~
3
;
uintptr_t
ptr
=
((
uintptr_t
)
base
+
*
base_size
+
3
)
&
(
uintptr_t
)(
~
3
)
;
assert
((
uintptr_t
)
base
%
4
==
0
);
/* base must be 4-byte aligned */
*
base_size
=
(
*
base_size
+
size
+
3
)
&
~
3
;
*
base_size
=
(
*
base_size
+
size
+
3
)
&
(
uintptr_t
)(
~
3
)
;
return
(
void
*
)
ptr
;
}
...
...
Prev
1
2
3
4
5
6
7
8
9
…
16
Next