mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
swscale/swscale: replace potentially slow % by &
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
c932f12806
commit
7f5296005c
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user