[FFmpeg-devel] Subject: [PATCH] avutil/x86/bswap: Add msvc bswap instrinsics.

Matt Oliver protogonoi at gmail.com
Mon Nov 9 10:31:25 CET 2015


The existing bswap code causes incorrect code generation with icl which was
breaking fate (apparently we dont have a dedicated icl fate client
anymore). This patch adds in msvc intrinsics for bswap operations which
aids both msvc and icl (although msvc previously generated correct code the
intrinsics still serve as an optimisation).

For future reference there are equivalent intrinsics supplied by the intel
compiler itself however i found that on a few rare occasions the 16bit
rotate (bswap16) instrinsic would incorrectly generate a 32bit rotate on
some 32bit code. The intel compiler for 32bit output seems to get register
starved and tries to use a rotate directly on a destination memory pointer,
however it incorrectly sets it as a dword pointer and performs 32bit
rotate.

Using the msvc supplied intrinsics is the only way to ensure correct code
output and without it icl fails to pass fate. I would also suggest that
this patch gets added to the 2.8 branch aswell.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-avutil-x86-bswap-Add-msvc-bswap-instrinsics.patch
Type: application/octet-stream
Size: 1285 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151109/d8aa17e9/attachment.obj>


More information about the ffmpeg-devel mailing list