# 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
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;
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)
# $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
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
}