Commit 2cd670d1 authored by Yunqing Wang's avatar Yunqing Wang Committed by Gerrit Code Review

Merge "Combine vpxcx_set_ref example for VP9 and VP10" into nextgenv2

parents e0c265e4 2a5a3f6b
......@@ -218,13 +218,13 @@ vp8cx_set_ref.DESCRIPTION = VP8 set encoder reference frame
# If vp9 is enabled, $(CONFIG_VP9_ENCODER) is yes, otherwise, it is blank.
ifneq (,$(filter yes,$(CONFIG_VP9_ENCODER) $(CONFIG_VP10_ENCODER)))
ifeq ($(CONFIG_DECODERS),yes)
EXAMPLES-yes += vpx_cx_set_ref.c
vpx_cx_set_ref.SRCS += ivfenc.h ivfenc.c
vpx_cx_set_ref.SRCS += tools_common.h tools_common.c
vpx_cx_set_ref.SRCS += video_common.h
vpx_cx_set_ref.SRCS += video_writer.h video_writer.c
vpx_cx_set_ref.GUID = 65D7F14A-2EE6-4293-B958-AB5107A03B55
vpx_cx_set_ref.DESCRIPTION = VP9/VP10 set encoder reference frame
EXAMPLES-yes += vpxcx_set_ref.c
vpxcx_set_ref.SRCS += ivfenc.h ivfenc.c
vpxcx_set_ref.SRCS += tools_common.h tools_common.c
vpxcx_set_ref.SRCS += video_common.h
vpxcx_set_ref.SRCS += video_writer.h video_writer.c
vpxcx_set_ref.GUID = 65D7F14A-2EE6-4293-B958-AB5107A03B55
vpxcx_set_ref.DESCRIPTION = VP9/VP10 set encoder reference frame
endif
endif
......
......@@ -306,7 +306,7 @@ int main(int argc, char **argv) {
unsigned int frame_out = 0;
// The frame number to set reference frame on
int update_frame_num = 0;
unsigned int update_frame_num = 0;
int mismatch_seen = 0;
const int fps = 30;
......@@ -317,7 +317,7 @@ int main(int argc, char **argv) {
const char *height_arg = NULL;
const char *infile_arg = NULL;
const char *outfile_arg = NULL;
int limit = 0;
unsigned int limit = 0;
exec_name = argv[0];
if (argc < 7)
......
......@@ -27,7 +27,12 @@ cx_set_ref_verify_environment() {
# $1 is the codec name.
vpx_set_ref() {
local codec="$1"
local encoder="${LIBVPX_BIN_PATH}/${codec}cx_set_ref${VPX_TEST_EXE_SUFFIX}"
local encoder="${LIBVPX_BIN_PATH}/vpxcx_set_ref${VPX_TEST_EXE_SUFFIX}"
if [ "$codec" = "vp8" ]; then
encoder="${LIBVPX_BIN_PATH}/vp8cx_set_ref${VPX_TEST_EXE_SUFFIX}"
fi
local output_file="${VPX_TEST_OUTPUT_DIR}/${codec}cx_set_ref_${codec}.ivf"
local ref_frame_num=90
......@@ -36,9 +41,15 @@ vpx_set_ref() {
return 1
fi
eval "${VPX_TEST_PREFIX}" "${encoder}" "${YUV_RAW_INPUT_WIDTH}" \
"${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \
"${ref_frame_num}" ${devnull}
if [ "$codec" = "vp8" ]; then
eval "${VPX_TEST_PREFIX}" "${encoder}" "${YUV_RAW_INPUT_WIDTH}" \
"${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \
"${ref_frame_num}" ${devnull}
else
eval "${VPX_TEST_PREFIX}" "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \
"${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \
"${ref_frame_num}" ${devnull}
fi
[ -e "${output_file}" ] || return 1
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment