Bug 108417 - media-video/mjpegtools-1.8.0: enable-simd-accel works for amd64
Bug#: 108417 Product:  Gentoo Linux Version: unspecified Platform: AMD64
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: amd64@gentoo.org Reported By: j.romildo@gmail.com
Component: Applications
URL: 
Summary: media-video/mjpegtools-1.8.0: enable-simd-accel works for amd64
Keywords:  
Status Whiteboard: 
Opened: 2005-10-07 11:52 0000
Description:   Opened: 2005-10-07 11:52 0000
One of the improvements of the new mjpegtools version (1.8.0) is assembly
optimizations (simd-accel) for amd64. But on the ebuild in portage, it is enable
only for the x86 arch. Please, enable simd-accel also for amd64. I have been
using it on my Athlon64 machine for some months now (from CVS and now with the
released version), and it works for me.

Reproducible: Always
Steps to Reproduce:

------- Comment #1 From José Romildo Malaquias 2005-10-07 12:17:49 0000 -------
I have been using mjpegtools-1.8.0 (and prior release candidates) on amd64,
compiled with enable-simd-accel and without the flag -mno-sse2 with gcc-3.4.4,
without problems. So, I believe that the ebuild line

    [[ $(gcc-major-version) -eq 3 ]] && append-flags -mno-sse2

(which is already executed for the x86 arch) should not be aplied to the amd64 arch.

------- Comment #2 From José Romildo Malaquias 2005-10-07 12:21:43 0000 -------
Created an attachment (id=70111) [details]
mjpegtools-1.8.0.ebuild.diff

Here is my patch for mjpegtools-1.8.0.ebuild from portage. It will use the
following configure options with the amd64 arch:

   --enable-simd-accel
   --enable-cmov-extension

------- Comment #3 From Simon Stelling (RETIRED) 2005-10-07 15:41:27 0000 -------
Created an attachment (id=70121) [details]
patch including dependencies

i think we need a dependency upon nasm too, since the amd64 masks all assembler
use flags. can't test it though as avifile doesn't build here :/

------- Comment #4 From José Romildo Malaquias 2005-10-07 19:19:14 0000 -------
I do not think nasm is needed. Without nasm installed on my system, I get the
following from configure:

[...]
checking if C compiler accepts inline MMX assembly... yes
[...]
configure:  MJPEG tools 1.8.0 build configuration :
configure:
configure:   - X86 Optimizations:
configure:     - MMX/3DNow!/SSE enabled      : true
configure:   - arch/cpu compiler flags       : -march=x86-64 -mcpu=x86-64
[...]

Regardless of nasm being installed on my system, it is not mentioned on the
output of "emerge -v mjpegtools".

So, I believe nasm is neither needed nor used for SIMD multimedia instructions
on amd64, and the dependency on nasm is wrong.

The assembly use flags (mmx, sse, ...) is not used to enable the optimizations.
They are _always_ enabled with the enable-simd-accel option for the amd64 arch.

------- Comment #5 From Simon Stelling (RETIRED) 2005-10-08 02:20:23 0000 -------
(From update of attachment 70111 [details])
oh well, sorry then :)

------- Comment #6 From Simon Stelling (RETIRED) 2005-11-01 12:48:10 0000 -------
-r1 enables SIMD, thanks for the patch!