setup experimental infrastructure
This patch creates some basic infrastructure for doing bitstream-
incompatible changes to the VP8 encoder. The key parts are:
- --enable-experimental configure switch, to enable support for this
incompatible bitstream. This switch is required to be set to enable
any "experiments"
- A list for "experiments" which translate into --enable-<experiment>
options and CONFIG_<experiment> macros.
- The high bit of the "Version" field is used to indicate that the
bitstream was produced by an experimental encoder. The decoder will
fail to decode an experimental bitstream without
--enable-experimental.
- A new "vp8x" encoder interface is created to set the experimental
bit.
- The vp8x encoder interface is made the default for ivfenc in
experimental mode.
Change-Id: Idbdd5eae4cec5becf75bb4770837dcd256b2abef
diff --git a/configure b/configure
index d7d041c..8fa56fe 100755
--- a/configure
+++ b/configure
@@ -203,6 +203,8 @@
pthread_h
sys_mman_h
"
+EXPERIMENT_LIST="
+"
CONFIG_LIST="
external_build
install_docs
@@ -242,6 +244,9 @@
static_msvcrt
spatial_resampling
realtime_only
+
+ experimental
+ ${EXPERIMENT_LIST}
"
CMDLINE_SELECT="
extra_warnings
@@ -280,6 +285,7 @@
mem_tracker
spatial_resampling
realtime_only
+ experimental
"
process_cmdline() {
@@ -287,6 +293,18 @@
optval="${opt#*=}"
case "$opt" in
--disable-codecs) for c in ${CODECS}; do disable $c; done ;;
+ --enable-?*|--disable-?*)
+ eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
+ if echo "${EXPERIMENT_LIST}" | grep "^ *$option\$" >/dev/null; then
+ if enabled experimental; then
+ $action $option
+ else
+ log_echo "Ignoring $opt -- not in experimental mode."
+ fi
+ else
+ process_common_cmdline $opt
+ fi
+ ;;
*) process_common_cmdline $opt
;;
esac