Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Unified Diff: webrtc/modules/audio_coding/codecs/opus/opus_inst.h

Issue 1415173005: Prevent Opus DTX from generating intermittent noise during silence (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: on Fredrik's comments Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/codecs/opus/opus_interface.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/codecs/opus/opus_inst.h
diff --git a/webrtc/modules/audio_coding/codecs/opus/opus_inst.h b/webrtc/modules/audio_coding/codecs/opus/opus_inst.h
index 373db392a6f3acbfeca4bca22f481aed56bffd82..8573b6d43667fc8e46083cb24fbee594bb4936b9 100644
--- a/webrtc/modules/audio_coding/codecs/opus/opus_inst.h
+++ b/webrtc/modules/audio_coding/codecs/opus/opus_inst.h
@@ -15,7 +15,14 @@
struct WebRtcOpusEncInst {
OpusEncoder* encoder;
+ int channels;
int in_dtx_mode;
+ // When Opus is in DTX mode, we use |zero_counts| to count consecutive zeros
+ // to break long zero segment so as to prevent DTX from going wrong. We use
+ // one counter for each channel. After each encoding, |zero_counts| contain
+ // the remaining zeros from the last frame.
+ // TODO(minyue): remove this when Opus gets an internal fix to DTX.
+ size_t* zero_counts;
};
struct WebRtcOpusDecInst {
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/codecs/opus/opus_interface.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698