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

Unified Diff: webrtc/modules/audio_coding/codecs/isac/main/source/structs.h

Issue 1177993003: iSAC: Move global trig tables into the codec instance (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 months 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
Index: webrtc/modules/audio_coding/codecs/isac/main/source/structs.h
diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/structs.h b/webrtc/modules/audio_coding/codecs/isac/main/source/structs.h
index eb85cf34da85390e981124a82e5789ce3c524f9d..c4062d753d0a79fba67baffe161a1f228b70a132 100644
--- a/webrtc/modules/audio_coding/codecs/isac/main/source/structs.h
+++ b/webrtc/modules/audio_coding/codecs/isac/main/source/structs.h
@@ -428,6 +428,16 @@ typedef struct {
uint8_t stream[3];
} transcode_obj;
+typedef struct {
+ // TODO(kwiberg): The size of these tables could be reduced by storing floats
+ // instead of doubles, and by making use of the identity cos(x) =
+ // sin(x+pi/2). They could also be made global constants that we fill in at
+ // compile time.
+ double costab1[FRAMESAMPLES_HALF];
+ double sintab1[FRAMESAMPLES_HALF];
+ double costab2[FRAMESAMPLES_QUARTER];
+ double sintab2[FRAMESAMPLES_QUARTER];
+} TransformTables;
typedef struct {
// lower-band codec instance
@@ -477,6 +487,9 @@ typedef struct {
uint16_t in_sample_rate_hz;
/* State for the input-resampler. It is only used for 48 kHz input signals. */
int16_t state_in_resampler[SIZE_RESAMPLER_STATE];
+
+ // Trig tables for WebRtcIsac_Time2Spec and WebRtcIsac_Spec2time.
+ TransformTables transform_tables;
} ISACMainStruct;
#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_STRUCTS_H_ */

Powered by Google App Engine
This is Rietveld 408576698