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