Skip to content
GitLab
Explore
Sign in
Commits on Source (6)
fix FIX_1995_REVERB_INIT
· 9b4f2ec7
vaclav
authored
Sep 03, 2025
9b4f2ec7
update comment
· fa419702
vaclav
authored
Sep 03, 2025
fa419702
improvement
· 67463e13
vaclav
authored
Sep 03, 2025
67463e13
use CLDFB_SLOTS_PER_SECOND macro
· 4e319293
vaclav
authored
Sep 03, 2025
4e319293
Merge branch '1374-use-of-uninitialized-value-in-ivas_binaural_reverb_init' into 'main'
· 2cf3845f
vaclav
authored
Sep 03, 2025
Fix use-of-uninitialized-value in ivas_binaural_reverb_init() See merge request
!2235
2cf3845f
Merge branch 'main' into 1119-split-rendering-crashes-in-jbm
· 0aecb8d9
sagnowski
authored
Sep 03, 2025
0aecb8d9
Show whitespace changes
Inline
Side-by-side
lib_com/options.h
View file @
0aecb8d9
...
@@ -164,6 +164,7 @@
...
@@ -164,6 +164,7 @@
/*#define FIX_I4_OL_PITCH*/
/* fix open-loop pitch used for EVS core switching */
/*#define FIX_I4_OL_PITCH*/
/* fix open-loop pitch used for EVS core switching */
#define FIX_1119_SPLIT_RENDERING_VOIP
/* FhG: Add split rendering support to decoder in VoIP mode */
#define FIX_1119_SPLIT_RENDERING_VOIP
/* FhG: Add split rendering support to decoder in VoIP mode */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR
/* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR
/* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define FIX_1995_REVERB_INIT
/* issue 1995: Fix use-of-uninitialized-value in ivas_binaural_reverb_init() */
/* #################### End BE switches ################################## */
/* #################### End BE switches ################################## */
...
...
lib_rend/ivas_prot_rend.h
View file @
0aecb8d9
...
@@ -945,8 +945,7 @@ ivas_error ivas_binaural_reverb_init(
...
@@ -945,8 +945,7 @@ ivas_error ivas_binaural_reverb_init(
const
IVAS_ROOM_ACOUSTICS_CONFIG_DATA
*
roomAcoustics
,
/* i/o: room acoustics parameters */
const
IVAS_ROOM_ACOUSTICS_CONFIG_DATA
*
roomAcoustics
,
/* i/o: room acoustics parameters */
const
int32_t
sampling_rate
,
/* i : sampling rate */
const
int32_t
sampling_rate
,
/* i : sampling rate */
const
float
*
defaultTimes
,
/* i : default reverberation times */
const
float
*
defaultTimes
,
/* i : default reverberation times */
const
float
*
defaultEne
/* i : default reverberation energies */
const
float
*
defaultEne
,
/* i : default reverberation energies */
,
float
*
earlyEne
/* i/o: Early part energies to be modified */
float
*
earlyEne
/* i/o: Early part energies to be modified */
);
);
...
...
lib_rend/ivas_reverb.c
View file @
0aecb8d9
...
@@ -79,10 +79,10 @@
...
@@ -79,10 +79,10 @@
#define MAX_NR_OUTPUTS ( 2 )
#define MAX_NR_OUTPUTS ( 2 )
const
int16_t
init_loop_delay
[
IVAS_REV_MAX_NR_BRANCHES
]
=
{
37
,
31
,
29
,
23
,
19
,
17
,
13
,
11
};
static
const
int16_t
init_loop_delay
[
IVAS_REV_MAX_NR_BRANCHES
]
=
{
37
,
31
,
29
,
23
,
19
,
17
,
13
,
11
};
const
int16_t
default_loop_delay_48k
[
IVAS_REV_MAX_NR_BRANCHES
]
=
{
2309
,
1861
,
1523
,
1259
,
1069
,
919
,
809
,
719
};
static
const
int16_t
default_loop_delay_48k
[
IVAS_REV_MAX_NR_BRANCHES
]
=
{
2309
,
1861
,
1523
,
1259
,
1069
,
919
,
809
,
719
};
const
int16_t
default_loop_delay_32k
[
IVAS_REV_MAX_NR_BRANCHES
]
=
{
1531
,
1237
,
1013
,
839
,
709
,
613
,
541
,
479
};
static
const
int16_t
default_loop_delay_32k
[
IVAS_REV_MAX_NR_BRANCHES
]
=
{
1531
,
1237
,
1013
,
839
,
709
,
613
,
541
,
479
};
const
int16_t
default_loop_delay_16k
[
IVAS_REV_MAX_NR_BRANCHES
]
=
{
769
,
619
,
509
,
421
,
353
,
307
,
269
,
239
};
static
const
int16_t
default_loop_delay_16k
[
IVAS_REV_MAX_NR_BRANCHES
]
=
{
769
,
619
,
509
,
421
,
353
,
307
,
269
,
239
};
/*------------------------------------------------------------------------------------------*
/*------------------------------------------------------------------------------------------*
* Local Struct definition
* Local Struct definition
...
@@ -682,8 +682,6 @@ static ivas_error initialize_reverb_filters(
...
@@ -682,8 +682,6 @@ static ivas_error initialize_reverb_filters(
{
{
ivas_error
error
;
ivas_error
error
;
error
=
IVAS_ERR_OK
;
/* init correlation and coloration filters */
/* init correlation and coloration filters */
if
(
(
error
=
ivas_reverb_t2f_f2t_init
(
&
hReverb
->
fft_filter_ols
,
hReverb
->
fft_size
,
hReverb
->
fft_subblock_size
)
)
!=
IVAS_ERR_OK
)
if
(
(
error
=
ivas_reverb_t2f_f2t_init
(
&
hReverb
->
fft_filter_ols
,
hReverb
->
fft_size
,
hReverb
->
fft_subblock_size
)
)
!=
IVAS_ERR_OK
)
{
{
...
@@ -710,7 +708,7 @@ static ivas_error initialize_reverb_filters(
...
@@ -710,7 +708,7 @@ static ivas_error initialize_reverb_filters(
return
error
;
return
error
;
}
}
return
error
;
return
IVAS_ERR_OK
;
}
}
...
@@ -1060,7 +1058,6 @@ ivas_error ivas_reverb_open(
...
@@ -1060,7 +1058,6 @@ ivas_error ivas_reverb_open(
int16_t
fft_hist_size
,
transition_start
,
transition_length
;
int16_t
fft_hist_size
,
transition_start
,
transition_length
;
int16_t
nr_fc_input
,
nr_fc_fft_filter
;
int16_t
nr_fc_input
,
nr_fc_fft_filter
;
error
=
IVAS_ERR_OK
;
output_frame
=
(
int16_t
)
(
output_Fs
/
FRAMES_PER_SEC
);
output_frame
=
(
int16_t
)
(
output_Fs
/
FRAMES_PER_SEC
);
subframe_len
=
output_frame
/
MAX_PARAM_SPATIAL_SUBFRAMES
;
subframe_len
=
output_frame
/
MAX_PARAM_SPATIAL_SUBFRAMES
;
predelay_bf_len
=
output_frame
;
predelay_bf_len
=
output_frame
;
...
@@ -1240,7 +1237,7 @@ ivas_error ivas_reverb_open(
...
@@ -1240,7 +1237,7 @@ ivas_error ivas_reverb_open(
*
hReverb
=
pState
;
*
hReverb
=
pState
;
return
error
;
return
IVAS_ERR_OK
;
}
}
...
@@ -1859,12 +1856,13 @@ static ivas_error ivas_binaural_reverb_open(
...
@@ -1859,12 +1856,13 @@ static ivas_error ivas_binaural_reverb_open(
return
IVAS_ERR_OK
;
return
IVAS_ERR_OK
;
}
}
/*-------------------------------------------------------------------------
/*-------------------------------------------------------------------------
* ivas_binaural_reverb_init()
* ivas_binaural_reverb_init()
*
*
* Allocate and initialize binaural room reverberator handle
* Initialize binaural room reverberator handle for FastConv renderer
* for CLDFB renderers
*------------------------------------------------------------------------*/
*------------------------------------------------------------------------*/
ivas_error
ivas_binaural_reverb_init
(
ivas_error
ivas_binaural_reverb_init
(
REVERB_STRUCT_HANDLE
*
hReverbPr
,
/* i/o: binaural reverb handle */
REVERB_STRUCT_HANDLE
*
hReverbPr
,
/* i/o: binaural reverb handle */
const
HRTFS_STATISTICS_HANDLE
hHrtfStatistics
,
/* i : HRTF statistics handle */
const
HRTFS_STATISTICS_HANDLE
hHrtfStatistics
,
/* i : HRTF statistics handle */
...
@@ -1873,8 +1871,7 @@ ivas_error ivas_binaural_reverb_init(
...
@@ -1873,8 +1871,7 @@ ivas_error ivas_binaural_reverb_init(
const
IVAS_ROOM_ACOUSTICS_CONFIG_DATA
*
roomAcoustics
,
/* i/o: room acoustics parameters */
const
IVAS_ROOM_ACOUSTICS_CONFIG_DATA
*
roomAcoustics
,
/* i/o: room acoustics parameters */
const
int32_t
sampling_rate
,
/* i : sampling rate */
const
int32_t
sampling_rate
,
/* i : sampling rate */
const
float
*
defaultTimes
,
/* i : default reverberation times */
const
float
*
defaultTimes
,
/* i : default reverberation times */
const
float
*
defaultEne
/* i : default reverberation energies */
const
float
*
defaultEne
,
/* i : default reverberation energies */
,
float
*
earlyEne
/* i/o: Early part energies to be modified */
float
*
earlyEne
/* i/o: Early part energies to be modified */
)
)
{
{
...
@@ -1883,24 +1880,23 @@ ivas_error ivas_binaural_reverb_init(
...
@@ -1883,24 +1880,23 @@ ivas_error ivas_binaural_reverb_init(
float
revTimes
[
CLDFB_NO_CHANNELS_MAX
];
float
revTimes
[
CLDFB_NO_CHANNELS_MAX
];
float
revEne
[
CLDFB_NO_CHANNELS_MAX
];
float
revEne
[
CLDFB_NO_CHANNELS_MAX
];
error
=
IVAS_ERR_OK
;
if
(
roomAcoustics
!=
NULL
)
if
(
roomAcoustics
!=
NULL
)
{
{
if
(
(
error
=
ivas_reverb_prepare_cldfb_params
(
roomAcoustics
,
hHrtfStatistics
,
sampling_rate
,
revTimes
,
revEne
)
)
!=
IVAS_ERR_OK
)
if
(
(
error
=
ivas_reverb_prepare_cldfb_params
(
roomAcoustics
,
hHrtfStatistics
,
sampling_rate
,
revTimes
,
revEne
)
)
!=
IVAS_ERR_OK
)
{
{
return
error
;
return
error
;
}
}
preDelay
=
(
int16_t
)
roundf
(
48000
.
0
f
*
roomAcoustics
->
acousticPreDelay
/
CLDFB_NO_CHANNELS_MAX
);
/* Convert preDelay from seconds to CLDFB slots as needed by binaural reverb */
preDelay
=
(
int16_t
)
roundf
(
roomAcoustics
->
acousticPreDelay
*
CLDFB_SLOTS_PER_SECOND
);
}
}
else
else
{
{
#ifdef FIX_1995_REVERB_INIT
for
(
bin
=
0
;
bin
<
numBins
;
bin
++
)
#else
for
(
bin
=
0
;
bin
<
CLDFB_NO_CHANNELS_MAX
;
bin
++
)
for
(
bin
=
0
;
bin
<
CLDFB_NO_CHANNELS_MAX
;
bin
++
)
#endif
{
{
revTimes
[
bin
]
=
defaultTimes
[
bin
];
revTimes
[
bin
]
=
defaultTimes
[
bin
];
revEne
[
bin
]
=
defaultEne
[
bin
];
revEne
[
bin
]
=
defaultEne
[
bin
];
...
@@ -1908,7 +1904,11 @@ ivas_error ivas_binaural_reverb_init(
...
@@ -1908,7 +1904,11 @@ ivas_error ivas_binaural_reverb_init(
preDelay
=
10
;
preDelay
=
10
;
}
}
#ifdef FIX_1995_REVERB_INIT
for
(
bin
=
0
;
bin
<
numBins
;
bin
++
)
#else
for
(
bin
=
0
;
bin
<
CLDFB_NO_CHANNELS_MAX
;
bin
++
)
for
(
bin
=
0
;
bin
<
CLDFB_NO_CHANNELS_MAX
;
bin
++
)
#endif
{
{
/* Adjust the room effect parameters when the reverberation time is less than a threshold value, to avoid
/* Adjust the room effect parameters when the reverberation time is less than a threshold value, to avoid
spectral artefacts with the synthetic reverberator. */
spectral artefacts with the synthetic reverberator. */
...
@@ -1943,6 +1943,7 @@ ivas_error ivas_binaural_reverb_init(
...
@@ -1943,6 +1943,7 @@ ivas_error ivas_binaural_reverb_init(
return
error
;
return
error
;
}
}
/*-------------------------------------------------------------------------
/*-------------------------------------------------------------------------
* ivas_binaural_reverb_close()
* ivas_binaural_reverb_close()
*
*
...
...