Refactoring common_audio/signal_processing: Removed two macros used by isac only.
Removed a macro for malloc() and one for free(). They are only used by the audio codec isac, where I replaced the macro with its implementation. Further, the includes were updated with full paths and put in alphabetical order. BUG=N/A TESTED=trybots,module_tests,module_unittests R=turaj@webrtc.org, turajs@webrtc.org Review URL: https://webrtc-codereview.appspot.com/8449004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5554 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
c5d506a106
commit
e2fc13e42f
@ -143,9 +143,6 @@
|
||||
#define WEBRTC_SPL_RSHIFT_U32(x, c) ((uint32_t)(x) >> (c))
|
||||
#define WEBRTC_SPL_LSHIFT_U32(x, c) ((uint32_t)(x) << (c))
|
||||
|
||||
#define WEBRTC_SPL_VNEW(t, n) (t *) malloc (sizeof (t) * (n))
|
||||
#define WEBRTC_SPL_FREE free
|
||||
|
||||
#define WEBRTC_SPL_RAND(a) \
|
||||
((int16_t)(WEBRTC_SPL_MUL_16_16_RSFT((a), 18816, 7) & 0x00007fff))
|
||||
|
||||
|
@ -15,20 +15,21 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "isac.h"
|
||||
#include "bandwidth_estimator.h"
|
||||
#include "crc.h"
|
||||
#include "entropy_coding.h"
|
||||
#include "codec.h"
|
||||
#include "structs.h"
|
||||
#include "signal_processing_library.h"
|
||||
#include "lpc_shape_swb16_tables.h"
|
||||
#include "os_specific_inline.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/isac/main/interface/isac.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/isac/main/source/codec.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/isac/main/source/crc.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/isac/main/source/os_specific_inline.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/isac/main/source/structs.h"
|
||||
|
||||
#define BIT_MASK_DEC_INIT 0x0001
|
||||
#define BIT_MASK_ENC_INIT 0x0002
|
||||
@ -273,7 +274,7 @@ int16_t WebRtcIsac_Create(ISACStruct** ISAC_main_inst) {
|
||||
ISACMainStruct* instISAC;
|
||||
|
||||
if (ISAC_main_inst != NULL) {
|
||||
instISAC = (ISACMainStruct*)WEBRTC_SPL_VNEW(ISACMainStruct, 1);
|
||||
instISAC = (ISACMainStruct*)malloc(sizeof(ISACMainStruct));
|
||||
*ISAC_main_inst = (ISACStruct*)instISAC;
|
||||
if (*ISAC_main_inst != NULL) {
|
||||
instISAC->errorCode = 0;
|
||||
@ -306,7 +307,7 @@ int16_t WebRtcIsac_Create(ISACStruct** ISAC_main_inst) {
|
||||
*/
|
||||
int16_t WebRtcIsac_Free(ISACStruct* ISAC_main_inst) {
|
||||
ISACMainStruct* instISAC = (ISACMainStruct*)ISAC_main_inst;
|
||||
WEBRTC_SPL_FREE(instISAC);
|
||||
free(instISAC);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user