projects
/
platform
/
upstream
/
libvpx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b573fef
)
Prevent invalid memory access
author
Yaowu Xu
<yaowu@google.com>
Thu, 5 Mar 2015 22:57:11 +0000
(14:57 -0800)
committer
Yaowu Xu
<yaowu@google.com>
Thu, 5 Mar 2015 22:57:11 +0000
(14:57 -0800)
Change-Id: I1b972c945274254d896d772d859840b2f8211b4f
vp9/encoder/vp9_encodeframe.c
patch
|
blob
|
history
diff --git
a/vp9/encoder/vp9_encodeframe.c
b/vp9/encoder/vp9_encodeframe.c
index
2f04454
..
c6f71b8
100644
(file)
--- a/
vp9/encoder/vp9_encodeframe.c
+++ b/
vp9/encoder/vp9_encodeframe.c
@@
-748,8
+748,11
@@
static void choose_partitioning(VP9_COMP *cpi,
#else
const BLOCK_SIZE bs = get_plane_block_size(BLOCK_64X64, pd);
#endif
- uv_sad = cpi->fn_ptr[bs].sdf(p->src.buf, p->src.stride,
- pd->dst.buf, pd->dst.stride);
+ if (bs == BLOCK_INVALID)
+ uv_sad = INT_MAX;
+ else
+ uv_sad = cpi->fn_ptr[bs].sdf(p->src.buf, p->src.stride,
+ pd->dst.buf, pd->dst.stride);
#if GLOBAL_MOTION
x->color_sensitivity[i - 1] = uv_sad * 4 > y_sad;