Allocate cm->cdef_info.srcbuf on 16-byte alignment In av1_alloc_cdef_linebuf(), allocate cm->cdef_info.srcbuf with 16-byte alignment because av1_cdef_frame() will pass cm->cdef_info.srcbuf as the 'src' argument to cdef_fb_row(), and some pointer in that buffer will eventually be passed to _mm_load_si128(), whose input "must be aligned on a 16-byte boundary or a general-protection exception may be generated." BUG=aomedia:3025 Change-Id: Iab614da9affff1608e52d20f6406a1b8ebfe80df
diff --git a/av1/common/alloccommon.c b/av1/common/alloccommon.c index 442973d..39aed89 100644 --- a/av1/common/alloccommon.c +++ b/av1/common/alloccommon.c
@@ -114,7 +114,7 @@ if (cm->cdef_info.srcbuf == NULL) CHECK_MEM_ERROR( cm, cm->cdef_info.srcbuf, - aom_malloc(sizeof(*cm->cdef_info.srcbuf) * CDEF_INBUF_SIZE)); + aom_memalign(16, sizeof(*cm->cdef_info.srcbuf) * CDEF_INBUF_SIZE)); for (int plane = 0; plane < num_planes; plane++) { const int shift = plane == AOM_PLANE_Y ? 0 : cm->seq_params.subsampling_x;