Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 172723 - media-video/ffmpeg ebuild does not allow cpu-specific optimization
Summary: media-video/ffmpeg ebuild does not allow cpu-specific optimization
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Lowest enhancement (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
: 189007 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-03-30 00:13 UTC by Hendrik Poernama
Modified: 2008-10-14 11:37 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hendrik Poernama 2007-03-30 00:13:50 UTC
The ffdshow ebuild, up to ffmpeg-0.4.9_p20070325, does not pass "--cpu=CPU" to the configure script, and provides no way to do so.

This disables some cpu-specific optimization, such as the CMOV instruction which should be enabled for i686 and above.

I don't know how much optimization is lost by disabling this instruction, but if it is significant enough to be on the configure script, I assume it does have some performance gain.

Suggested fix:
read CFLAGS for "--march", "--mcpu", or "--mtune", and pass the cpu type to configure. If cpu type not specified in CFLAGS, don't pass "--cpu" to configure.
Comment 1 Alexis Ballier gentoo-dev 2008-10-14 09:24:59 UTC
*** Bug 189007 has been marked as a duplicate of this bug. ***
Comment 2 Alexis Ballier gentoo-dev 2008-10-14 11:37:12 UTC
I've added that portion of code to the 0.4.9_p20081014 ebuild; it should do everything correctly :)

    # Try to get cpu type based on CFLAGS.
    # Bug #172723
    # We need to do this so that features of that CPU will be better used
    # If they contain an unknown CPU it will not hurt since ffmpeg's configure
    # will just ignore it.
    local mymarch=$(get-flag march)
    local mymcpu=$(get-flag mcpu)
    local mymtune=$(get-flag mtune)
    for i in $mymarch $mymcpu $mymtune ; do
        myconf="${myconf} --cpu=$i"
        break
    done