Skip to content

Commit 341bf3d

Browse files
committed
allow compiling ffmpeg on non x86 platforms
The assembly instruction emms is only available on the x86 platform and given the existing __SSE_MATH__ check it is not required when the compiler is using sse for floating point math. Add a check to only enable when not using __SSE_MATH__ and when mmx is available with __pentium_mmx__ In my case the instruction doesn't compile on arm.
1 parent dfff979 commit 341bf3d

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ Bugfixes
8585
* Fixed leak in vloopback.
8686
* Fixed a build of motion for some kernel version with not good videodev.h
8787
* Fix webhttpd race condition crash with SIGHUP, add it to running thread counter (David Fries)
88+
* Limit asm emms call to allow compiling on non x86 (ARM) systems (David Fries)
8889

8990
3.2.12 Summary of Changes
9091

CREDITS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ David Fries
477477
* Fix webhttpd race condition crash with SIGHUP, add it to running thread counter
478478
* Allow text format specifiers to take a width like printf would.
479479
* Add power_line_frequency configuration item to improve image quality.
480+
* Limit asm emms call to allow compiling on non x86 (ARM) systems
480481

481482
Aaron Gage
482483
* Pointed me to the vid_mmap/int problem when calling SYNC in

ffmpeg.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,8 @@ void ffmpeg_deinterlace(unsigned char *img, int width, int height)
10001000
/* We assume using 'PIX_FMT_YUV420P' always */
10011001
avpicture_deinterlace(&picture, &picture, PIX_FMT_YUV420P, width, height);
10021002

1003-
#ifndef __SSE_MATH__
1003+
#if !defined(__SSE_MATH__) && defined(__pentium_mmx__)
1004+
/* re-allow floating point operations, x86-32 only */
10041005
__asm__ __volatile__ ( "emms");
10051006
#endif
10061007

0 commit comments

Comments
 (0)