diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-06-18 04:24:31 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-18 04:24:31 +0200 |
commit | 7f5296005c392d72f574b66324c1db8d1a7a6484 (patch) | |
tree | 3c83cfab3d723b9f026b7f50323a30764ca843f1 | |
parent | c932f12806d28d8c287002807638b338e1d84dd3 (diff) | |
download | ffmpeg-7f5296005c392d72f574b66324c1db8d1a7a6484.tar.gz |
swscale/swscale: replace potentially slow % by &
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libswscale/swscale.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 56fa1ee8eb..9919d41add 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -414,8 +414,8 @@ static int swscale(SwsContext *c, const uint8_t *src[], DEBUG_BUFFERS("vLumFilterSize: %d vLumBufSize: %d vChrFilterSize: %d vChrBufSize: %d\n", vLumFilterSize, vLumBufSize, vChrFilterSize, vChrBufSize); - if (dstStride[0]%16 !=0 || dstStride[1]%16 !=0 || - dstStride[2]%16 !=0 || dstStride[3]%16 != 0) { + if (dstStride[0]&15 || dstStride[1]&15 || + dstStride[2]&15 || dstStride[3]&15) { static int warnedAlready = 0; // FIXME maybe move this into the context if (flags & SWS_PRINT_INFO && !warnedAlready) { av_log(c, AV_LOG_WARNING, @@ -425,10 +425,10 @@ static int swscale(SwsContext *c, const uint8_t *src[], } } - if ( (uintptr_t)dst[0]%16 || (uintptr_t)dst[1]%16 || (uintptr_t)dst[2]%16 - || (uintptr_t)src[0]%16 || (uintptr_t)src[1]%16 || (uintptr_t)src[2]%16 - || dstStride[0]%16 || dstStride[1]%16 || dstStride[2]%16 || dstStride[3]%16 - || srcStride[0]%16 || srcStride[1]%16 || srcStride[2]%16 || srcStride[3]%16 + if ( (uintptr_t)dst[0]&15 || (uintptr_t)dst[1]&15 || (uintptr_t)dst[2]&15 + || (uintptr_t)src[0]&15 || (uintptr_t)src[1]&15 || (uintptr_t)src[2]&15 + || dstStride[0]&15 || dstStride[1]&15 || dstStride[2]&15 || dstStride[3]&15 + || srcStride[0]&15 || srcStride[1]&15 || srcStride[2]&15 || srcStride[3]&15 ) { static int warnedAlready=0; int cpu_flags = av_get_cpu_flags(); |