[flac-dev] PATCH: x86-64 support and SSE intrinscis code

lvqcl lvqcl.mail at gmail.com
Sun Sep 8 12:51:04 PDT 2013


It's not possible to use ia32/*.nasm code in 64-bit compiles.
There's still no 64-bit asm code in FLAC. I'm not familiar with asm too,
so I wrote SSE-accelerated code using intrinsics.

This code uses two new preprocessor macros:
FLAC__CPU_X86_64 (analogous to FLAC__CPU_IA32)
and FLAC__HAS_X86INTRIN (analogous to FLAC__HAS_NASM)


Patch for cpu.c/cpu.h adds CPU features (sse3, ssse3) detection code
for x86-64 architecture.

Another patch adds SSE-accelerated functions:
     FLAC__lpc_compute_autocorrelation_intrin_sse_lag_4()
     FLAC__lpc_compute_autocorrelation_intrin_sse_lag_8()
     FLAC__lpc_compute_autocorrelation_intrin_sse_lag_12()
     FLAC__lpc_compute_autocorrelation_intrin_sse_lag_16()
     FLAC__lpc_compute_residual_from_qlp_coefficients_16_intrin_sse2()

Note that the new code works only if both FLAC__CPU_X86_64 and FLAC__HAS_X86INTRIN
macros are defined somewhere in config files. Appropriate changes in *.vcproj,
makefiles, configure.ac files are necessary. Unfortunately MSVS 2005 Express Edition
doesn't support creation of 64-bit programs.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpu.patch
Type: application/octet-stream
Size: 4483 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20130908/bcf0ee91/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: intrin.patch
Type: application/octet-stream
Size: 24537 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20130908/bcf0ee91/attachment-0003.obj 


More information about the flac-dev mailing list