Removes OPUS_FRAMESIZE_VARIABLE
That experiment never actually worked
This commit is contained in:
parent
e619ea76bf
commit
132ed59464
8 changed files with 30 additions and 370 deletions
|
@ -87,7 +87,6 @@ struct OpusMSEncoder {
|
|||
int variable_duration;
|
||||
MappingType mapping_type;
|
||||
opus_int32 bitrate_bps;
|
||||
float subframe_mem[3];
|
||||
/* Encoder states go here */
|
||||
/* then opus_val32 window_mem[channels*120]; */
|
||||
/* then opus_val32 preemph_mem[channels]; */
|
||||
|
@ -461,7 +460,6 @@ static int opus_multistream_encoder_init_impl(
|
|||
st->layout.nb_channels = channels;
|
||||
st->layout.nb_streams = streams;
|
||||
st->layout.nb_coupled_streams = coupled_streams;
|
||||
st->subframe_mem[0]=st->subframe_mem[1]=st->subframe_mem[2]=0;
|
||||
if (mapping_type != MAPPING_TYPE_SURROUND)
|
||||
st->lfe_stream = -1;
|
||||
st->bitrate_bps = OPUS_AUTO;
|
||||
|
@ -729,14 +727,6 @@ static void surround_rate_allocation(
|
|||
+ coupled_ratio*nb_coupled /* stereo */
|
||||
+ nb_lfe*lfe_ratio;
|
||||
channel_rate = 256*(opus_int64)(bitrate - lfe_offset*nb_lfe - stream_offset*(nb_coupled+nb_uncoupled) - channel_offset*nb_normal)/total;
|
||||
#ifndef FIXED_POINT
|
||||
if (st->variable_duration==OPUS_FRAMESIZE_VARIABLE && frame_size != Fs/50)
|
||||
{
|
||||
opus_int32 bonus;
|
||||
bonus = 60*(Fs/frame_size-50);
|
||||
channel_rate += bonus;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i=0;i<st->layout.nb_streams;i++)
|
||||
{
|
||||
|
@ -788,14 +778,6 @@ static void ambisonics_rate_allocation(
|
|||
total_rate * rate_ratio_den
|
||||
/ (rate_ratio_den*num_channels + rate_ratio_num - rate_ratio_den);
|
||||
|
||||
#ifndef FIXED_POINT
|
||||
if (st->variable_duration==OPUS_FRAMESIZE_VARIABLE && frame_size != Fs/50)
|
||||
{
|
||||
opus_int32 bonus = 60*(Fs/frame_size-50);
|
||||
non_mono_rate += bonus;
|
||||
}
|
||||
#endif
|
||||
|
||||
rate[0] = total_rate - (num_channels - 1) * non_mono_rate;
|
||||
for (i=1;i<st->layout.nb_streams;i++)
|
||||
{
|
||||
|
@ -887,13 +869,7 @@ static int opus_multistream_encode_native
|
|||
|
||||
opus_encoder_ctl((OpusEncoder*)ptr, OPUS_GET_LOOKAHEAD(&delay_compensation));
|
||||
delay_compensation -= Fs/400;
|
||||
frame_size = compute_frame_size(pcm, analysis_frame_size,
|
||||
st->variable_duration, st->layout.nb_channels, Fs, st->bitrate_bps,
|
||||
delay_compensation, downmix
|
||||
#ifndef DISABLE_FLOAT_API
|
||||
, st->subframe_mem
|
||||
#endif
|
||||
);
|
||||
frame_size = frame_size_select(analysis_frame_size, st->variable_duration, Fs);
|
||||
}
|
||||
|
||||
if (400*frame_size < Fs)
|
||||
|
@ -1346,7 +1322,6 @@ int opus_multistream_encoder_ctl(OpusMSEncoder *st, int request, ...)
|
|||
case OPUS_RESET_STATE:
|
||||
{
|
||||
int s;
|
||||
st->subframe_mem[0] = st->subframe_mem[1] = st->subframe_mem[2] = 0;
|
||||
if (st->mapping_type == MAPPING_TYPE_SURROUND)
|
||||
{
|
||||
OPUS_CLEAR(ms_get_preemph_mem(st), st->layout.nb_channels);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue