iSAC tests: Type buffers as uint8_t[] to avoid casts
The iSAC interface functions now expect uint8_t arrays, so change some arrays to be of that type instead of casting at each point of use. R=bjornv@webrtc.org, henrik.lundin@webrtc.org Review URL: https://webrtc-codereview.appspot.com/31689004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7433 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
d4fe824862
commit
a3722b643d
@ -93,7 +93,7 @@ int main(int argc, char* argv[])
|
||||
//FILE logFile;
|
||||
bool doTransCoding = false;
|
||||
int32_t rateTransCoding = 0;
|
||||
uint16_t streamDataTransCoding[600];
|
||||
uint8_t streamDataTransCoding[1200];
|
||||
int16_t streamLenTransCoding = 0;
|
||||
FILE* transCodingFile = NULL;
|
||||
FILE* transcodingBitstream = NULL;
|
||||
@ -691,7 +691,7 @@ int main(int argc, char* argv[])
|
||||
bnIdxTC,
|
||||
jitterInfoTC,
|
||||
rateTransCoding,
|
||||
reinterpret_cast<uint8_t*>(streamDataTransCoding),
|
||||
streamDataTransCoding,
|
||||
false);
|
||||
if(streamLenTransCoding < 0)
|
||||
{
|
||||
@ -710,7 +710,7 @@ int main(int argc, char* argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fwrite((uint8_t*)streamDataTransCoding,
|
||||
if (fwrite(streamDataTransCoding,
|
||||
sizeof(uint8_t),
|
||||
streamLenTransCoding,
|
||||
transcodingBitstream) !=
|
||||
@ -718,8 +718,7 @@ int main(int argc, char* argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
WebRtcIsac_ReadBwIndex(reinterpret_cast<const uint8_t*>(
|
||||
streamDataTransCoding),
|
||||
WebRtcIsac_ReadBwIndex(streamDataTransCoding,
|
||||
&indexStream);
|
||||
if (indexStream != bnIdxTC) {
|
||||
fprintf(stderr, "Error in inserting Bandwidth index into transcoding stream.\n");
|
||||
@ -795,7 +794,7 @@ int main(int argc, char* argv[])
|
||||
bnIdxTC,
|
||||
jitterInfoTC,
|
||||
rateTransCoding,
|
||||
reinterpret_cast<uint8_t*>(streamDataTransCoding),
|
||||
streamDataTransCoding,
|
||||
true);
|
||||
if(streamLenTransCoding < 0)
|
||||
{
|
||||
@ -920,7 +919,7 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
declenTC = WebRtcIsac_DecodeRcu(
|
||||
decoderTransCoding,
|
||||
reinterpret_cast<const uint8_t*>(streamDataTransCoding),
|
||||
streamDataTransCoding,
|
||||
streamLenTransCoding,
|
||||
decodedTC,
|
||||
speechType);
|
||||
@ -938,7 +937,7 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
declenTC = WebRtcIsac_Decode(
|
||||
decoderTransCoding,
|
||||
reinterpret_cast<const uint8_t*>(streamDataTransCoding),
|
||||
streamDataTransCoding,
|
||||
streamLenTransCoding,
|
||||
decodedTC,
|
||||
speechType);
|
||||
|
@ -102,8 +102,8 @@ int main(int argc, char* argv[])
|
||||
unsigned int tmpSumStreamLen = 0;
|
||||
unsigned int packetCntr = 0;
|
||||
unsigned int lostPacketCntr = 0;
|
||||
uint16_t payload[600];
|
||||
uint16_t payloadRCU[600];
|
||||
uint8_t payload[1200];
|
||||
uint8_t payloadRCU[1200];
|
||||
uint16_t packetLossPercent = 0;
|
||||
int16_t rcuStreamLen = 0;
|
||||
int onlyEncode;
|
||||
@ -376,7 +376,7 @@ valid values are 8 and 16.\n", sampFreqKHz);
|
||||
stream_len = WebRtcIsac_Encode(
|
||||
ISAC_main_inst,
|
||||
shortdata,
|
||||
(uint8_t*)payload);
|
||||
payload);
|
||||
|
||||
if(stream_len < 0)
|
||||
{
|
||||
@ -396,12 +396,12 @@ valid values are 8 and 16.\n", sampFreqKHz);
|
||||
}
|
||||
|
||||
rcuStreamLen = WebRtcIsac_GetRedPayload(
|
||||
ISAC_main_inst, (uint8_t*)payloadRCU);
|
||||
ISAC_main_inst, payloadRCU);
|
||||
|
||||
get_arrival_time(cur_framesmpls, stream_len, bottleneck, &packetData,
|
||||
sampFreqKHz * 1000, sampFreqKHz * 1000);
|
||||
if(WebRtcIsac_UpdateBwEstimate(ISAC_main_inst,
|
||||
(const uint8_t*)payload,
|
||||
payload,
|
||||
stream_len,
|
||||
packetData.rtp_number,
|
||||
packetData.sample_count,
|
||||
@ -460,7 +460,7 @@ valid values are 8 and 16.\n", sampFreqKHz);
|
||||
{
|
||||
declen = WebRtcIsac_DecodeRcu(
|
||||
ISAC_main_inst,
|
||||
(const uint8_t*)payloadRCU,
|
||||
payloadRCU,
|
||||
rcuStreamLen,
|
||||
decoded,
|
||||
speechType);
|
||||
@ -470,7 +470,7 @@ valid values are 8 and 16.\n", sampFreqKHz);
|
||||
{
|
||||
declen = WebRtcIsac_Decode(
|
||||
ISAC_main_inst,
|
||||
(const uint8_t*)payload,
|
||||
payload,
|
||||
stream_len,
|
||||
decoded,
|
||||
speechType);
|
||||
|
Loading…
Reference in New Issue
Block a user