michael@0: /* michael@0: * Copyright (c) 2010 The WebM project authors. All Rights Reserved. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license michael@0: * that can be found in the LICENSE file in the root of the source michael@0: * tree. An additional intellectual property rights grant can be found michael@0: * in the file PATENTS. All contributing project authors may michael@0: * be found in the AUTHORS file in the root of the source tree. michael@0: */ michael@0: michael@0: #include "vp8/common/loopfilter.h" michael@0: #include "vpx_scale/yv12config.h" michael@0: michael@0: extern void vp8_memcpy_partial_neon(unsigned char *dst_ptr, michael@0: unsigned char *src_ptr, michael@0: int sz); michael@0: michael@0: michael@0: void vp8_yv12_copy_partial_frame_neon(YV12_BUFFER_CONFIG *src_ybc, michael@0: YV12_BUFFER_CONFIG *dst_ybc) michael@0: { michael@0: unsigned char *src_y, *dst_y; michael@0: int yheight; michael@0: int ystride; michael@0: int yoffset; michael@0: int linestocopy; michael@0: michael@0: yheight = src_ybc->y_height; michael@0: ystride = src_ybc->y_stride; michael@0: michael@0: /* number of MB rows to use in partial filtering */ michael@0: linestocopy = (yheight >> 4) / PARTIAL_FRAME_FRACTION; michael@0: linestocopy = linestocopy ? linestocopy << 4 : 16; /* 16 lines per MB */ michael@0: michael@0: /* Copy extra 4 so that full filter context is available if filtering done michael@0: * on the copied partial frame and not original. Partial filter does mb michael@0: * filtering for top row also, which can modify3 pixels above. michael@0: */ michael@0: linestocopy += 4; michael@0: /* partial image starts at ~middle of frame (macroblock border) */ michael@0: yoffset = ystride * (((yheight >> 5) * 16) - 4); michael@0: src_y = src_ybc->y_buffer + yoffset; michael@0: dst_y = dst_ybc->y_buffer + yoffset; michael@0: michael@0: vp8_memcpy_partial_neon(dst_y, src_y, ystride * linestocopy); michael@0: }