[FFmpeg-devel] Mixed data type in SIMD code?

Zuxy Meng zuxy.meng
Mon Mar 3 10:25:52 CET 2008


I've always been unsure about the performance penalty (if there's any)
brought in by using SIMD instructions that mismatch with the actual
data type. For example to use pxor to clear a register that is later
used as packet single, or to use movlhps to move part of a register
that is later used as packet integer or packet double.

These instructions are bitwise equivalent, but instructions operating
on packed integer and packed single are usually shorter than those on
packed double, so Intel recommends only to differentiate integers and
floatings, and to use *ps instructions even for packed doubles. Don't
know what AMD suggests. So does that mean we should replace things
like movapd, movlhpd, xorpd and andpd with their *ps equivalents?

Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6

More information about the ffmpeg-devel mailing list