aboutsummaryrefslogtreecommitdiffstats
path: root/tests/checkasm/h264pred.c
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2015-12-11 14:06:38 +0100
committerJanne Grunau <janne-libav@jannau.net>2015-12-21 17:40:18 +0100
commit711781d7a1714ea4eb0217eb1ba04811978c43d1 (patch)
tree61c7061012c47856da343be6bedee4f5f0784ccd /tests/checkasm/h264pred.c
parentcc29d96d5a379dbcf2649947d884c202c2a52767 (diff)
downloadffmpeg-711781d7a1714ea4eb0217eb1ba04811978c43d1.tar.gz
x86: checkasm: check for or handle missing cleanup after MMX instructions
Not every asm routine is expected clear the MMX state after returning. It is however a requisite for testing floating point code in checkasm. Annotate functions requiring cleanup with declare_func_emms() and issue emms after the call. The remaining functions are checked for having a cleared MMX state after return.
Diffstat (limited to 'tests/checkasm/h264pred.c')
-rw-r--r--tests/checkasm/h264pred.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/checkasm/h264pred.c b/tests/checkasm/h264pred.c
index a1ee720fae..6dffa3484d 100644
--- a/tests/checkasm/h264pred.c
+++ b/tests/checkasm/h264pred.c
@@ -144,7 +144,7 @@ static void check_pred4x4(H264PredContext *h, uint8_t *buf0, uint8_t *buf1,
if (chroma_format == 1) {
uint8_t *topright = buf0 + 2*16;
int pred_mode;
- declare_func(void, uint8_t *src, const uint8_t *topright, ptrdiff_t stride);
+ declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT, void, uint8_t *src, const uint8_t *topright, ptrdiff_t stride);
for (pred_mode = 0; pred_mode < 15; pred_mode++) {
if (check_pred_func(h->pred4x4[pred_mode], "4x4", pred4x4_modes[codec][pred_mode])) {
@@ -163,7 +163,7 @@ static void check_pred8x8(H264PredContext *h, uint8_t *buf0, uint8_t *buf1,
int codec, int chroma_format, int bit_depth)
{
int pred_mode;
- declare_func(void, uint8_t *src, ptrdiff_t stride);
+ declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT, void, uint8_t *src, ptrdiff_t stride);
for (pred_mode = 0; pred_mode < 11; pred_mode++) {
if (check_pred_func(h->pred8x8[pred_mode], (chroma_format == 2) ? "8x16" : "8x8",
@@ -183,7 +183,7 @@ static void check_pred16x16(H264PredContext *h, uint8_t *buf0, uint8_t *buf1,
{
if (chroma_format == 1) {
int pred_mode;
- declare_func(void, uint8_t *src, ptrdiff_t stride);
+ declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT, void, uint8_t *src, ptrdiff_t stride);
for (pred_mode = 0; pred_mode < 9; pred_mode++) {
if (check_pred_func(h->pred16x16[pred_mode], "16x16", pred16x16_modes[codec][pred_mode])) {
@@ -203,7 +203,7 @@ static void check_pred8x8l(H264PredContext *h, uint8_t *buf0, uint8_t *buf1,
{
if (chroma_format == 1 && codec_ids[codec] == AV_CODEC_ID_H264) {
int pred_mode;
- declare_func(void, uint8_t *src, int topleft, int topright, ptrdiff_t stride);
+ declare_func_emms(AV_CPU_FLAG_MMXEXT, void, uint8_t *src, int topleft, int topright, ptrdiff_t stride);
for (pred_mode = 0; pred_mode < 12; pred_mode++) {
if (check_pred_func(h->pred8x8l[pred_mode], "8x8l", pred4x4_modes[codec][pred_mode])) {