[FFmpeg-devel] A ppc patch to fix the fft bug in little endian environment for POWER

Grace Ryan rongyan236 at gmail.com
Wed Jun 11 11:58:25 CEST 2014


I ran the fate test on POWER7 little endian, found errors caused by fft ppc
implementation for big endian. I hereby present this patch, which is to
enable the calculation of the fft with GCC VSX intrincics so that the
endian problem is handled automatically by GCC:

1. Check the cpu flag, if it is POWER7/POWER8, add -mcpu=power7 or
-mcpu=power8 in the configure file
2. If it is POWER7/POWER8, enable the macro HAVE_VSX in the configure file
3. Add fft_vsx.c and fft_vsx.h under the folder ./libavcodec/ppc, when
HAVE_VSX is enabled, use this two files to calculate the fft either in big
endian environment or little endian environment.

The fate test result can be found on http://fate.ffmpeg.org/ by search
"ibmcrl", also attached here to facilitate the review:

The patch file is also attached. Thanks.

Rong Yan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ppc-fix-the-bug-of-fft-for-little-endian-Environment.patch
Type: application/octet-stream
Size: 38144 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140611/2cc57529/attachment.obj>

More information about the ffmpeg-devel mailing list