Commit d76ef3e0 authored by Johann's avatar Johann Committed by Gerrit Code Review

Merge "vp8 encoder: remove vp8_yv12_copy_partial_frame_neon"

parents 3b56d892 395f2e87
......@@ -529,13 +529,6 @@ if (vpx_config("CONFIG_REALTIME_ONLY") ne "yes") {
specialize qw/vp8_temporal_filter_apply sse2/;
}
#
# Pick Loopfilter
#
add_proto qw/void vp8_yv12_copy_partial_frame/, "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc";
specialize qw/vp8_yv12_copy_partial_frame neon_asm/;
$vp8_yv12_copy_partial_frame_neon_asm=vp8_yv12_copy_partial_frame_neon;
#
# Denoiser filter
#
......@@ -544,7 +537,6 @@ if (vpx_config("CONFIG_TEMPORAL_DENOISING") eq "yes") {
specialize qw/vp8_denoiser_filter sse2 neon/;
add_proto qw/int vp8_denoiser_filter_uv/, "unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising";
specialize qw/vp8_denoiser_filter_uv sse2 neon/;
}
# End of encoder only functions
......
/*
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "vp8/common/loopfilter.h"
#include "vpx_scale/yv12config.h"
extern void vp8_memcpy_partial_neon(unsigned char *dst_ptr,
unsigned char *src_ptr,
int sz);
void vp8_yv12_copy_partial_frame_neon(YV12_BUFFER_CONFIG *src_ybc,
YV12_BUFFER_CONFIG *dst_ybc)
{
unsigned char *src_y, *dst_y;
int yheight;
int ystride;
int yoffset;
int linestocopy;
yheight = src_ybc->y_height;
ystride = src_ybc->y_stride;
/* 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);
src_y = src_ybc->y_buffer + yoffset;
dst_y = dst_ybc->y_buffer + yoffset;
vp8_memcpy_partial_neon(dst_y, src_y, ystride * linestocopy);
}
;
; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
;
; Use of this source code is governed by a BSD-style license
; that can be found in the LICENSE file in the root of the source
; tree. An additional intellectual property rights grant can be found
; in the file PATENTS. All contributing project authors may
; be found in the AUTHORS file in the root of the source tree.
;
EXPORT |vp8_memcpy_partial_neon|
ARM
REQUIRE8
PRESERVE8
AREA ||.text||, CODE, READONLY, ALIGN=2
;=========================================
;this is not a full memcpy function!!!
;void vp8_memcpy_partial_neon(unsigned char *dst_ptr, unsigned char *src_ptr,
; int sz);
|vp8_memcpy_partial_neon| PROC
vpush {d8-d15}
;pld [r1] ;preload pred data
;pld [r1, #128]
;pld [r1, #256]
;pld [r1, #384]
mov r12, r2, lsr #8 ;copy 256 bytes data at one time
memcpy_neon_loop
vld1.8 {q0, q1}, [r1]! ;load src data
subs r12, r12, #1
vld1.8 {q2, q3}, [r1]!
vst1.8 {q0, q1}, [r0]! ;copy to dst_ptr
vld1.8 {q4, q5}, [r1]!
vst1.8 {q2, q3}, [r0]!
vld1.8 {q6, q7}, [r1]!
vst1.8 {q4, q5}, [r0]!
vld1.8 {q8, q9}, [r1]!
vst1.8 {q6, q7}, [r0]!
vld1.8 {q10, q11}, [r1]!
vst1.8 {q8, q9}, [r0]!
vld1.8 {q12, q13}, [r1]!
vst1.8 {q10, q11}, [r0]!
vld1.8 {q14, q15}, [r1]!
vst1.8 {q12, q13}, [r0]!
vst1.8 {q14, q15}, [r0]!
;pld [r1] ;preload pred data -- need to adjust for real device
;pld [r1, #128]
;pld [r1, #256]
;pld [r1, #384]
bne memcpy_neon_loop
ands r3, r2, #0xff ;extra copy
beq done_copy_neon_loop
extra_copy_neon_loop
vld1.8 {q0}, [r1]! ;load src data
subs r3, r3, #16
vst1.8 {q0}, [r0]!
bne extra_copy_neon_loop
done_copy_neon_loop
vpop {d8-d15}
bx lr
ENDP
END
......@@ -23,8 +23,8 @@
extern int vp8_calc_ss_err(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *dest);
void vp8_yv12_copy_partial_frame_c(YV12_BUFFER_CONFIG *src_ybc,
YV12_BUFFER_CONFIG *dst_ybc)
static void yv12_copy_partial_frame(YV12_BUFFER_CONFIG *src_ybc,
YV12_BUFFER_CONFIG *dst_ybc)
{
unsigned char *src_y, *dst_y;
int yheight;
......@@ -173,7 +173,7 @@ void vp8cx_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi)
/* Get the err using the previous frame's filter value. */
/* Copy the unfiltered / processed recon buffer to the new buffer */
vp8_yv12_copy_partial_frame(saved_frame, cm->frame_to_show);
yv12_copy_partial_frame(saved_frame, cm->frame_to_show);
vp8_loop_filter_partial_frame(cm, &cpi->mb.e_mbd, filt_val);
best_err = calc_partial_ssl_err(sd, cm->frame_to_show);
......@@ -184,7 +184,7 @@ void vp8cx_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi)
while (filt_val >= min_filter_level)
{
/* Apply the loop filter */
vp8_yv12_copy_partial_frame(saved_frame, cm->frame_to_show);
yv12_copy_partial_frame(saved_frame, cm->frame_to_show);
vp8_loop_filter_partial_frame(cm, &cpi->mb.e_mbd, filt_val);
/* Get the err for filtered frame */
......@@ -214,7 +214,7 @@ void vp8cx_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi)
while (filt_val < max_filter_level)
{
/* Apply the loop filter */
vp8_yv12_copy_partial_frame(saved_frame, cm->frame_to_show);
yv12_copy_partial_frame(saved_frame, cm->frame_to_show);
vp8_loop_filter_partial_frame(cm, &cpi->mb.e_mbd, filt_val);
......
......@@ -36,9 +36,7 @@ VP8_CX_SRCS-$(HAVE_MEDIA) += encoder/arm/armv6/walsh_v6$(ASM)
#File list for neon
# encoder
VP8_CX_SRCS-$(HAVE_NEON_ASM) += encoder/arm/neon/fastquantizeb_neon$(ASM)
VP8_CX_SRCS-$(HAVE_NEON_ASM) += encoder/arm/neon/picklpf_arm.c
VP8_CX_SRCS-$(HAVE_NEON_ASM) += encoder/arm/neon/vp8_mse16x16_neon$(ASM)
VP8_CX_SRCS-$(HAVE_NEON_ASM) += encoder/arm/neon/vp8_memcpy_neon$(ASM)
VP8_CX_SRCS-$(HAVE_NEON) += encoder/arm/neon/denoising_neon.c
VP8_CX_SRCS-$(HAVE_NEON) += encoder/arm/neon/vp8_shortwalsh4x4_neon.c
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment