1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-29 05:57:37 +02:00

avutil/avassert: Add av_assertX_fpu()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2016-10-21 12:50:03 +02:00
parent 2c1d38d1e1
commit f5495c970c
4 changed files with 26 additions and 1 deletions

View File

@@ -125,3 +125,16 @@ AVRational av_get_time_base_q(void)
{
return (AVRational){1, AV_TIME_BASE};
}
void av_assert0_fpu(void) {
#if HAVE_MMX_INLINE
uint16_t state[14];
__asm volatile (
"fstenv %0 \n\t"
: "+m" (state)
:
: "memory"
);
av_assert0((state[4] & 3) == 3);
#endif
}