Home | History | Annotate | Download | only in arm
      1 /*
      2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
      3  *
      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  */
     10 
     11 
     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"
     19 
     20 extern void vp8_memcpy_neon(unsigned char *dst_ptr, unsigned char *src_ptr, int sz);
     21 
     22 
     23 void
     24 vpxyv12_copy_partial_frame_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc, int Fraction)
     25 {
     26     unsigned char *src_y, *dst_y;
     27     int yheight;
     28     int ystride;
     29     int border;
     30     int yoffset;
     31     int linestocopy;
     32 
     33     border   = src_ybc->border;
     34     yheight  = src_ybc->y_height;
     35     ystride  = src_ybc->y_stride;
     36 
     37     linestocopy = (yheight >> (Fraction + 4));
     38 
     39     if (linestocopy < 1)
     40         linestocopy = 1;
     41 
     42     linestocopy <<= 4;
     43 
     44     yoffset  = ystride * ((yheight >> 5) * 16 - 8);
     45     src_y = src_ybc->y_buffer + yoffset;
     46     dst_y = dst_ybc->y_buffer + yoffset;
     47 
     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)));
     50 }
     51