Further speed up examples for testing
BUG=aomedia:2645
Change-Id: I725d65962800fe6645c2b8bc075dd198fc4621d2
diff --git a/examples/lightfield_encoder.c b/examples/lightfield_encoder.c
index d22f3b7..947a566 100644
--- a/examples/lightfield_encoder.c
+++ b/examples/lightfield_encoder.c
@@ -261,7 +261,7 @@
die_codec(&codec, "Failed to set frame parallel decoding");
if (aom_codec_control(&codec, AV1E_ENABLE_EXT_TILE_DEBUG, 1))
die_codec(&codec, "Failed to enable encoder ext_tile debug");
- if (aom_codec_control(&codec, AOME_SET_CPUUSED, 2))
+ if (aom_codec_control(&codec, AOME_SET_CPUUSED, 3))
die_codec(&codec, "Failed to set cpu-used");
// Note: The superblock is a sequence parameter and has to be the same for 1
diff --git a/examples/simple_encoder.c b/examples/simple_encoder.c
index ba059d6..9d37f43 100644
--- a/examples/simple_encoder.c
+++ b/examples/simple_encoder.c
@@ -100,6 +100,7 @@
#include <string.h>
#include "aom/aom_encoder.h"
+#include "aom/aomcx.h"
#include "common/tools_common.h"
#include "common/video_writer.h"
@@ -222,6 +223,9 @@
if (aom_codec_enc_init(&codec, encoder, &cfg, 0))
die_codec(&codec, "Failed to initialize encoder");
+ if (aom_codec_control(&codec, AOME_SET_CPUUSED, 2))
+ die_codec(&codec, "Failed to set cpu-used");
+
// Encode frames.
while (aom_img_read(&raw, infile)) {
int flags = 0;
diff --git a/examples/twopass_encoder.c b/examples/twopass_encoder.c
index c052dea..70faada 100644
--- a/examples/twopass_encoder.c
+++ b/examples/twopass_encoder.c
@@ -52,6 +52,7 @@
#include <string.h>
#include "aom/aom_encoder.h"
+#include "aom/aomcx.h"
#include "common/tools_common.h"
#include "common/video_writer.h"
@@ -160,6 +161,9 @@
if (aom_codec_enc_init(&codec, encoder, cfg, 0))
die_codec(&codec, "Failed to initialize encoder");
+ if (aom_codec_control(&codec, AOME_SET_CPUUSED, 2))
+ die_codec(&codec, "Failed to set cpu-used");
+
// Encode frames.
while (aom_img_read(raw, infile) && frame_count < limit) {
++frame_count;
diff --git a/test/tools_common.sh b/test/tools_common.sh
index c087106..d40709b 100755
--- a/test/tools_common.sh
+++ b/test/tools_common.sh
@@ -196,7 +196,7 @@
# Echoes "fast" encode params for use with aomenc.
aomenc_encode_test_fast_params() {
- echo "--cpu-used=1
+ echo "--cpu-used=2
--limit=${AV1_ENCODE_TEST_FRAME_LIMIT}
--lag-in-frames=0
--test-decode=fatal"