diff options
author | Yaowu Xu <yaowu@google.com> | 2013-08-27 08:39:20 -0700 |
---|---|---|
committer | Yaowu Xu <yaowu@google.com> | 2013-08-27 08:39:20 -0700 |
commit | 9482c07953069401da9baeebd089564fcd75f30e (patch) | |
tree | fc579133e203a1123dd279646cc3ed49727ca19b | |
parent | 4505e8accbe2b88a029f20fc0cc0cddc966e42cd (diff) | |
download | libvpx-9482c07953069401da9baeebd089564fcd75f30e.tar libvpx-9482c07953069401da9baeebd089564fcd75f30e.tar.gz libvpx-9482c07953069401da9baeebd089564fcd75f30e.tar.bz2 libvpx-9482c07953069401da9baeebd089564fcd75f30e.zip |
fixed the reading too many bytes
In subpel_avg_variance functions, code similar to the following
punpkldq m2, [addr]
actually reads 8 bytes. For functions that are supposed to work on
buffers only have less 8 bytes a line, this caused valgrind error
of reading uninitialized memory.
Change-Id: I2a4c079dbdbc747829bd9e2ed85f0018ad2a3a34
-rw-r--r-- | vp9/encoder/x86/vp9_subpel_variance.asm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vp9/encoder/x86/vp9_subpel_variance.asm b/vp9/encoder/x86/vp9_subpel_variance.asm index 19e2feb57..533456b77 100644 --- a/vp9/encoder/x86/vp9_subpel_variance.asm +++ b/vp9/encoder/x86/vp9_subpel_variance.asm @@ -270,8 +270,13 @@ cglobal sub_pixel_variance%1xh, 7, 7, 13, src, src_stride, x_offset, y_offset, \ %if mmsize == 16 movhps m2, [srcq+src_strideq*2] %else ; mmsize == 8 +%if %1 == 4 + movh m1, [srcq+src_strideq*2] + punpckldq m2, m1 +%else punpckldq m2, [srcq+src_strideq*2] %endif +%endif movh m1, [dstq] %if mmsize == 16 movlhps m0, m2 @@ -542,9 +547,16 @@ cglobal sub_pixel_variance%1xh, 7, 7, 13, src, src_stride, x_offset, y_offset, \ movhps m2, [srcq+src_strideq] movhps m3, [srcq+src_strideq+1] %else +%if %1 == 4 + movh m1, [srcq+src_strideq] + punpckldq m2, m1 + movh m1, [srcq+src_strideq+1] + punpckldq m3, m1 +%else punpckldq m2, [srcq+src_strideq] punpckldq m3, [srcq+src_strideq+1] %endif +%endif pavgb m2, m3 %if mmsize == 16 movlhps m0, m2 |