Added buildbot benchmarking in iSAC and APM into Android platform build.

Review URL: https://webrtc-codereview.appspot.com/964022

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3247 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kma@webrtc.org
2012-12-07 15:26:28 +00:00
parent b968213f3c
commit 0e739508e0
8 changed files with 74 additions and 18 deletions

View File

@@ -119,7 +119,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES:= ../test/kenny.c
LOCAL_SRC_FILES:= ../test/kenny.cc
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS)
@@ -131,7 +131,8 @@ LOCAL_C_INCLUDES := \
LOCAL_STATIC_LIBRARIES := \
libwebrtc_isacfix \
libwebrtc_spl \
libwebrtc_system_wrappers
libwebrtc_system_wrappers \
libwebrtc_test_support
ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)
LOCAL_STATIC_LIBRARIES += \

View File

@@ -8,16 +8,17 @@
* be found in the AUTHORS file in the root of the source tree.
*/
/* kenny.c - Main function for the iSAC coder */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#include "isacfix.h"
#include "webrtc/modules/audio_coding/codecs/isac/fix/interface/isacfix.h"
#include "webrtc/test/testsupport/perf_test.h"
// TODO(kma): Clean up the code and change benchmarking the whole codec to
// separate encoder and decoder.
/* Defines */
#define SEED_FILE "randseed.txt" /* Used when running decoder on garbage data */
@@ -170,7 +171,7 @@ int main(int argc, char* argv[])
" in adaptive mode.\n\n");
printf("[-FL num] :Set (initial) frame length in msec. Valid length"
" are 30 and 60 msec.\n\n");
printf("[-FIXED_FL] :Frame length will be fixed to initial value.\n\n");
printf("[-FIXED_FL] :Frame length to be fixed to initial value.\n\n");
printf("[-MAX num] :Set the limit for the payload size of iSAC"
" in bytes. \n");
printf(" Minimum 100, maximum 400.\n\n");
@@ -374,7 +375,8 @@ int main(int argc, char* argv[])
sscanf(argv[CodingMode+1], "%s", bottleneck_file);
f_bn = fopen(bottleneck_file, "rb");
if (f_bn == NULL) {
printf("No value provided for BottleNeck and cannot read file %s\n", bottleneck_file);
printf("No value provided for BottleNeck and cannot read file %s\n",
bottleneck_file);
exit(0);
} else {
int aux_var;
@@ -565,8 +567,8 @@ int main(int argc, char* argv[])
shortdata,
(WebRtc_Word16*)streamdata);
/* If packet is ready, and CE testing, call the different API functions
from the internal API. */
/* If packet is ready, and CE testing, call the different API
functions from the internal API. */
if (stream_len>0) {
if (testCE == 1) {
err = WebRtcIsacfix_ReadBwIndex((WebRtc_Word16*)streamdata, &bwe);
@@ -808,6 +810,10 @@ int main(int argc, char* argv[])
runtime, (100*runtime/length_file));
printf("\n\n_______________________________________________\n");
// Record the results with Perf test tools.
webrtc::test::PrintResult("time_per_10ms_frame", "", "isac",
(runtime * 10000) / length_file, "us", false);
fclose(inp);
fclose(outp);
fclose(outbits);

View File

@@ -14,13 +14,14 @@
'type': 'executable',
'dependencies': [
'iSACFix',
'<(webrtc_root)/test/test.gyp:test_support',
],
'include_dirs': [
'./fix/test',
'./fix/interface',
],
'sources': [
'./fix/test/kenny.c',
'./fix/test/kenny.cc',
],
},
],