From 3299f8880062acb198ba43a4fbd1118c5e5d7f7b Mon Sep 17 00:00:00 2001 From: Scott LaVarnway Date: Fri, 15 Mar 2013 14:27:15 -0700 Subject: [PATCH] Bug fix: Issue 532: VPX codec executes emms instruction without checking CPU capabilities Reported by Krzysztof Kaspruk. https://code.google.com/p/webm/issues/detail?id=532 Change-Id: I9efa693b0c33694c871189841b8ac59c1fc554e2 --- vp8/common/generic/systemdependent.c | 1 + vp8/common/rtcd_defs.sh | 7 +++++++ vp8/common/systemdependent.h | 6 ------ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/vp8/common/generic/systemdependent.c b/vp8/common/generic/systemdependent.c index 2de019d706..d84df33481 100644 --- a/vp8/common/generic/systemdependent.c +++ b/vp8/common/generic/systemdependent.c @@ -82,6 +82,7 @@ static int get_cpu_count() } #endif +void vp8_clear_system_state_c() {}; void vp8_machine_specific_config(VP8_COMMON *ctx) { diff --git a/vp8/common/rtcd_defs.sh b/vp8/common/rtcd_defs.sh index ee892ded26..9ebf389d8c 100644 --- a/vp8/common/rtcd_defs.sh +++ b/vp8/common/rtcd_defs.sh @@ -19,6 +19,13 @@ EOF forward_decls vp8_common_forward_decls # +# system state +# +prototype void vp8_clear_system_state "" +specialize vp8_clear_system_state mmx +vp8_clear_system_state_mmx=vpx_reset_mmx_state + +# # Dequant # prototype void vp8_dequantize_b "struct blockd*, short *dqc" diff --git a/vp8/common/systemdependent.h b/vp8/common/systemdependent.h index f99c4bb2af..e6b0456f75 100644 --- a/vp8/common/systemdependent.h +++ b/vp8/common/systemdependent.h @@ -10,12 +10,6 @@ #include "vpx_config.h" -#if ARCH_X86 || ARCH_X86_64 -void vpx_reset_mmx_state(void); -#define vp8_clear_system_state() vpx_reset_mmx_state() -#else -#define vp8_clear_system_state() -#endif struct VP8Common; void vp8_machine_specific_config(struct VP8Common *); -- 2.11.4.GIT