Skip to content

Commit 67416b2

Browse files
committed
Merge commit '8aae24608967afeb2355c2ca3898b0254a39da1d' into upstream_merge
Conflicts: vp8/encoder/x86/vp8_enc_stubs_mmx.c
2 parents f0acc3a + 8aae246 commit 67416b2

10 files changed

+60
-137
lines changed

vp8/common/rtcd_defs.sh

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ struct block;
99
struct macroblock;
1010
struct variance_vtable;
1111
union int_mv;
12+
struct yv12_buffer_config;
1213
EOF
1314
}
1415
forward_decls common_forward_decls
@@ -489,5 +490,11 @@ if [ "$CONFIG_REALTIME_ONLY" != "yes" ]; then
489490
specialize vp8_temporal_filter_apply sse2
490491
fi
491492

493+
#
494+
# Pick Loopfilter
495+
#
496+
prototype void vp8_yv12_copy_partial_frame "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc"
497+
specialize vp8_yv12_copy_partial_frame neon
498+
492499
# End of encoder only functions
493500
fi

vp8/encoder/arm/arm_csystemdependent.c

-42
This file was deleted.

vp8/encoder/generic/csystemdependent.c

-38
This file was deleted.

vp8/encoder/onyx_if.c

-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ extern void vp8cx_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi);
4646
extern void vp8cx_set_alt_lf_level(VP8_COMP *cpi, int filt_val);
4747
extern void vp8cx_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi);
4848

49-
extern void vp8_cmachine_specific_config(VP8_COMP *cpi);
5049
extern void vp8_deblock_frame(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *post, int filt_lvl, int low_var_thresh, int flag);
5150
extern void print_parms(VP8_CONFIG *ocf, char *filenam);
5251
extern unsigned int vp8_get_processor_freq();
@@ -1708,7 +1707,6 @@ struct VP8_COMP* vp8_create_compressor(VP8_CONFIG *oxcf)
17081707
CHECK_MEM_ERROR(cpi->mb.ss, vpx_calloc(sizeof(search_site), (MAX_MVSEARCH_STEPS * 8) + 1));
17091708

17101709
vp8_create_common(&cpi->common);
1711-
vp8_cmachine_specific_config(cpi);
17121710

17131711
init_config(cpi, oxcf);
17141712

vp8/encoder/picklpf.c

+5-8
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,8 @@
2323

2424
extern int vp8_calc_ss_err(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *dest);
2525

26-
extern void (*vp8_yv12_copy_partial_frame_ptr)(YV12_BUFFER_CONFIG *src_ybc,
27-
YV12_BUFFER_CONFIG *dst_ybc);
28-
29-
void vp8_yv12_copy_partial_frame(YV12_BUFFER_CONFIG *src_ybc,
30-
YV12_BUFFER_CONFIG *dst_ybc)
26+
void vp8_yv12_copy_partial_frame_c(YV12_BUFFER_CONFIG *src_ybc,
27+
YV12_BUFFER_CONFIG *dst_ybc)
3128
{
3229
unsigned char *src_y, *dst_y;
3330
int yheight;
@@ -173,7 +170,7 @@ void vp8cx_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi)
173170
// Get the err using the previous frame's filter value.
174171

175172
/* Copy the unfiltered / processed recon buffer to the new buffer */
176-
vp8_yv12_copy_partial_frame_ptr(saved_frame, cm->frame_to_show);
173+
vp8_yv12_copy_partial_frame(saved_frame, cm->frame_to_show);
177174
vp8_loop_filter_partial_frame(cm, &cpi->mb.e_mbd, filt_val);
178175

