From: Scott LaVarnway Date: Fri, 15 Mar 2013 21:27:15 +0000 (-0700) Subject: Bug fix: Issue 532: VPX codec executes emms instruction without X-Git-Tag: v1.3.0~1158^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3299f8880062acb198ba43a4fbd1118c5e5d7f7b;p=libvpx 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 --- diff --git a/vp8/common/generic/systemdependent.c b/vp8/common/generic/systemdependent.c index 2de019d70..d84df3348 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 ee892ded2..9ebf389d8 100644 --- a/vp8/common/rtcd_defs.sh +++ b/vp8/common/rtcd_defs.sh @@ -18,6 +18,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 # diff --git a/vp8/common/systemdependent.h b/vp8/common/systemdependent.h index f99c4bb2a..e6b0456f7 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 *);