From 13dbf1fb173753cadba8c66a6bf08b2757ab07e6 Mon Sep 17 00:00:00 2001 From: Jim Bankoski Date: Wed, 28 Nov 2012 16:47:30 -0800 Subject: [PATCH] more rtcd cleanup Change-Id: Ieefd76e164ca4aa87597da0412977614ddfbacb7 --- vp9/common/generic/vp9_systemdependent.c | 16 -------- vp9/common/vp9_blockd.h | 4 -- vp9/common/vp9_onyxc_int.h | 12 ------ vp9/common/vp9_reconinter.c | 3 -- vp9/common/x86/vp9_x86_systemdependent.c | 62 ------------------------------ vp9/decoder/vp9_decodframe.c | 6 --- vp9/encoder/generic/vp9_csystemdependent.c | 21 ---------- vp9/encoder/vp9_encodeframe.c | 8 ---- vp9/encoder/vp9_encodeintra.c | 6 --- vp9/encoder/vp9_firstpass.c | 6 --- vp9/encoder/vp9_onyx_if.c | 15 -------- vp9/encoder/vp9_onyx_int.h | 8 ---- vp9/encoder/vp9_picklpf.c | 6 --- vp9/encoder/vp9_rdopt.c | 6 --- vp9/vp9_common.mk | 1 - vp9/vp9cx.mk | 1 - 16 files changed, 181 deletions(-) delete mode 100644 vp9/common/x86/vp9_x86_systemdependent.c delete mode 100644 vp9/encoder/generic/vp9_csystemdependent.c diff --git a/vp9/common/generic/vp9_systemdependent.c b/vp9/common/generic/vp9_systemdependent.c index 4c3a7d3..f133281 100644 --- a/vp9/common/generic/vp9_systemdependent.c +++ b/vp9/common/generic/vp9_systemdependent.c @@ -15,22 +15,6 @@ #include "vp9/common/vp9_loopfilter.h" #include "vp9/common/vp9_onyxc_int.h" -extern void vp9_arch_x86_common_init(VP9_COMMON *ctx); -extern void vp9_arch_arm_common_init(VP9_COMMON *ctx); - void vp9_machine_specific_config(VP9_COMMON *ctx) { -#if CONFIG_RUNTIME_CPU_DETECT - VP9_COMMON_RTCD *rtcd = &ctx->rtcd; - -#endif - -#if ARCH_X86 || ARCH_X86_64 - vp9_arch_x86_common_init(ctx); -#endif - -#if ARCH_ARM - vp9_arch_arm_common_init(ctx); -#endif - vp9_rtcd(); } diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h index fcc91c2..839d5b5 100644 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@ -403,10 +403,6 @@ typedef struct macroblockd { DECLARE_ALIGNED(32, unsigned char, y_buf[22 * 32]); #endif -#if CONFIG_RUNTIME_CPU_DETECT - struct VP9_COMMON_RTCD *rtcd; -#endif - int mb_index; // Index of the MB in the SB (0..3) int q_index; diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h index 1bbdaee..cfbc33b 100644 --- a/vp9/common/vp9_onyxc_int.h +++ b/vp9/common/vp9_onyxc_int.h @@ -143,14 +143,6 @@ typedef enum { NB_TXFM_MODES = 4, } TXFM_MODE; -typedef struct VP9_COMMON_RTCD { -#if CONFIG_RUNTIME_CPU_DETECT - int flags; -#else - int unused; -#endif -} VP9_COMMON_RTCD; - typedef struct VP9Common { struct vpx_internal_error_info error; @@ -294,10 +286,6 @@ typedef struct VP9Common { double bitrate; double framerate; -#if CONFIG_RUNTIME_CPU_DETECT - VP9_COMMON_RTCD rtcd; -#endif - #if CONFIG_POSTPROC struct postproc_state postproc_state; #endif diff --git a/vp9/common/vp9_reconinter.c b/vp9/common/vp9_reconinter.c index bcd75ec..e8ff42f 100644 --- a/vp9/common/vp9_reconinter.c +++ b/vp9/common/vp9_reconinter.c @@ -14,9 +14,6 @@ #include "vp9/common/vp9_blockd.h" #include "vp9/common/vp9_reconinter.h" #include "vp9/common/vp9_reconintra.h" -#if CONFIG_RUNTIME_CPU_DETECT -#include "vp9/common/vp9_onyxc_int.h" -#endif void vp9_setup_interp_filters(MACROBLOCKD *xd, INTERPOLATIONFILTERTYPE mcomp_filter_type, diff --git a/vp9/common/x86/vp9_x86_systemdependent.c b/vp9/common/x86/vp9_x86_systemdependent.c deleted file mode 100644 index 23b7a58..0000000 --- a/vp9/common/x86/vp9_x86_systemdependent.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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 "vpx_config.h" -#include "vpx_ports/x86.h" -#include "vp9/common/vp9_loopfilter.h" -#include "vp9/common/vp9_pragmas.h" -#include "vp9/common/vp9_onyxc_int.h" - -void vp9_arch_x86_common_init(VP9_COMMON *ctx) { -#if CONFIG_RUNTIME_CPU_DETECT - VP9_COMMON_RTCD *rtcd = &ctx->rtcd; - int flags = x86_simd_caps(); - - /* Note: - * - * This platform can be built without runtime CPU detection as well. If - * you modify any of the function mappings present in this file, be sure - * to also update them in static mapings (/filename_.h) - */ - - /* Override default functions with fastest ones for this CPU. */ -#if HAVE_MMX -// The commented functions need to be re-written for vpx. - if (flags & HAS_MMX) { - - } - -#endif -#if HAVE_SSE2 - - if (flags & HAS_SSE2) { - - - // rtcd->idct.iwalsh16 = vp9_short_inv_walsh4x4_sse2; - - } - -#endif - -#if HAVE_SSSE3 - - if (flags & HAS_SSSE3) { - - /* these are disable because of unsupported diagonal pred modes - rtcd->recon.build_intra_predictors_mbuv = - vp9_build_intra_predictors_mbuv_ssse3; - rtcd->recon.build_intra_predictors_mbuv_s = - vp9_build_intra_predictors_mbuv_s_ssse3; - */ - } -#endif - -#endif -} diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c index de3569f..28bb523 100644 --- a/vp9/decoder/vp9_decodframe.c +++ b/vp9/decoder/vp9_decodframe.c @@ -165,12 +165,6 @@ static void mb_init_dequantizer(VP9D_COMP *pbi, MACROBLOCKD *xd) { } -#if CONFIG_RUNTIME_CPU_DETECT -#define RTCD_VTABLE(x) (&(pbi)->common.rtcd.x) -#else -#define RTCD_VTABLE(x) NULL -#endif - /* skip_recon_mb() is Modified: Instead of writing the result to predictor buffer and then copying it * to dst buffer, we can write the result directly to dst buffer. This eliminates unnecessary copy. */ diff --git a/vp9/encoder/generic/vp9_csystemdependent.c b/vp9/encoder/generic/vp9_csystemdependent.c deleted file mode 100644 index 20f03a7..0000000 --- a/vp9/encoder/generic/vp9_csystemdependent.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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 "vpx_ports/config.h" -#include "vp9/encoder/vp9_variance.h" -#include "vp9/encoder/vp9_onyx_int.h" - - -void vp9_cmachine_specific_config(VP9_COMP *cpi) { -#if CONFIG_RUNTIME_CPU_DETECT - cpi->rtcd.common = &cpi->common.rtcd; -#endif -} diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index bd41461..1d06d9d 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -39,14 +39,6 @@ #define DBG_PRNT_SEGMAP 0 -#if CONFIG_RUNTIME_CPU_DETECT -#define RTCD(x) &cpi->common.rtcd.x -#define IF_RTCD(x) (x) -#else -#define RTCD(x) NULL -#define IF_RTCD(x) NULL -#endif - // #define ENC_DEBUG #ifdef ENC_DEBUG int enc_debug = 0; diff --git a/vp9/encoder/vp9_encodeintra.c b/vp9/encoder/vp9_encodeintra.c index 0f813d9..17a3a95 100644 --- a/vp9/encoder/vp9_encodeintra.c +++ b/vp9/encoder/vp9_encodeintra.c @@ -17,12 +17,6 @@ #include "vp9/common/vp9_invtrans.h" #include "vp9/encoder/vp9_encodeintra.h" -#if CONFIG_RUNTIME_CPU_DETECT -#define IF_RTCD(x) (x) -#else -#define IF_RTCD(x) NULL -#endif - int vp9_encode_intra(VP9_COMP *cpi, MACROBLOCK *x, int use_16x16_pred) { int i; int intra_pred_var = 0; diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index 65476f2..8a05eb8 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -34,12 +34,6 @@ #define OUTPUT_FPF 0 -#if CONFIG_RUNTIME_CPU_DETECT -#define IF_RTCD(x) (x) -#else -#define IF_RTCD(x) NULL -#endif - #define IIFACTOR 12.5 #define IIKFACTOR1 12.5 #define IIKFACTOR2 15.0 diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index 754096d..0f1793b 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -48,16 +48,6 @@ #include #include -#if CONFIG_RUNTIME_CPU_DETECT -#define IF_RTCD(x) (x) -#define RTCD(x) &cpi->common.rtcd.x -#else -#define IF_RTCD(x) NULL -#define RTCD(x) NULL -#endif - -extern void vp9_cmachine_specific_config(VP9_COMP *cpi); - extern void print_tree_update_probs(); #if HAVE_ARMV7 @@ -1274,10 +1264,6 @@ void vp9_set_speed_features(VP9_COMP *cpi) { vp9_init_quantizer(cpi); -#if CONFIG_RUNTIME_CPU_DETECT - cpi->mb.e_mbd.rtcd = &cpi->common.rtcd; -#endif - if (cpi->sf.iterative_sub_pixel == 1) { cpi->find_fractional_mv_step = vp9_find_best_sub_pixel_step_iteratively; } else if (cpi->sf.quarter_pixel_search) { @@ -1817,7 +1803,6 @@ VP9_PTR vp9_create_compressor(VP9_CONFIG *oxcf) { CHECK_MEM_ERROR(cpi->mb.ss, vpx_calloc(sizeof(search_site), (MAX_MVSEARCH_STEPS * 8) + 1)); vp9_create_common(&cpi->common); - vp9_cmachine_specific_config(cpi); init_config((VP9_PTR)cpi, oxcf); diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h index c71888e..425c386 100644 --- a/vp9/encoder/vp9_onyx_int.h +++ b/vp9/encoder/vp9_onyx_int.h @@ -389,11 +389,6 @@ typedef struct { void *ptr1; } LPFTHREAD_DATA; - -typedef struct VP9_ENCODER_RTCD { - VP9_COMMON_RTCD *common; -} VP9_ENCODER_RTCD; - enum BlockSize { BLOCK_16X8 = PARTITIONING_16X8, BLOCK_8X16 = PARTITIONING_8X16, @@ -728,9 +723,6 @@ typedef struct VP9_COMP { double est_max_qcorrection_factor; } twopass; -#if CONFIG_RUNTIME_CPU_DETECT - VP9_ENCODER_RTCD rtcd; -#endif #if VP9_TEMPORAL_ALT_REF YV12_BUFFER_CONFIG alt_ref_buffer; YV12_BUFFER_CONFIG *frames[MAX_LAG_BUFFERS]; diff --git a/vp9/encoder/vp9_picklpf.c b/vp9/encoder/vp9_picklpf.c index 395600c..824951a 100644 --- a/vp9/encoder/vp9_picklpf.c +++ b/vp9/encoder/vp9_picklpf.c @@ -25,12 +25,6 @@ extern void vp8_yv12_copy_frame_yonly_no_extend_frame_borders_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc); #endif -#if CONFIG_RUNTIME_CPU_DETECT -#define IF_RTCD(x) (x) -#else -#define IF_RTCD(x) NULL -#endif - void vp9_yv12_copy_partial_frame_c(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc, int Fraction) { unsigned char *src_y, *dst_y; diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index 22a6d9a..ce9a8ad 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -42,12 +42,6 @@ #include "vp9_rtcd.h" #include "vp9/common/vp9_mvref_common.h" -#if CONFIG_RUNTIME_CPU_DETECT -#define IF_RTCD(x) (x) -#else -#define IF_RTCD(x) NULL -#endif - #define MAXF(a,b) (((a) > (b)) ? (a) : (b)) #define INVALID_MV 0x80008000 diff --git a/vp9/vp9_common.mk b/vp9/vp9_common.mk index 7b241ad..3e2a2bd 100644 --- a/vp9/vp9_common.mk +++ b/vp9/vp9_common.mk @@ -83,7 +83,6 @@ VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_idct_x86.h VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_subpixel_x86.h VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_loopfilter_x86.h VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_postproc_x86.h -VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_x86_systemdependent.c VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_vp8_asm_stubs.c VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_loopfilter_x86.c VP9_COMMON_SRCS-$(CONFIG_POSTPROC) += common/vp9_postproc.h diff --git a/vp9/vp9cx.mk b/vp9/vp9cx.mk index 79997d1..d20e79a 100644 --- a/vp9/vp9cx.mk +++ b/vp9/vp9cx.mk @@ -39,7 +39,6 @@ VP9_CX_SRCS-yes += encoder/vp9_encodeintra.c VP9_CX_SRCS-yes += encoder/vp9_encodemb.c VP9_CX_SRCS-yes += encoder/vp9_encodemv.c VP9_CX_SRCS-yes += encoder/vp9_firstpass.c -VP9_CX_SRCS-yes += encoder/generic/vp9_csystemdependent.c VP9_CX_SRCS-yes += encoder/vp9_block.h VP9_CX_SRCS-yes += encoder/vp9_boolhuff.h VP9_CX_SRCS-yes += encoder/vp9_bitstream.h -- 2.7.4