Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 02ba69d

Browse files
author
Henrik Lundin
committed
[MERGE TO M59] Fixing check for when overlap-add is not 1 ms
BUG=chromium:710812 Review-Url: https://codereview.webrtc.org/2814363002 Cr-Commit-Position: refs/heads/master@{#17835} (cherry picked from commit 0f109be) Review-Url: https://codereview.webrtc.org/2835423002 . Cr-Commit-Position: refs/branch-heads/59@{#6} Cr-Branched-From: 10d095d-refs/heads/master@{#17657}
1 parent 8cb0d9d commit 02ba69d

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

webrtc/modules/audio_coding/neteq/normal.cc

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,8 @@ int Normal::Process(const int16_t* input,
145145
((1 << 14) - win_up_Q14) * expanded[channel_ix][i] + (1 << 13)) >>
146146
14;
147147
}
148-
if (fs_hz_ == 48000) {
149-
RTC_DCHECK_EQ(win_up_Q14, (1 << 14) - 16);
150-
} else {
151-
RTC_DCHECK_EQ(win_up_Q14, 1 << 14);
152-
}
148+
RTC_DCHECK_GT(win_up_Q14,
149+
(1 << 14) - 32); // Worst case rouding is a length of 34
153150
}
154151
} else if (last_mode == kModeRfc3389Cng) {
155152
RTC_DCHECK_EQ(output->Channels(), 1); // Not adapted for multi-channel yet.
@@ -187,11 +184,8 @@ int Normal::Process(const int16_t* input,
187184
((1 << 14) - win_up_Q14) * cng_output[i] + (1 << 13)) >>
188185
14;
189186
}
190-
if (fs_hz_ == 48000) {
191-
RTC_DCHECK_EQ(win_up_Q14, (1 << 14) - 16);
192-
} else {
193-
RTC_DCHECK_EQ(win_up_Q14, 1 << 14);
194-
}
187+
RTC_DCHECK_GT(win_up_Q14,
188+
(1 << 14) - 32); // Worst case rouding is a length of 34
195189
} else if (external_mute_factor_array[0] < 16384) {
196190
// Previous was neither of Expand, FadeToBGN or RFC3389_CNG, but we are
197191
// still ramping up from previous muting.

0 commit comments

Comments
 (0)