+++ /dev/null
-/*
- * 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/arm.h"
-#include "vp8/common/pragmas.h"
-#include "vp8/common/subpixel.h"
-#include "vp8/common/loopfilter.h"
-#include "vp8/common/onyxc_int.h"
-
-void vp8_arch_arm_common_init(VP8_COMMON *ctx)
-{
-#if CONFIG_RUNTIME_CPU_DETECT
- VP8_COMMON_RTCD *rtcd = &ctx->rtcd;
- int flags = arm_cpu_caps();
- rtcd->flags = flags;
-
- /* Override default functions with fastest ones for this CPU. */
-#if HAVE_EDSP
- if (flags & HAS_EDSP)
- {
- }
-#endif
-
-#if HAVE_MEDIA
- if (flags & HAS_MEDIA)
- {
- rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_armv6;
- rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_armv6;
- rtcd->subpix.sixtap8x4 = vp8_sixtap_predict8x4_armv6;
- rtcd->subpix.sixtap4x4 = vp8_sixtap_predict_armv6;
- rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_armv6;
- rtcd->subpix.bilinear8x8 = vp8_bilinear_predict8x8_armv6;
- rtcd->subpix.bilinear8x4 = vp8_bilinear_predict8x4_armv6;
- rtcd->subpix.bilinear4x4 = vp8_bilinear_predict4x4_armv6;
- }
-#endif
-
-#if HAVE_NEON
- if (flags & HAS_NEON)
- {
- rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_neon;
- rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_neon;
- rtcd->subpix.sixtap8x4 = vp8_sixtap_predict8x4_neon;
- rtcd->subpix.sixtap4x4 = vp8_sixtap_predict_neon;
- rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_neon;
- rtcd->subpix.bilinear8x8 = vp8_bilinear_predict8x8_neon;
- rtcd->subpix.bilinear8x4 = vp8_bilinear_predict8x4_neon;
- rtcd->subpix.bilinear4x4 = vp8_bilinear_predict4x4_neon;
- }
-#endif
-
-#endif
-}
* be found in the AUTHORS file in the root of the source tree.
*/
-
+#include "vpx_config.h"
+#include "vpx_rtcd.h"
#include <math.h>
#include "vp8/common/filter.h"
-#include "vp8/common/subpixel.h"
#include "bilinearfilter_arm.h"
void vp8_filter_block2d_bil_armv6
#include "vpx_config.h"
+#include "vpx_rtcd.h"
#include <math.h>
#include "vp8/common/filter.h"
-#include "vp8/common/subpixel.h"
#include "vpx_ports/mem.h"
extern void vp8_filter_block2d_first_pass_armv6
);
#if HAVE_MEDIA
-void vp8_sixtap_predict_armv6
+void vp8_sixtap_predict4x4_armv6
(
unsigned char *src_ptr,
int src_pixels_per_line,
;
- EXPORT |vp8_sixtap_predict_neon|
+ EXPORT |vp8_sixtap_predict4x4_neon|
ARM
REQUIRE8
PRESERVE8
; stack(r4) unsigned char *dst_ptr,
; stack(lr) int dst_pitch
-|vp8_sixtap_predict_neon| PROC
+|vp8_sixtap_predict4x4_neon| PROC
push {r4, lr}
adr r12, filter4_coeff
+++ /dev/null
-/*
- * 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.
- */
-
-
-#ifndef SUBPIXEL_ARM_H
-#define SUBPIXEL_ARM_H
-
-#if HAVE_MEDIA
-extern prototype_subpixel_predict(vp8_sixtap_predict16x16_armv6);
-extern prototype_subpixel_predict(vp8_sixtap_predict8x8_armv6);
-extern prototype_subpixel_predict(vp8_sixtap_predict8x4_armv6);
-extern prototype_subpixel_predict(vp8_sixtap_predict_armv6);
-extern prototype_subpixel_predict(vp8_bilinear_predict16x16_armv6);
-extern prototype_subpixel_predict(vp8_bilinear_predict8x8_armv6);
-extern prototype_subpixel_predict(vp8_bilinear_predict8x4_armv6);
-extern prototype_subpixel_predict(vp8_bilinear_predict4x4_armv6);
-
-#if !CONFIG_RUNTIME_CPU_DETECT
-#undef vp8_subpix_sixtap16x16
-#define vp8_subpix_sixtap16x16 vp8_sixtap_predict16x16_armv6
-
-#undef vp8_subpix_sixtap8x8
-#define vp8_subpix_sixtap8x8 vp8_sixtap_predict8x8_armv6
-
-#undef vp8_subpix_sixtap8x4
-#define vp8_subpix_sixtap8x4 vp8_sixtap_predict8x4_armv6
-
-#undef vp8_subpix_sixtap4x4
-#define vp8_subpix_sixtap4x4 vp8_sixtap_predict_armv6
-
-#undef vp8_subpix_bilinear16x16
-#define vp8_subpix_bilinear16x16 vp8_bilinear_predict16x16_armv6
-
-#undef vp8_subpix_bilinear8x8
-#define vp8_subpix_bilinear8x8 vp8_bilinear_predict8x8_armv6
-
-#undef vp8_subpix_bilinear8x4
-#define vp8_subpix_bilinear8x4 vp8_bilinear_predict8x4_armv6
-
-#undef vp8_subpix_bilinear4x4
-#define vp8_subpix_bilinear4x4 vp8_bilinear_predict4x4_armv6
-#endif
-#endif
-
-#if HAVE_NEON
-extern prototype_subpixel_predict(vp8_sixtap_predict16x16_neon);
-extern prototype_subpixel_predict(vp8_sixtap_predict8x8_neon);
-extern prototype_subpixel_predict(vp8_sixtap_predict8x4_neon);
-extern prototype_subpixel_predict(vp8_sixtap_predict_neon);
-extern prototype_subpixel_predict(vp8_bilinear_predict16x16_neon);
-extern prototype_subpixel_predict(vp8_bilinear_predict8x8_neon);
-extern prototype_subpixel_predict(vp8_bilinear_predict8x4_neon);
-extern prototype_subpixel_predict(vp8_bilinear_predict4x4_neon);
-
-#if !CONFIG_RUNTIME_CPU_DETECT
-#undef vp8_subpix_sixtap16x16
-#define vp8_subpix_sixtap16x16 vp8_sixtap_predict16x16_neon
-
-#undef vp8_subpix_sixtap8x8
-#define vp8_subpix_sixtap8x8 vp8_sixtap_predict8x8_neon
-
-#undef vp8_subpix_sixtap8x4
-#define vp8_subpix_sixtap8x4 vp8_sixtap_predict8x4_neon
-
-#undef vp8_subpix_sixtap4x4
-#define vp8_subpix_sixtap4x4 vp8_sixtap_predict_neon
-
-#undef vp8_subpix_bilinear16x16
-#define vp8_subpix_bilinear16x16 vp8_bilinear_predict16x16_neon
-
-#undef vp8_subpix_bilinear8x8
-#define vp8_subpix_bilinear8x8 vp8_bilinear_predict8x8_neon
-
-#undef vp8_subpix_bilinear8x4
-#define vp8_subpix_bilinear8x4 vp8_bilinear_predict8x4_neon
-
-#undef vp8_subpix_bilinear4x4
-#define vp8_subpix_bilinear4x4 vp8_bilinear_predict4x4_neon
-#endif
-#endif
-
-#endif
#include "vpx_scale/yv12config.h"
#include "mv.h"
#include "treecoder.h"
-#include "subpixel.h"
#include "vpx_ports/mem.h"
/*#define DCPRED 1*/
union b_mode_info bmi;
} BLOCKD;
+typedef void (*vp8_subpix_fn_t)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
+
typedef struct macroblockd
{
DECLARE_ALIGNED(16, unsigned char, predictor[384]);
}
-void vp8_sixtap_predict_c
+void vp8_sixtap_predict4x4_c
(
unsigned char *src_ptr,
int src_pixels_per_line,
#include "vpx_config.h"
#include "vpx_rtcd.h"
-#include "vp8/common/subpixel.h"
-#include "vp8/common/loopfilter.h"
+#if ARCH_ARM
+#include "vpx_ports/arm.h"
+#elif ARCH_X86 || ARCH_X86_64
+#include "vpx_ports/x86.h"
+#endif
#include "vp8/common/onyxc_int.h"
#if CONFIG_MULTITHREAD
#endif
#endif
-extern void vp8_arch_x86_common_init(VP8_COMMON *ctx);
-extern void vp8_arch_arm_common_init(VP8_COMMON *ctx);
-
#if CONFIG_MULTITHREAD
static int get_cpu_count()
{
void vp8_machine_specific_config(VP8_COMMON *ctx)
{
-#if CONFIG_RUNTIME_CPU_DETECT
- VP8_COMMON_RTCD *rtcd = &ctx->rtcd;
-
- rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_c;
- rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_c;
- rtcd->subpix.sixtap8x4 = vp8_sixtap_predict8x4_c;
- rtcd->subpix.sixtap4x4 = vp8_sixtap_predict_c;
- rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_c;
- rtcd->subpix.bilinear8x8 = vp8_bilinear_predict8x8_c;
- rtcd->subpix.bilinear8x4 = vp8_bilinear_predict8x4_c;
- rtcd->subpix.bilinear4x4 = vp8_bilinear_predict4x4_c;
-#endif
-
-#if ARCH_X86 || ARCH_X86_64
- vp8_arch_x86_common_init(ctx);
-#endif
-
-#if ARCH_ARM
- vp8_arch_arm_common_init(ctx);
-#endif
-
#if CONFIG_MULTITHREAD
ctx->processor_core_count = get_cpu_count();
#endif /* CONFIG_MULTITHREAD */
+#if ARCH_ARM
+ ctx->cpu_caps = arm_cpu_caps();
+#elif ARCH_X86 || ARCH_X86_64
+ ctx->cpu_caps = x86_simd_caps();
+#endif
+
vpx_rtcd();
}
}
}
-static void vp8_inverse_transform_mby(MACROBLOCKD *xd,
- const VP8_COMMON_RTCD *rtcd)
+static void vp8_inverse_transform_mby(MACROBLOCKD *xd)
{
short *DQC = xd->dequant_y1;
BILINEAR = 1
} INTERPOLATIONFILTERTYPE;
-typedef struct VP8_COMMON_RTCD
-{
-#if CONFIG_RUNTIME_CPU_DETECT
- vp8_subpix_rtcd_vtable_t subpix;
- int flags;
-#else
- int unused;
-#endif
-} VP8_COMMON_RTCD;
-
typedef struct VP8Common
{
double bitrate;
double framerate;
-#if CONFIG_RUNTIME_CPU_DETECT
- VP8_COMMON_RTCD rtcd;
-#endif
#if CONFIG_MULTITHREAD
int processor_core_count;
#endif
#if CONFIG_POSTPROC
struct postproc_state postproc_state;
#endif
+ int cpu_caps;
} VP8_COMMON;
#endif
#include "vpx_config.h"
#include "vpx_rtcd.h"
#include "vpx/vpx_integer.h"
-#include "subpixel.h"
#include "blockd.h"
#include "reconinter.h"
#if CONFIG_RUNTIME_CPU_DETECT
prototype void vp8_blend_b "unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride"
# no asm yet
fi
+
+#
+# Subpixel
+#
+prototype void vp8_sixtap_predict16x16 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
+specialize vp8_sixtap_predict16x16 mmx sse2 ssse3 media neon
+vp8_sixtap_predict16x16_media=vp8_sixtap_predict16x16_armv6
+
+prototype void vp8_sixtap_predict8x8 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
+specialize vp8_sixtap_predict8x8 mmx sse2 ssse3 media neon
+vp8_sixtap_predict8x8_media=vp8_sixtap_predict8x8_armv6
+
+prototype void vp8_sixtap_predict8x4 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
+specialize vp8_sixtap_predict8x4 mmx sse2 ssse3 media neon
+vp8_sixtap_predict8x4_media=vp8_sixtap_predict8x4_armv6
+
+prototype void vp8_sixtap_predict4x4 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
+specialize vp8_sixtap_predict4x4 mmx ssse3 media neon
+vp8_sixtap_predict4x4_media=vp8_sixtap_predict4x4_armv6
+
+prototype void vp8_bilinear_predict16x16 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
+specialize vp8_bilinear_predict16x16 mmx sse2 ssse3 media neon
+vp8_bilinear_predict16x16_media=vp8_bilinear_predict16x16_armv6
+
+prototype void vp8_bilinear_predict8x8 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
+specialize vp8_bilinear_predict8x8 mmx sse2 ssse3 media neon
+vp8_bilinear_predict8x8_media=vp8_bilinear_predict8x8_armv6
+
+prototype void vp8_bilinear_predict8x4 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
+specialize vp8_bilinear_predict8x4 mmx media neon
+vp8_bilinear_predict8x4_media=vp8_bilinear_predict8x4_armv6
+
+prototype void vp8_bilinear_predict4x4 "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch"
+specialize vp8_bilinear_predict4x4 mmx media neon
+vp8_bilinear_predict4x4_media=vp8_bilinear_predict4x4_armv6
+++ /dev/null
-/*
- * 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.
- */
-
-
-#ifndef SUBPIXEL_H
-#define SUBPIXEL_H
-
-#define prototype_subpixel_predict(sym) \
- void sym(unsigned char *src, int src_pitch, int xofst, int yofst, \
- unsigned char *dst, int dst_pitch)
-
-#if ARCH_X86 || ARCH_X86_64
-#include "x86/subpixel_x86.h"
-#endif
-
-#if ARCH_ARM
-#include "arm/subpixel_arm.h"
-#endif
-
-#ifndef vp8_subpix_sixtap16x16
-#define vp8_subpix_sixtap16x16 vp8_sixtap_predict16x16_c
-#endif
-extern prototype_subpixel_predict(vp8_subpix_sixtap16x16);
-
-#ifndef vp8_subpix_sixtap8x8
-#define vp8_subpix_sixtap8x8 vp8_sixtap_predict8x8_c
-#endif
-extern prototype_subpixel_predict(vp8_subpix_sixtap8x8);
-
-#ifndef vp8_subpix_sixtap8x4
-#define vp8_subpix_sixtap8x4 vp8_sixtap_predict8x4_c
-#endif
-extern prototype_subpixel_predict(vp8_subpix_sixtap8x4);
-
-#ifndef vp8_subpix_sixtap4x4
-#define vp8_subpix_sixtap4x4 vp8_sixtap_predict_c
-#endif
-extern prototype_subpixel_predict(vp8_subpix_sixtap4x4);
-
-#ifndef vp8_subpix_bilinear16x16
-#define vp8_subpix_bilinear16x16 vp8_bilinear_predict16x16_c
-#endif
-extern prototype_subpixel_predict(vp8_subpix_bilinear16x16);
-
-#ifndef vp8_subpix_bilinear8x8
-#define vp8_subpix_bilinear8x8 vp8_bilinear_predict8x8_c
-#endif
-extern prototype_subpixel_predict(vp8_subpix_bilinear8x8);
-
-#ifndef vp8_subpix_bilinear8x4
-#define vp8_subpix_bilinear8x4 vp8_bilinear_predict8x4_c
-#endif
-extern prototype_subpixel_predict(vp8_subpix_bilinear8x4);
-
-#ifndef vp8_subpix_bilinear4x4
-#define vp8_subpix_bilinear4x4 vp8_bilinear_predict4x4_c
-#endif
-extern prototype_subpixel_predict(vp8_subpix_bilinear4x4);
-
-typedef prototype_subpixel_predict((*vp8_subpix_fn_t));
-typedef struct
-{
- vp8_subpix_fn_t sixtap16x16;
- vp8_subpix_fn_t sixtap8x8;
- vp8_subpix_fn_t sixtap8x4;
- vp8_subpix_fn_t sixtap4x4;
- vp8_subpix_fn_t bilinear16x16;
- vp8_subpix_fn_t bilinear8x8;
- vp8_subpix_fn_t bilinear8x4;
- vp8_subpix_fn_t bilinear4x4;
-} vp8_subpix_rtcd_vtable_t;
-
-#if CONFIG_RUNTIME_CPU_DETECT
-#define SUBPIX_INVOKE(ctx,fn) (ctx)->fn
-#else
-#define SUBPIX_INVOKE(ctx,fn) vp8_subpix_##fn
-#endif
-
-#endif
+++ /dev/null
-/*
- * 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.
- */
-
-
-#ifndef SUBPIXEL_X86_H
-#define SUBPIXEL_X86_H
-
-#include "filter_x86.h"
-
-/* Note:
- *
- * This platform is commonly built for runtime CPU detection. If you modify
- * any of the function mappings present in this file, be sure to also update
- * them in the function pointer initialization code
- */
-
-#if HAVE_MMX
-extern prototype_subpixel_predict(vp8_sixtap_predict16x16_mmx);
-extern prototype_subpixel_predict(vp8_sixtap_predict8x8_mmx);
-extern prototype_subpixel_predict(vp8_sixtap_predict8x4_mmx);
-extern prototype_subpixel_predict(vp8_sixtap_predict4x4_mmx);
-extern prototype_subpixel_predict(vp8_bilinear_predict16x16_mmx);
-extern prototype_subpixel_predict(vp8_bilinear_predict8x8_mmx);
-extern prototype_subpixel_predict(vp8_bilinear_predict8x4_mmx);
-extern prototype_subpixel_predict(vp8_bilinear_predict4x4_mmx);
-
-
-#if !CONFIG_RUNTIME_CPU_DETECT
-#undef vp8_subpix_sixtap16x16
-#define vp8_subpix_sixtap16x16 vp8_sixtap_predict16x16_mmx
-
-#undef vp8_subpix_sixtap8x8
-#define vp8_subpix_sixtap8x8 vp8_sixtap_predict8x8_mmx
-
-#undef vp8_subpix_sixtap8x4
-#define vp8_subpix_sixtap8x4 vp8_sixtap_predict8x4_mmx
-
-#undef vp8_subpix_sixtap4x4
-#define vp8_subpix_sixtap4x4 vp8_sixtap_predict4x4_mmx
-
-#undef vp8_subpix_bilinear16x16
-#define vp8_subpix_bilinear16x16 vp8_bilinear_predict16x16_mmx
-
-#undef vp8_subpix_bilinear8x8
-#define vp8_subpix_bilinear8x8 vp8_bilinear_predict8x8_mmx
-
-#undef vp8_subpix_bilinear8x4
-#define vp8_subpix_bilinear8x4 vp8_bilinear_predict8x4_mmx
-
-#undef vp8_subpix_bilinear4x4
-#define vp8_subpix_bilinear4x4 vp8_bilinear_predict4x4_mmx
-
-#endif
-#endif
-
-
-#if HAVE_SSE2
-extern prototype_subpixel_predict(vp8_sixtap_predict16x16_sse2);
-extern prototype_subpixel_predict(vp8_sixtap_predict8x8_sse2);
-extern prototype_subpixel_predict(vp8_sixtap_predict8x4_sse2);
-extern prototype_subpixel_predict(vp8_bilinear_predict16x16_sse2);
-extern prototype_subpixel_predict(vp8_bilinear_predict8x8_sse2);
-
-
-#if !CONFIG_RUNTIME_CPU_DETECT
-#undef vp8_subpix_sixtap16x16
-#define vp8_subpix_sixtap16x16 vp8_sixtap_predict16x16_sse2
-
-#undef vp8_subpix_sixtap8x8
-#define vp8_subpix_sixtap8x8 vp8_sixtap_predict8x8_sse2
-
-#undef vp8_subpix_sixtap8x4
-#define vp8_subpix_sixtap8x4 vp8_sixtap_predict8x4_sse2
-
-#undef vp8_subpix_bilinear16x16
-#define vp8_subpix_bilinear16x16 vp8_bilinear_predict16x16_sse2
-
-#undef vp8_subpix_bilinear8x8
-#define vp8_subpix_bilinear8x8 vp8_bilinear_predict8x8_sse2
-
-#endif
-#endif
-
-#if HAVE_SSSE3
-extern prototype_subpixel_predict(vp8_sixtap_predict16x16_ssse3);
-extern prototype_subpixel_predict(vp8_sixtap_predict8x8_ssse3);
-extern prototype_subpixel_predict(vp8_sixtap_predict8x4_ssse3);
-extern prototype_subpixel_predict(vp8_sixtap_predict4x4_ssse3);
-extern prototype_subpixel_predict(vp8_bilinear_predict16x16_ssse3);
-extern prototype_subpixel_predict(vp8_bilinear_predict8x8_ssse3);
-
-#if !CONFIG_RUNTIME_CPU_DETECT
-#undef vp8_subpix_sixtap16x16
-#define vp8_subpix_sixtap16x16 vp8_sixtap_predict16x16_ssse3
-
-#undef vp8_subpix_sixtap8x8
-#define vp8_subpix_sixtap8x8 vp8_sixtap_predict8x8_ssse3
-
-#undef vp8_subpix_sixtap8x4
-#define vp8_subpix_sixtap8x4 vp8_sixtap_predict8x4_ssse3
-
-#undef vp8_subpix_sixtap4x4
-#define vp8_subpix_sixtap4x4 vp8_sixtap_predict4x4_ssse3
-
-
-#undef vp8_subpix_bilinear16x16
-#define vp8_subpix_bilinear16x16 vp8_bilinear_predict16x16_ssse3
-
-#undef vp8_subpix_bilinear8x8
-#define vp8_subpix_bilinear8x8 vp8_bilinear_predict8x8_ssse3
-
-#endif
-#endif
-
-
-
-#endif
#include "vpx_config.h"
+#include "vpx_rtcd.h"
#include "vpx_ports/mem.h"
-#include "vp8/common/subpixel.h"
#include "filter_x86.h"
extern const short vp8_six_tap_mmx[8][6*8];
unsigned int output_height,
const short *vp8_filter
);
-extern prototype_subpixel_predict(vp8_bilinear_predict8x8_mmx);
#if HAVE_MMX
+++ /dev/null
-/*
- * 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 "vp8/common/subpixel.h"
-#include "vp8/common/loopfilter.h"
-#include "vp8/common/pragmas.h"
-#include "vp8/common/onyxc_int.h"
-
-void vp8_arch_x86_common_init(VP8_COMMON *ctx)
-{
-#if CONFIG_RUNTIME_CPU_DETECT
- VP8_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 (<arch>/filename_<arch>.h)
- */
-
- /* Override default functions with fastest ones for this CPU. */
-#if HAVE_MMX
-
- if (flags & HAS_MMX)
- {
- rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_mmx;
- rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_mmx;
- rtcd->subpix.sixtap8x4 = vp8_sixtap_predict8x4_mmx;
- rtcd->subpix.sixtap4x4 = vp8_sixtap_predict4x4_mmx;
- rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_mmx;
- rtcd->subpix.bilinear8x8 = vp8_bilinear_predict8x8_mmx;
- rtcd->subpix.bilinear8x4 = vp8_bilinear_predict8x4_mmx;
- rtcd->subpix.bilinear4x4 = vp8_bilinear_predict4x4_mmx;
- }
-
-#endif
-#if HAVE_SSE2
-
- if (flags & HAS_SSE2)
- {
- rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_sse2;
- rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_sse2;
- rtcd->subpix.sixtap8x4 = vp8_sixtap_predict8x4_sse2;
- rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_sse2;
- rtcd->subpix.bilinear8x8 = vp8_bilinear_predict8x8_sse2;
- }
-
-#endif
-
-#if HAVE_SSSE3
-
- if (flags & HAS_SSSE3)
- {
- rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_ssse3;
- rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_ssse3;
- rtcd->subpix.sixtap8x4 = vp8_sixtap_predict8x4_ssse3;
- rtcd->subpix.sixtap4x4 = vp8_sixtap_predict4x4_ssse3;
- rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_ssse3;
- rtcd->subpix.bilinear8x8 = vp8_bilinear_predict8x8_ssse3;
- }
-#endif
-
-#endif
-}
/* To enable choice of different interploation filters */
if (pc->mcomp_filter_type == SIXTAP)
{
- xd->subpixel_predict = SUBPIX_INVOKE(RTCD_VTABLE(subpix), sixtap4x4);
- xd->subpixel_predict8x4 = SUBPIX_INVOKE(RTCD_VTABLE(subpix), sixtap8x4);
- xd->subpixel_predict8x8 = SUBPIX_INVOKE(RTCD_VTABLE(subpix), sixtap8x8);
- xd->subpixel_predict16x16 = SUBPIX_INVOKE(RTCD_VTABLE(subpix), sixtap16x16);
+ xd->subpixel_predict = vp8_sixtap_predict4x4;
+ xd->subpixel_predict8x4 = vp8_sixtap_predict8x4;
+ xd->subpixel_predict8x8 = vp8_sixtap_predict8x8;
+ xd->subpixel_predict16x16 = vp8_sixtap_predict16x16;
}
else
{
- xd->subpixel_predict = SUBPIX_INVOKE(RTCD_VTABLE(subpix), bilinear4x4);
- xd->subpixel_predict8x4 = SUBPIX_INVOKE(RTCD_VTABLE(subpix), bilinear8x4);
- xd->subpixel_predict8x8 = SUBPIX_INVOKE(RTCD_VTABLE(subpix), bilinear8x8);
- xd->subpixel_predict16x16 = SUBPIX_INVOKE(RTCD_VTABLE(subpix), bilinear16x16);
+ xd->subpixel_predict = vp8_bilinear_predict4x4;
+ xd->subpixel_predict8x4 = vp8_bilinear_predict8x4;
+ xd->subpixel_predict8x8 = vp8_bilinear_predict8x8;
+ xd->subpixel_predict16x16 = vp8_bilinear_predict16x16;
}
if (pbi->decoded_key_frame && pbi->ec_enabled && !pbi->ec_active)
vp8dx_initialize();
vp8_create_common(&pbi->common);
-#if CONFIG_RUNTIME_CPU_DETECT
- pbi->mb.rtcd = &pbi->common.rtcd;
-#endif
pbi->common.current_video_frame = 0;
pbi->ready_for_new_data = 1;
#if HAVE_NEON
#if CONFIG_RUNTIME_CPU_DETECT
- if (cm->rtcd.flags & HAS_NEON)
+ if (cm->cpu_caps & HAS_NEON)
#endif
{
vp8_push_neon(dx_store_reg);
{
#if HAVE_NEON
#if CONFIG_RUNTIME_CPU_DETECT
- if (cm->rtcd.flags & HAS_NEON)
+ if (cm->cpu_caps & HAS_NEON)
#endif
{
vp8_pop_neon(dx_store_reg);
{
#if HAVE_NEON
#if CONFIG_RUNTIME_CPU_DETECT
- if (cm->rtcd.flags & HAS_NEON)
+ if (cm->cpu_caps & HAS_NEON)
#endif
{
vp8_pop_neon(dx_store_reg);
{
#if HAVE_NEON
#if CONFIG_RUNTIME_CPU_DETECT
- if (cm->rtcd.flags & HAS_NEON)
+ if (cm->cpu_caps & HAS_NEON)
#endif
{
vp8_pop_neon(dx_store_reg);
{
#if HAVE_NEON
#if CONFIG_RUNTIME_CPU_DETECT
- if (cm->rtcd.flags & HAS_NEON)
+ if (cm->cpu_caps & HAS_NEON)
#endif
{
vp8_pop_neon(dx_store_reg);
#if HAVE_NEON
#if CONFIG_RUNTIME_CPU_DETECT
- if (cm->rtcd.flags & HAS_NEON)
+ if (cm->cpu_caps & HAS_NEON)
#endif
{
vp8_pop_neon(dx_store_reg);
void vp8_arch_arm_encoder_init(VP8_COMP *cpi)
{
#if CONFIG_RUNTIME_CPU_DETECT
- int flags = cpi->common.rtcd.flags;
+ int flags = cpi->common.cpu_caps;
#if HAVE_EDSP
if (flags & HAS_EDSP)
#include "vp8/common/findnearmv.h"
#include <stdio.h>
#include <limits.h>
-#include "vp8/common/subpixel.h"
#include "vp8/common/invtrans.h"
#include "vpx_ports/vpx_timer.h"
// Functions setup for all frame types so we can use MC in AltRef
if (cm->mcomp_filter_type == SIXTAP)
{
- xd->subpixel_predict = SUBPIX_INVOKE(
- &cpi->common.rtcd.subpix, sixtap4x4);
- xd->subpixel_predict8x4 = SUBPIX_INVOKE(
- &cpi->common.rtcd.subpix, sixtap8x4);
- xd->subpixel_predict8x8 = SUBPIX_INVOKE(
- &cpi->common.rtcd.subpix, sixtap8x8);
- xd->subpixel_predict16x16 = SUBPIX_INVOKE(
- &cpi->common.rtcd.subpix, sixtap16x16);
+ xd->subpixel_predict = vp8_sixtap_predict4x4;
+ xd->subpixel_predict8x4 = vp8_sixtap_predict8x4;
+ xd->subpixel_predict8x8 = vp8_sixtap_predict8x8;
+ xd->subpixel_predict16x16 = vp8_sixtap_predict16x16;
}
else
{
- xd->subpixel_predict = SUBPIX_INVOKE(
- &cpi->common.rtcd.subpix, bilinear4x4);
- xd->subpixel_predict8x4 = SUBPIX_INVOKE(
- &cpi->common.rtcd.subpix, bilinear8x4);
- xd->subpixel_predict8x8 = SUBPIX_INVOKE(
- &cpi->common.rtcd.subpix, bilinear8x8);
- xd->subpixel_predict16x16 = SUBPIX_INVOKE(
- &cpi->common.rtcd.subpix, bilinear16x16);
+ xd->subpixel_predict = vp8_bilinear_predict4x4;
+ xd->subpixel_predict8x4 = vp8_bilinear_predict8x4;
+ xd->subpixel_predict8x8 = vp8_bilinear_predict8x8;
+ xd->subpixel_predict16x16 = vp8_bilinear_predict16x16;
}
// Reset frame count of inter 0,0 motion vector useage.
vp8_tokenize_mb(cpi, &x->e_mbd, t);
if (xd->mode_info_context->mbmi.mode != B_PRED)
- vp8_inverse_transform_mby(xd, IF_RTCD(&cpi->common.rtcd));
+ vp8_inverse_transform_mby(xd);
vp8_dequant_idct_add_uv_block
(xd->qcoeff+16*16, xd->dequant_uv,
vp8_tokenize_mb(cpi, xd, t);
if (xd->mode_info_context->mbmi.mode != B_PRED)
- vp8_inverse_transform_mby(xd, IF_RTCD(&cpi->common.rtcd));
+ vp8_inverse_transform_mby(xd);
vp8_dequant_idct_add_uv_block
(xd->qcoeff+16*16, xd->dequant_uv,
vp8_encode_intra16x16mby(rtcd, x);
- vp8_inverse_transform_mby(&x->e_mbd, IF_RTCD(&cpi->common.rtcd));
+ vp8_inverse_transform_mby(&x->e_mbd);
}
else
{
vp8_quantize_mby(x);
- vp8_inverse_transform_mby(&x->e_mbd, IF_RTCD(rtcd->common));
+ vp8_inverse_transform_mby(&x->e_mbd);
}
void vp8_cmachine_specific_config(VP8_COMP *cpi)
{
#if CONFIG_RUNTIME_CPU_DETECT
- cpi->rtcd.common = &cpi->common.rtcd;
cpi->rtcd.variance.sad16x16 = vp8_sad16x16_c;
cpi->rtcd.variance.sad16x8 = vp8_sad16x8_c;
cpi->rtcd.variance.sad8x16 = vp8_sad8x16_c;
if (cpi->sf.improved_quant != last_improved_quant)
vp8cx_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 = vp8_find_best_sub_pixel_step_iteratively;
#if HAVE_NEON
#if CONFIG_RUNTIME_CPU_DETECT
- if (cm->rtcd.flags & HAS_NEON)
+ if (cm->cpu_caps & HAS_NEON)
#endif
{
vp8_push_neon(store_reg);
#if HAVE_NEON
#if CONFIG_RUNTIME_CPU_DETECT
- if (cm->rtcd.flags & HAS_NEON)
+ if (cm->cpu_caps & HAS_NEON)
#endif
{
vp8_pop_neon(store_reg);
#if HAVE_NEON
#if CONFIG_RUNTIME_CPU_DETECT
- if (cm->rtcd.flags & HAS_NEON)
+ if (cm->cpu_caps & HAS_NEON)
#endif
{
vp8_push_neon(store_reg);
#if HAVE_NEON
#if CONFIG_RUNTIME_CPU_DETECT
- if (cm->rtcd.flags & HAS_NEON)
+ if (cm->cpu_caps & HAS_NEON)
#endif
{
vp8_pop_neon(store_reg);
#if HAVE_NEON
#if CONFIG_RUNTIME_CPU_DETECT
- if (cm->rtcd.flags & HAS_NEON)
+ if (cm->cpu_caps & HAS_NEON)
#endif
{
vp8_pop_neon(store_reg);
typedef struct VP8_ENCODER_RTCD
{
- VP8_COMMON_RTCD *common;
vp8_variance_rtcd_vtable_t variance;
vp8_fdct_rtcd_vtable_t fdct;
vp8_encodemb_rtcd_vtable_t encodemb;
VP8_COMMON_SRCS-yes += common/rtcd.c
VP8_COMMON_SRCS-yes += common/rtcd_defs.sh
VP8_COMMON_SRCS-yes += common/setupintrarecon.h
-VP8_COMMON_SRCS-yes += common/subpixel.h
VP8_COMMON_SRCS-yes += common/swapyv12buffer.h
VP8_COMMON_SRCS-yes += common/systemdependent.h
VP8_COMMON_SRCS-yes += common/threading.h
VP8_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/filter_x86.c
VP8_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/filter_x86.h
-VP8_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/subpixel_x86.h
-VP8_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/x86_systemdependent.c
VP8_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp8_asm_stubs.c
VP8_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/loopfilter_x86.c
VP8_COMMON_SRCS-$(CONFIG_POSTPROC) += common/postproc.h
endif
# common (c)
-VP8_COMMON_SRCS-$(ARCH_ARM) += common/arm/arm_systemdependent.c
VP8_COMMON_SRCS-$(ARCH_ARM) += common/arm/filter_arm.c
VP8_COMMON_SRCS-$(ARCH_ARM) += common/arm/loopfilter_arm.c
VP8_COMMON_SRCS-$(ARCH_ARM) += common/arm/reconintra_arm.c
-VP8_COMMON_SRCS-$(ARCH_ARM) += common/arm/subpixel_arm.h
VP8_COMMON_SRCS-$(ARCH_ARM) += common/arm/dequantize_arm.c
# common (media)