aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2017-04-04 08:41:32 -0700
committerMarco Nelissen <marcone@google.com>2017-04-10 15:21:55 -0700
commitb388f97dede567d1d3a25ed31788e35d95a501c7 (patch)
tree626e8b59780b1f71ca121f4d8ab31e3a38af0e1f
parent12d45ee7d182123c815f53070b5f5f7259cc5ca1 (diff)
downloadlibvpx-b388f97dede567d1d3a25ed31788e35d95a501c7.tar.gz
Limit vpx decoder to 4K frames
Bug: 34360591 Change-Id: If66c3498b9a7052219af2dcaa2ef33e1408a8587
-rw-r--r--config/arm-neon/vpx_config.asm2
-rw-r--r--config/arm-neon/vpx_config.c2
-rw-r--r--config/arm-neon/vpx_config.h4
-rw-r--r--config/arm/vpx_config.asm2
-rw-r--r--config/arm/vpx_config.c2
-rw-r--r--config/arm/vpx_config.h4
-rw-r--r--config/arm64/vpx_config.asm2
-rw-r--r--config/arm64/vpx_config.c2
-rw-r--r--config/arm64/vpx_config.h4
-rw-r--r--config/generic/vpx_config.asm2
-rw-r--r--config/generic/vpx_config.c2
-rw-r--r--config/generic/vpx_config.h4
-rw-r--r--config/mips32-dspr2/vpx_config.c2
-rw-r--r--config/mips32-dspr2/vpx_config.h4
-rw-r--r--config/mips32/vpx_config.c2
-rw-r--r--config/mips32/vpx_config.h4
-rw-r--r--config/mips64/vpx_config.c2
-rw-r--r--config/mips64/vpx_config.h4
-rw-r--r--config/x86/vpx_config.asm2
-rw-r--r--config/x86/vpx_config.c2
-rw-r--r--config/x86/vpx_config.h4
-rw-r--r--config/x86_64/vpx_config.asm2
-rw-r--r--config/x86_64/vpx_config.c2
-rw-r--r--config/x86_64/vpx_config.h4
-rwxr-xr-xgenerate_config.sh2
25 files changed, 43 insertions, 25 deletions
diff --git a/config/arm-neon/vpx_config.asm b/config/arm-neon/vpx_config.asm
index 4f94dc971..6793fbef6 100644
--- a/config/arm-neon/vpx_config.asm
+++ b/config/arm-neon/vpx_config.asm
@@ -75,7 +75,7 @@
.equ CONFIG_VP9_HIGHBITDEPTH , 0
.equ CONFIG_BETTER_HW_COMPATIBILITY , 0
.equ CONFIG_EXPERIMENTAL , 0
-.equ CONFIG_SIZE_LIMIT , 0
+.equ CONFIG_SIZE_LIMIT , 1
.equ CONFIG_SPATIAL_SVC , 0
.equ CONFIG_FP_MB_STATS , 0
.equ CONFIG_EMULATE_HARDWARE , 0
diff --git a/config/arm-neon/vpx_config.c b/config/arm-neon/vpx_config.c
index 48dd6068c..0eb0a305c 100644
--- a/config/arm-neon/vpx_config.c
+++ b/config/arm-neon/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=armv7-linux-gcc --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=armv7-linux-gcc --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/arm-neon/vpx_config.h b/config/arm-neon/vpx_config.h
index 180b748b9..ad4700e67 100644
--- a/config/arm-neon/vpx_config.h
+++ b/config/arm-neon/vpx_config.h
@@ -84,9 +84,11 @@
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_BETTER_HW_COMPATIBILITY 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
#define CONFIG_MISC_FIXES 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/arm/vpx_config.asm b/config/arm/vpx_config.asm
index 85aff65af..cfc90ef09 100644
--- a/config/arm/vpx_config.asm
+++ b/config/arm/vpx_config.asm
@@ -75,7 +75,7 @@
.equ CONFIG_VP9_HIGHBITDEPTH , 0
.equ CONFIG_BETTER_HW_COMPATIBILITY , 0
.equ CONFIG_EXPERIMENTAL , 0
-.equ CONFIG_SIZE_LIMIT , 0
+.equ CONFIG_SIZE_LIMIT , 1
.equ CONFIG_SPATIAL_SVC , 0
.equ CONFIG_FP_MB_STATS , 0
.equ CONFIG_EMULATE_HARDWARE , 0
diff --git a/config/arm/vpx_config.c b/config/arm/vpx_config.c
index c049ac30d..7bc1805f6 100644
--- a/config/arm/vpx_config.c
+++ b/config/arm/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=armv7-linux-gcc --disable-neon --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=armv7-linux-gcc --disable-neon --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/arm/vpx_config.h b/config/arm/vpx_config.h
index dca9447b0..c109834a7 100644
--- a/config/arm/vpx_config.h
+++ b/config/arm/vpx_config.h
@@ -84,9 +84,11 @@
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_BETTER_HW_COMPATIBILITY 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
#define CONFIG_MISC_FIXES 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/arm64/vpx_config.asm b/config/arm64/vpx_config.asm
index dbb9bf61c..2c1c1bd32 100644
--- a/config/arm64/vpx_config.asm
+++ b/config/arm64/vpx_config.asm
@@ -75,7 +75,7 @@
.equ CONFIG_VP9_HIGHBITDEPTH , 0
.equ CONFIG_BETTER_HW_COMPATIBILITY , 0
.equ CONFIG_EXPERIMENTAL , 0
-.equ CONFIG_SIZE_LIMIT , 0
+.equ CONFIG_SIZE_LIMIT , 1
.equ CONFIG_SPATIAL_SVC , 0
.equ CONFIG_FP_MB_STATS , 0
.equ CONFIG_EMULATE_HARDWARE , 0
diff --git a/config/arm64/vpx_config.c b/config/arm64/vpx_config.c
index 50e1a4ba1..ff9121723 100644
--- a/config/arm64/vpx_config.c
+++ b/config/arm64/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--force-target=armv8-linux-gcc --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--force-target=armv8-linux-gcc --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/arm64/vpx_config.h b/config/arm64/vpx_config.h
index 26f42a42e..7f7e77897 100644
--- a/config/arm64/vpx_config.h
+++ b/config/arm64/vpx_config.h
@@ -84,9 +84,11 @@
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_BETTER_HW_COMPATIBILITY 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
#define CONFIG_MISC_FIXES 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/generic/vpx_config.asm b/config/generic/vpx_config.asm
index c14d7a457..a7980edf0 100644
--- a/config/generic/vpx_config.asm
+++ b/config/generic/vpx_config.asm
@@ -75,7 +75,7 @@
.equ CONFIG_VP9_HIGHBITDEPTH , 0
.equ CONFIG_BETTER_HW_COMPATIBILITY , 0
.equ CONFIG_EXPERIMENTAL , 0
-.equ CONFIG_SIZE_LIMIT , 0
+.equ CONFIG_SIZE_LIMIT , 1
.equ CONFIG_SPATIAL_SVC , 0
.equ CONFIG_FP_MB_STATS , 0
.equ CONFIG_EMULATE_HARDWARE , 0
diff --git a/config/generic/vpx_config.c b/config/generic/vpx_config.c
index 269eb8237..c6d3e14c5 100644
--- a/config/generic/vpx_config.c
+++ b/config/generic/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=generic-gnu --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=generic-gnu --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/generic/vpx_config.h b/config/generic/vpx_config.h
index b01b6ee3d..2595c715a 100644
--- a/config/generic/vpx_config.h
+++ b/config/generic/vpx_config.h
@@ -84,9 +84,11 @@
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_BETTER_HW_COMPATIBILITY 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
#define CONFIG_MISC_FIXES 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/mips32-dspr2/vpx_config.c b/config/mips32-dspr2/vpx_config.c
index b2f14a386..1aa002457 100644
--- a/config/mips32-dspr2/vpx_config.c
+++ b/config/mips32-dspr2/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=mips32-linux-gcc --enable-dspr2 --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=mips32-linux-gcc --enable-dspr2 --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/mips32-dspr2/vpx_config.h b/config/mips32-dspr2/vpx_config.h
index fb6a4f295..5eebf2f60 100644
--- a/config/mips32-dspr2/vpx_config.h
+++ b/config/mips32-dspr2/vpx_config.h
@@ -84,9 +84,11 @@
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_BETTER_HW_COMPATIBILITY 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
#define CONFIG_MISC_FIXES 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/mips32/vpx_config.c b/config/mips32/vpx_config.c
index c993eb6dc..e2703b374 100644
--- a/config/mips32/vpx_config.c
+++ b/config/mips32/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=mips32-linux-gcc --disable-dspr2 --disable-msa --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=mips32-linux-gcc --disable-dspr2 --disable-msa --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/mips32/vpx_config.h b/config/mips32/vpx_config.h
index f4eff1d39..161ce7383 100644
--- a/config/mips32/vpx_config.h
+++ b/config/mips32/vpx_config.h
@@ -84,9 +84,11 @@
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_BETTER_HW_COMPATIBILITY 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
#define CONFIG_MISC_FIXES 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/mips64/vpx_config.c b/config/mips64/vpx_config.c
index 3750612e0..f7ec4e6d8 100644
--- a/config/mips64/vpx_config.c
+++ b/config/mips64/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=mips64-linux-gcc --disable-msa --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=mips64-linux-gcc --disable-msa --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/mips64/vpx_config.h b/config/mips64/vpx_config.h
index 238866e05..7d36ef7a8 100644
--- a/config/mips64/vpx_config.h
+++ b/config/mips64/vpx_config.h
@@ -84,9 +84,11 @@
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_BETTER_HW_COMPATIBILITY 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
#define CONFIG_MISC_FIXES 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/x86/vpx_config.asm b/config/x86/vpx_config.asm
index 9e3068552..a98bb7d5e 100644
--- a/config/x86/vpx_config.asm
+++ b/config/x86/vpx_config.asm
@@ -72,7 +72,7 @@
%define CONFIG_VP9_HIGHBITDEPTH 0
%define CONFIG_BETTER_HW_COMPATIBILITY 0
%define CONFIG_EXPERIMENTAL 0
-%define CONFIG_SIZE_LIMIT 0
+%define CONFIG_SIZE_LIMIT 1
%define CONFIG_SPATIAL_SVC 0
%define CONFIG_FP_MB_STATS 0
%define CONFIG_EMULATE_HARDWARE 0
diff --git a/config/x86/vpx_config.c b/config/x86/vpx_config.c
index 4b7c558e4..77a386493 100644
--- a/config/x86/vpx_config.c
+++ b/config/x86/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=x86-linux-gcc --disable-sse4_1 --disable-avx --disable-avx2 --as=yasm --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=x86-linux-gcc --disable-sse4_1 --disable-avx --disable-avx2 --as=yasm --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/x86/vpx_config.h b/config/x86/vpx_config.h
index c4c38aa20..8e55740d7 100644
--- a/config/x86/vpx_config.h
+++ b/config/x86/vpx_config.h
@@ -84,9 +84,11 @@
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_BETTER_HW_COMPATIBILITY 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
#define CONFIG_MISC_FIXES 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/x86_64/vpx_config.asm b/config/x86_64/vpx_config.asm
index 8d815048d..5994534ea 100644
--- a/config/x86_64/vpx_config.asm
+++ b/config/x86_64/vpx_config.asm
@@ -72,7 +72,7 @@
%define CONFIG_VP9_HIGHBITDEPTH 0
%define CONFIG_BETTER_HW_COMPATIBILITY 0
%define CONFIG_EXPERIMENTAL 0
-%define CONFIG_SIZE_LIMIT 0
+%define CONFIG_SIZE_LIMIT 1
%define CONFIG_SPATIAL_SVC 0
%define CONFIG_FP_MB_STATS 0
%define CONFIG_EMULATE_HARDWARE 0
diff --git a/config/x86_64/vpx_config.c b/config/x86_64/vpx_config.c
index 2561717a3..9aa0640aa 100644
--- a/config/x86_64/vpx_config.c
+++ b/config/x86_64/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=x86_64-linux-gcc --disable-sse4_1 --disable-avx --disable-avx2 --as=yasm --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=x86_64-linux-gcc --disable-sse4_1 --disable-avx --disable-avx2 --as=yasm --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/x86_64/vpx_config.h b/config/x86_64/vpx_config.h
index b602d3f0a..64cff3aeb 100644
--- a/config/x86_64/vpx_config.h
+++ b/config/x86_64/vpx_config.h
@@ -84,9 +84,11 @@
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_BETTER_HW_COMPATIBILITY 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
#define CONFIG_MISC_FIXES 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/generate_config.sh b/generate_config.sh
index fa33f7b0d..4f45fab1c 100755
--- a/generate_config.sh
+++ b/generate_config.sh
@@ -140,7 +140,7 @@ cp -R $LIBVPX_SRC_DIR $TEMP_DIR
cd $TEMP_DIR
echo "Generate config files."
-all_platforms="--enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect"
+all_platforms="--enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072"
intel="--disable-sse4_1 --disable-avx --disable-avx2 --as=yasm"
gen_config_files x86 "--target=x86-linux-gcc ${intel} ${all_platforms}"
gen_config_files x86_64 "--target=x86_64-linux-gcc ${intel} ${all_platforms}"