summaryrefslogtreecommitdiff
path: root/vp8
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2012-02-09 16:19:10 -0800
committerJohann <johannkoenig@google.com>2012-02-09 16:19:10 -0800
commit8c50a70a9505c3771762d3e4c29d3dca908e34e0 (patch)
treeb2f38a213a2ca95320ebd6b18b2e4f4ef2689710 /vp8
parent2e0d55314c28c546d98595e4b3799ca451a5a777 (diff)
downloadlibvpx-8c50a70a9505c3771762d3e4c29d3dca908e34e0.tar
libvpx-8c50a70a9505c3771762d3e4c29d3dca908e34e0.tar.gz
libvpx-8c50a70a9505c3771762d3e4c29d3dca908e34e0.tar.bz2
libvpx-8c50a70a9505c3771762d3e4c29d3dca908e34e0.zip
max_sad check is not always implemented
As an optimization some architectures use the max_sad argument to break out early from the SAD. Pass in INT_MAX instead of 0 to prevent this. Change-Id: I653c476834b97771578d63f231233d445388629d
Diffstat (limited to 'vp8')
-rw-r--r--vp8/common/postproc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/vp8/common/postproc.c b/vp8/common/postproc.c
index 87e999772..401989ba5 100644
--- a/vp8/common/postproc.c
+++ b/vp8/common/postproc.c
@@ -19,6 +19,7 @@
#include "systemdependent.h"
#include "../encoder/variance.h"
+#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
@@ -729,17 +730,17 @@ static void multiframe_quality_enhance_block
if (blksize == 16)
{
act = (vp8_variance16x16(yd, yd_stride, VP8_ZEROS, 0, &sse)+128)>>8;
- sad = (vp8_sad16x16(y, y_stride, yd, yd_stride, 0)+128)>>8;
+ sad = (vp8_sad16x16(y, y_stride, yd, yd_stride, INT_MAX)+128)>>8;
}
else if (blksize == 8)
{
act = (vp8_variance8x8(yd, yd_stride, VP8_ZEROS, 0, &sse)+32)>>6;
- sad = (vp8_sad8x8(y, y_stride, yd, yd_stride, 0)+32)>>6;
+ sad = (vp8_sad8x8(y, y_stride, yd, yd_stride, INT_MAX)+32)>>6;
}
else
{
act = (vp8_variance4x4(yd, yd_stride, VP8_ZEROS, 0, &sse)+8)>>4;
- sad = (vp8_sad4x4(y, y_stride, yd, yd_stride, 0)+8)>>4;
+ sad = (vp8_sad4x4(y, y_stride, yd, yd_stride, INT_MAX)+8)>>4;
}
/* thr = qdiff/8 + log2(act) + log4(qprev) */
thr = (qdiff>>3);