179176
best_err = calc_partial_ssl_err(sd, cm->frame_to_show);
@@ -184,7 +181,7 @@ void vp8cx_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi)
184181
while (filt_val >= min_filter_level)
185182
{
186183
// Apply the loop filter
187-
vp8_yv12_copy_partial_frame_ptr(saved_frame, cm->frame_to_show);
184+
vp8_yv12_copy_partial_frame(saved_frame, cm->frame_to_show);
188185
vp8_loop_filter_partial_frame(cm, &cpi->mb.e_mbd, filt_val);
189186

190187
// Get the err for filtered frame
@@ -214,7 +211,7 @@ void vp8cx_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi)
214211
while (filt_val < max_filter_level)
215212
{
216213
// Apply the loop filter
217-
vp8_yv12_copy_partial_frame_ptr(saved_frame, cm->frame_to_show);
214+
vp8_yv12_copy_partial_frame(saved_frame, cm->frame_to_show);
218215

219216
vp8_loop_filter_partial_frame(cm, &cpi->mb.e_mbd, filt_val);
220217

vp8/encoder/x86/x86_csystemdependent.c vp8/encoder/x86/vp8_enc_stubs_mmx.c

+2-42
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@
1212
#include "vpx_config.h"
1313
#include "vpx_rtcd.h"
1414
#include "vpx_ports/x86.h"
15-
#include "vp8/encoder/variance.h"
16-
#include "vp8/encoder/onyx_int.h"
15+
#include "vp8/encoder/block.h"
1716

18-
19-
#if HAVE_MMX
17+
void vp8_short_fdct4x4_mmx(short *input, short *output, int pitch);
2018
void vp8_short_fdct8x4_mmx(short *input, short *output, int pitch)
2119
{
2220
vp8_short_fdct4x4_mmx(input, output, pitch);
@@ -78,41 +76,3 @@ void vp8_subtract_b_mmx(BLOCK *be, BLOCKD *bd, int pitch)
7876
unsigned char *predictor = bd->predictor_base + bd->predictor_offset;
7977
vp8_subtract_b_mmx_impl(z, src_stride, diff, predictor, pitch);
8078
}
81-
82-
#endif
83-
84-
#if HAVE_SSE2
85-
86-
int vp8_mbblock_error_xmm_impl(short *coeff_ptr, short *dcoef_ptr, int dc);
87-
int vp8_mbblock_error_xmm(MACROBLOCK *mb, int dc)
88-
{
89-
short *coeff_ptr = mb->block[0].coeff;
90-
short *dcoef_ptr = mb->e_mbd.block[0].dqcoeff_base + mb->e_mbd.block[0].dqcoeff_offset;
91-
return vp8_mbblock_error_xmm_impl(coeff_ptr, dcoef_ptr, dc);
92-
}
93-
94-
int vp8_mbuverror_xmm_impl(short *s_ptr, short *d_ptr);
95-
int vp8_mbuverror_xmm(MACROBLOCK *mb)
96-
{
97-
short *s_ptr = &mb->coeff[256];
98-
short *d_ptr = &mb->e_mbd.dqcoeff[256];
99-
return vp8_mbuverror_xmm_impl(s_ptr, d_ptr);
100-
}
101-
102-
void vp8_subtract_b_sse2_impl(unsigned char *z, int src_stride,
103-
short *diff, unsigned char *predictor,
104-
int pitch);
105-
void vp8_subtract_b_sse2(BLOCK *be, BLOCKD *bd, int pitch)
106-
{
107-
unsigned char *z = *(be->base_src) + be->src;
108-
unsigned int src_stride = be->src_stride;
109-
short *diff = &be->src_diff[0];
110-
unsigned char *predictor = bd->predictor_base + bd->predictor_offset;
111-
vp8_subtract_b_sse2_impl(z, src_stride, diff, predictor, pitch);
112-
}
113-
114-
#endif
115-
116-
void vp8_arch_x86_encoder_init(VP8_COMP *cpi)
117-
{
118-
}

vp8/encoder/x86/vp8_enc_stubs_sse2.c

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (c) 2012 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 "vpx_config.h"
13+
#include "vpx_rtcd.h"
14+
#include "vpx_ports/x86.h"
15+
#include "vp8/encoder/block.h"
16+
17+
int vp8_mbblock_error_xmm_impl(short *coeff_ptr, short *dcoef_ptr, int dc);
18+
int vp8_mbblock_error_xmm(MACROBLOCK *mb, int dc)
19+
{
20+
short *coeff_ptr = mb->block[0].coeff;
21+
short *dcoef_ptr = mb->e_mbd.block[0].dqcoeff_base + mb->e_mbd.block[0].dqcoeff_offset;
22+
return vp8_mbblock_error_xmm_impl(coeff_ptr, dcoef_ptr, dc);
23+
}
24+
25+
int vp8_mbuverror_xmm_impl(short *s_ptr, short *d_ptr);
26+
int vp8_mbuverror_xmm(MACROBLOCK *mb)
27+
{
28+
short *s_ptr = &mb->coeff[256];
29+
short *d_ptr = &mb->e_mbd.dqcoeff[256];
30+
return vp8_mbuverror_xmm_impl(s_ptr, d_ptr);
31+
}
32+
33+
void vp8_subtract_b_sse2_impl(unsigned char *z, int src_stride,
34+
short *diff, unsigned char *predictor,
35+
int pitch);
36+
void vp8_subtract_b_sse2(BLOCK *be, BLOCKD *bd, int pitch)
37+
{
38+
unsigned char *z = *(be->base_src) + be->src;
39+
unsigned int src_stride = be->src_stride;
40+
short *diff = &be->src_diff[0];
41+
unsigned char *predictor = &bd->predictor_base[bd->predictor_offset];
42+
vp8_subtract_b_sse2_impl(z, src_stride, diff, predictor, pitch);
43+
}

vp8/vp8cx.mk

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ VP8_CX_SRCS-yes += encoder/encodemb.c
4444
VP8_CX_SRCS-yes += encoder/encodemv.c
4545
VP8_CX_SRCS-$(CONFIG_MULTITHREAD) += encoder/ethreading.c
4646
VP8_CX_SRCS-yes += encoder/firstpass.c
47-
VP8_CX_SRCS-yes += encoder/generic/csystemdependent.c
4847
VP8_CX_SRCS-yes += encoder/block.h
4948
VP8_CX_SRCS-yes += encoder/boolhuff.h
5049
VP8_CX_SRCS-yes += encoder/bitstream.h
@@ -92,12 +91,12 @@ VP8_CX_SRCS_REMOVE-yes += encoder/firstpass.c
9291
VP8_CX_SRCS_REMOVE-yes += encoder/temporal_filter.c
9392
endif
9493

95-
VP8_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/x86_csystemdependent.c
9694
VP8_CX_SRCS-$(HAVE_MMX) += encoder/x86/variance_mmx.c
9795
VP8_CX_SRCS-$(HAVE_MMX) += encoder/x86/variance_impl_mmx.asm
9896
VP8_CX_SRCS-$(HAVE_MMX) += encoder/x86/sad_mmx.asm
9997
VP8_CX_SRCS-$(HAVE_MMX) += encoder/x86/dct_mmx.asm
10098
VP8_CX_SRCS-$(HAVE_MMX) += encoder/x86/subtract_mmx.asm
99+
VP8_CX_SRCS-$(HAVE_MMX) += encoder/x86/vp8_enc_stubs_mmx.c
101100
VP8_CX_SRCS-$(HAVE_SSE2) += encoder/x86/dct_sse2.asm
102101
VP8_CX_SRCS-$(HAVE_SSE2) += encoder/x86/variance_sse2.c
103102
VP8_CX_SRCS-$(HAVE_SSE2) += encoder/x86/variance_impl_sse2.asm
@@ -106,6 +105,7 @@ VP8_CX_SRCS-$(HAVE_SSE2) += encoder/x86/fwalsh_sse2.asm
106105
VP8_CX_SRCS-$(HAVE_SSE2) += encoder/x86/quantize_sse2.asm
107106
VP8_CX_SRCS-$(HAVE_SSE2) += encoder/x86/subtract_sse2.asm
108107
VP8_CX_SRCS-$(HAVE_SSE2) += encoder/x86/temporal_filter_apply_sse2.asm
108+
VP8_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp8_enc_stubs_sse2.c
109109
VP8_CX_SRCS-$(HAVE_SSE3) += encoder/x86/sad_sse3.asm
110110
VP8_CX_SRCS-$(HAVE_SSSE3) += encoder/x86/sad_ssse3.asm
111111
VP8_CX_SRCS-$(HAVE_SSSE3) += encoder/x86/variance_ssse3.c

vp8/vp8cx_arm.mk

-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
#File list for arm
1515
# encoder
16-
VP8_CX_SRCS-$(ARCH_ARM) += encoder/arm/arm_csystemdependent.c
17-
1816
VP8_CX_SRCS-$(ARCH_ARM) += encoder/arm/dct_arm.c
1917
VP8_CX_SRCS-$(ARCH_ARM) += encoder/arm/quantize_arm.c
2018
VP8_CX_SRCS-$(ARCH_ARM) += encoder/arm/variance_arm.c

vpx_scale/yv12config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extern "C"
4343
}
4444
YUV_TYPE;
4545

46-
typedef struct
46+
typedef struct yv12_buffer_config
4747
{
4848
int y_width;
4949
int y_height;

0 commit comments

Comments
 (0)