Define RDCOST only once
[libvpx.git] / vp8 / encoder / arm / picklpf_arm.c
blob3fb370c3df7687dc0545dbeeb2d9d722db914c74
1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
12 #include "vp8/common/onyxc_int.h"
13 #include "vp8/encoder/onyx_int.h"
14 #include "vp8/encoder/quantize.h"
15 #include "vpx_mem/vpx_mem.h"
16 #include "vpx_scale/yv12extend.h"
17 #include "vpx_scale/vpxscale.h"
18 #include "vp8/common/alloccommon.h"
20 extern void vp8_memcpy_neon(unsigned char *dst_ptr, unsigned char *src_ptr, int sz);
23 void
24 vpxyv12_copy_partial_frame_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc, int Fraction)
26 unsigned char *src_y, *dst_y;
27 int yheight;
28 int ystride;
29 int border;
30 int yoffset;
31 int linestocopy;
33 border = src_ybc->border;
34 yheight = src_ybc->y_height;
35 ystride = src_ybc->y_stride;
37 linestocopy = (yheight >> (Fraction + 4));
39 if (linestocopy < 1)
40 linestocopy = 1;
42 linestocopy <<= 4;
44 yoffset = ystride * ((yheight >> 5) * 16 - 8);
45 src_y = src_ybc->y_buffer + yoffset;
46 dst_y = dst_ybc->y_buffer + yoffset;
48 //vpx_memcpy (dst_y, src_y, ystride * (linestocopy +16));
49 vp8_memcpy_neon((unsigned char *)dst_y, (unsigned char *)src_y, (int)(ystride *(linestocopy + 16)));