1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libvpx/vp8/encoder/arm/neon/picklpf_arm.c Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,46 @@ 1.4 +/* 1.5 + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license 1.8 + * that can be found in the LICENSE file in the root of the source 1.9 + * tree. An additional intellectual property rights grant can be found 1.10 + * in the file PATENTS. All contributing project authors may 1.11 + * be found in the AUTHORS file in the root of the source tree. 1.12 + */ 1.13 + 1.14 +#include "vp8/common/loopfilter.h" 1.15 +#include "vpx_scale/yv12config.h" 1.16 + 1.17 +extern void vp8_memcpy_partial_neon(unsigned char *dst_ptr, 1.18 + unsigned char *src_ptr, 1.19 + int sz); 1.20 + 1.21 + 1.22 +void vp8_yv12_copy_partial_frame_neon(YV12_BUFFER_CONFIG *src_ybc, 1.23 + YV12_BUFFER_CONFIG *dst_ybc) 1.24 +{ 1.25 + unsigned char *src_y, *dst_y; 1.26 + int yheight; 1.27 + int ystride; 1.28 + int yoffset; 1.29 + int linestocopy; 1.30 + 1.31 + yheight = src_ybc->y_height; 1.32 + ystride = src_ybc->y_stride; 1.33 + 1.34 + /* number of MB rows to use in partial filtering */ 1.35 + linestocopy = (yheight >> 4) / PARTIAL_FRAME_FRACTION; 1.36 + linestocopy = linestocopy ? linestocopy << 4 : 16; /* 16 lines per MB */ 1.37 + 1.38 + /* Copy extra 4 so that full filter context is available if filtering done 1.39 + * on the copied partial frame and not original. Partial filter does mb 1.40 + * filtering for top row also, which can modify3 pixels above. 1.41 + */ 1.42 + linestocopy += 4; 1.43 + /* partial image starts at ~middle of frame (macroblock border) */ 1.44 + yoffset = ystride * (((yheight >> 5) * 16) - 4); 1.45 + src_y = src_ybc->y_buffer + yoffset; 1.46 + dst_y = dst_ybc->y_buffer + yoffset; 1.47 + 1.48 + vp8_memcpy_partial_neon(dst_y, src_y, ystride * linestocopy); 1.49 +}