]> granicus.if.org Git - libvpx/commitdiff
New RTCD implementation
authorJohn Koleszar <jkoleszar@google.com>
Fri, 19 Aug 2011 18:06:00 +0000 (14:06 -0400)
committerJohn Koleszar <jkoleszar@google.com>
Mon, 30 Jan 2012 20:06:27 +0000 (12:06 -0800)
This is a proof of concept RTCD implementation to replace the current
system of nested includes, prototypes, INVOKE macros, etc. Currently
only the decoder specific functions are implemented in the new system.
Additional functions will be added in subsequent commits.

Overview:
  RTCD "functions" are implemented as either a global function pointer
  or a macro (when only one eligible specialization available).
  Functions which have RTCD specializations are listed using a simple
  DSL identifying the function's base name, its prototype, and the
  architecture extensions that specializations are available for.

Advantages over the old system:
  - No INVOKE macros. A call to an RTCD function looks like an ordinary
    function call.
  - No need to pass vtables around.
  - If there is only one eligible function to call, the function is
    called directly, rather than indirecting through a function pointer.
  - Supports the notion of "required" extensions, so in combination with
    the above, on x86_64 if the best function available is sse2 or lower
    it will be called directly, since all x86_64 platforms implement
    sse2.
  - Elides all references to functions which will never be called, which
    could reduce binary size. For example if sse2 is required and there
    are both mmx and sse2 implementations of a certain function, the
    code will have no link time references to the mmx code.
  - Significantly easier to add a new function, just one file to edit.

Disadvantages:
  - Requires global writable data (though this is not a new requirement)
  - 1 new generated source file.

Change-Id: Iae6edab65315f79c168485c96872641c5aa09d55

32 files changed:
build/make/configure.sh
build/make/rtcd.sh [new file with mode: 0755]
libs.mk
vp8/common/arm/arm_systemdependent.c
vp8/common/arm/armv6/idct_blk_v6.c
vp8/common/arm/dequantize_arm.c
vp8/common/arm/dequantize_arm.h [deleted file]
vp8/common/arm/neon/idct_blk_neon.c
vp8/common/blockd.h
vp8/common/dequantize.c
vp8/common/dequantize.h [deleted file]
vp8/common/generic/systemdependent.c
vp8/common/idct_blk.c
vp8/common/invtrans.h
vp8/common/onyxc_int.h
vp8/common/rtcd.c [moved from vp8/decoder/x86/x86_dsystemdependent.c with 67% similarity]
vp8/common/rtcd_defs.sh [new file with mode: 0644]
vp8/common/x86/dequantize_x86.h [deleted file]
vp8/common/x86/idct_blk_mmx.c
vp8/common/x86/idct_blk_sse2.c
vp8/common/x86/x86_systemdependent.c
vp8/decoder/arm/arm_dsystemdependent.c [deleted file]
vp8/decoder/decodframe.c
vp8/decoder/generic/dsystemdependent.c [deleted file]
vp8/decoder/onyxd_if.c
vp8/decoder/onyxd_int.h
vp8/decoder/threading.c
vp8/encoder/encodeframe.c
vp8/encoder/onyx_if.c
vp8/vp8_common.mk
vp8/vp8dx.mk
vp8/vp8dx_arm.mk [deleted file]

index 799a4397bde909fda6f9163cc73a054c161f2e78..15134ab6a7f3f41ddf6c864a0bf968ceb1d88577 100755 (executable)
@@ -391,6 +391,7 @@ LDFLAGS = ${LDFLAGS}
 ASFLAGS = ${ASFLAGS}
 extralibs = ${extralibs}
 AS_SFX    = ${AS_SFX:-.asm}
+RTCD_OPTIONS = ${RTCD_OPTIONS}
 EOF
 
     if enabled rvct; then cat >> $1 << EOF
@@ -454,9 +455,22 @@ process_common_cmdline() {
         ;;
         --enable-?*|--disable-?*)
         eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
-        echo "${CMDLINE_SELECT} ${ARCH_EXT_LIST}" | grep "^ *$option\$" >/dev/null || die_unknown $opt
+        if echo "${ARCH_EXT_LIST}" | grep "^ *$option\$" >/dev/null; then
+            [ $action = "disable" ] && RTCD_OPTIONS="${RTCD_OPTIONS}${opt} "
+        else
+            echo "${CMDLINE_SELECT}" | grep "^ *$option\$" >/dev/null ||
+                die_unknown $opt
+        fi
         $action $option
         ;;
+        --require-?*)
+        eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
+        if echo "${ARCH_EXT_LIST}" none | grep "^ *$option\$" >/dev/null; then
+            RTCD_OPTIONS="${RTCD_OPTIONS}${opt} "
+        else
+            die_unknown $opt
+        fi
+        ;;
         --force-enable-?*|--force-disable-?*)
         eval `echo "$opt" | sed 's/--force-/action=/;s/-/ option=/;s/-/_/g'`
         $action $option
diff --git a/build/make/rtcd.sh b/build/make/rtcd.sh
new file mode 100755 (executable)
index 0000000..a5f1e6d
--- /dev/null
@@ -0,0 +1,330 @@
+#!/bin/sh
+self=$0
+
+usage() {
+  cat <<EOF >&2
+Usage: $self [options] FILE
+
+Reads the Run Time CPU Detections definitions from FILE and generates a
+C header file on stdout.
+
+Options:
+  --arch=ARCH   Architecture to generate defs for (required)
+  --disable-EXT Disable support for EXT extensions
+  --require-EXT Require support for EXT extensions
+  --sym=SYMBOL  Unique symbol to use for RTCD initialization function
+  --config=FILE File with CONFIG_FOO=yes lines to parse
+EOF
+  exit 1
+}
+
+die() {
+  echo "$@" >&2
+  exit 1
+}
+
+die_argument_required() {
+  die "Option $opt requires argument"
+}
+
+for opt; do
+  optval="${opt#*=}"
+  case "$opt" in
+    --arch) die_argument_required;;
+    --arch=*) arch=${optval};;
+    --disable-*) eval "disable_${opt#--disable-}=true";;
+    --require-*) REQUIRES="${REQUIRES}${opt#--require-} ";;
+    --sym) die_argument_required;;
+    --sym=*) symbol=${optval};;
+    --config=*) config_file=${optval};;
+    -h|--help)
+      usage
+      ;;
+    -*)
+      die "Unrecognized option: ${opt%%=*}"
+      ;;
+    *)
+      defs_file="$defs_file $opt"
+      ;;
+  esac
+  shift
+done
+for f in $defs_file; do [ -f "$f" ] || usage; done
+[ -n "$arch" ] || usage
+
+# Import the configuration
+[ -f "$config_file" ] && eval $(grep CONFIG_ "$config_file")
+
+#
+# Routines for the RTCD DSL to call
+#
+prototype() {
+  local rtyp
+  case "$1" in
+    unsigned) rtyp="$1 "; shift;;
+  esac
+  rtyp="${rtyp}$1"
+  local fn="$2"
+  local args="$3"
+
+  eval "${2}_rtyp='$rtyp'"
+  eval "${2}_args='$3'"
+  ALL_FUNCS="$ALL_FUNCS $fn"
+  specialize $fn c
+}
+
+specialize() {
+  local fn="$1"
+  shift
+  for opt in "$@"; do
+    eval "${fn}_${opt}=${fn}_${opt}"
+  done
+}
+
+require() {
+  for fn in $ALL_FUNCS; do
+    for opt in "$@"; do
+      local ofn=$(eval "echo \$${fn}_${opt}")
+      [ -z "$ofn" ] && continue
+
+      # if we already have a default, then we can disable it, as we know
+      # we can do better.
+      local best=$(eval "echo \$${fn}_default")
+      local best_ofn=$(eval "echo \$${best}")
+      [ -n "$best" ] && [ "$best_ofn" != "$ofn" ] && eval "${best}_link=false"
+      eval "${fn}_default=${fn}_${opt}"
+      eval "${fn}_${opt}_link=true"
+    done
+  done
+}
+
+forward_decls() {
+  ALL_FORWARD_DECLS="$ALL_FORWARD_DECLS $1"
+}
+
+#
+# Include the user's directives
+#
+for f in $defs_file; do
+  . $f
+done
+
+#
+# Process the directives according to the command line
+#
+process_forward_decls() {
+  for fn in $ALL_FORWARD_DECLS; do
+    eval $fn
+  done
+}
+
+determine_indirection() {
+  [ "$CONFIG_RUNTIME_CPU_DETECT" = "yes" ] || require $ALL_ARCHS
+  for fn in $ALL_FUNCS; do
+    local n=""
+    local rtyp="$(eval "echo \$${fn}_rtyp")"
+    local args="$(eval "echo \"\$${fn}_args\"")"
+    local dfn="$(eval "echo \$${fn}_default")"
+    dfn=$(eval "echo \$${dfn}")
+    for opt in "$@"; do
+      local ofn=$(eval "echo \$${fn}_${opt}")
+      [ -z "$ofn" ] && continue
+      local link=$(eval "echo \$${fn}_${opt}_link")
+      [ "$link" = "false" ] && continue
+      n="${n}x"
+    done
+    if [ "$n" = "x" ]; then
+      eval "${fn}_indirect=false"
+    else
+      eval "${fn}_indirect=true"
+    fi
+  done
+}
+
+declare_function_pointers() {
+  for fn in $ALL_FUNCS; do
+    local rtyp="$(eval "echo \$${fn}_rtyp")"
+    local args="$(eval "echo \"\$${fn}_args\"")"
+    local dfn="$(eval "echo \$${fn}_default")"
+    dfn=$(eval "echo \$${dfn}")
+    for opt in "$@"; do
+      local ofn=$(eval "echo \$${fn}_${opt}")
+      [ -z "$ofn" ] && continue
+      echo "$rtyp ${ofn}($args);"
+    done
+    if [ "$(eval "echo \$${fn}_indirect")" = "false" ]; then
+      echo "#define ${fn} ${dfn}"
+    else
+      echo "RTCD_EXTERN $rtyp (*${fn})($args);"
+    fi
+    echo
+  done
+}
+
+set_function_pointers() {
+  for fn in $ALL_FUNCS; do
+    local n=""
+    local rtyp="$(eval "echo \$${fn}_rtyp")"
+    local args="$(eval "echo \"\$${fn}_args\"")"
+    local dfn="$(eval "echo \$${fn}_default")"
+    dfn=$(eval "echo \$${dfn}")
+    if $(eval "echo \$${fn}_indirect"); then
+      echo "    $fn = $dfn;"
+      for opt in "$@"; do
+        local ofn=$(eval "echo \$${fn}_${opt}")
+        [ -z "$ofn" ] && continue
+        [ "$ofn" = "$dfn" ] && continue;
+        local link=$(eval "echo \$${fn}_${opt}_link")
+        [ "$link" = "false" ] && continue
+        local cond="$(eval "echo \$have_${opt}")"
+        echo "    if (${cond}) $fn = $ofn;"
+      done
+    fi
+    echo
+  done
+}
+
+filter() {
+  local filtered
+  for opt in "$@"; do
+    [ -z $(eval "echo \$disable_${opt}") ] && filtered="$filtered $opt"
+  done
+  echo $filtered
+}
+
+#
+# Helper functions for generating the arch specific RTCD files
+#
+common_top() {
+  local outfile_basename=$(basename ${outfile:-rtcd.h})
+  local include_guard=$(echo -n $outfile_basename | tr '[a-z]' '[A-Z]' | tr -c '[A-Z]' _)
+  cat <<EOF
+#ifndef ${include_guard}
+#define ${include_guard}
+
+#ifdef RTCD_C
+#define RTCD_EXTERN
+#else
+#define RTCD_EXTERN extern
+#endif
+
+$(process_forward_decls)
+
+$(declare_function_pointers c $ALL_ARCHS)
+EOF
+}
+
+common_bottom() {
+  cat <<EOF
+#endif
+EOF
+}
+
+x86() {
+  determine_indirection c $ALL_ARCHS
+
+  # Assign the helper variable for each enabled extension
+  for opt in $ALL_ARCHS; do
+    local uc=$(echo -n $opt | tr '[a-z]' '[A-Z]')
+    eval "have_${opt}=\"flags & HAS_${uc}\""
+  done
+
+  cat <<EOF
+$(common_top)
+void ${symbol:-rtcd}(void);
+
+#ifdef RTCD_C
+#include "vpx_ports/x86.h"
+void ${symbol:-rtcd}(void)
+{
+    int flags = x86_simd_caps();
+
+    (void)flags;
+
+$(set_function_pointers c $ALL_ARCHS)
+}
+#endif
+$(common_bottom)
+EOF
+}
+
+arm() {
+  determine_indirection c $ALL_ARCHS
+
+  # Assign the helper variable for each enabled extension
+  for opt in $ALL_ARCHS; do
+    local uc=$(echo -n $opt | tr '[a-z]' '[A-Z]')
+    eval "have_${opt}=\"flags & HAS_${uc}\""
+  done
+
+  cat <<EOF
+$(common_top)
+#include "vpx_config.h"
+
+void ${symbol:-rtcd}(void);
+
+#ifdef RTCD_C
+#include "vpx_ports/arm.h"
+void ${symbol:-rtcd}(void)
+{
+    int flags = arm_cpu_caps();
+
+    (void)flags;
+
+$(set_function_pointers c $ALL_ARCHS)
+}
+#endif
+$(common_bottom)
+EOF
+}
+
+
+unoptimized() {
+  determine_indirection c
+  cat <<EOF
+$(common_top)
+#include "vpx_config.h"
+
+void ${symbol:-rtcd}(void);
+
+#ifdef RTCD_C
+void ${symbol:-rtcd}(void)
+{
+$(set_function_pointers c)
+}
+#endif
+$(common_bottom)
+EOF
+
+}
+#
+# Main Driver
+#
+require c
+case $arch in
+  x86)
+    ALL_ARCHS=$(filter mmx sse sse2 sse3 ssse3 sse4_1)
+    x86
+    ;;
+  x86_64)
+    ALL_ARCHS=$(filter mmx sse sse2 sse3 ssse3 sse4_1)
+    REQUIRES=${REQUIRES:-mmx sse sse2}
+    require $(filter $REQUIRES)
+    x86
+    ;;
+  armv5te)
+    ALL_ARCHS=$(filter edsp)
+    arm
+    ;;
+  armv6)
+    ALL_ARCHS=$(filter edsp media)
+    arm
+    ;;
+  armv7)
+    ALL_ARCHS=$(filter edsp media neon)
+    arm
+    ;;
+  *)
+    unoptimized
+    ;;
+esac
diff --git a/libs.mk b/libs.mk
index 79a1d001d984814502b4eda82944470f0404d0e5..e083a9983b8066015de1f0d8e79b3021deb4f487 100644 (file)
--- a/libs.mk
+++ b/libs.mk
@@ -48,7 +48,6 @@ ifeq ($(CONFIG_VP8_DECODER),yes)
   CODEC_SRCS-yes += $(addprefix $(VP8_PREFIX),$(call enabled,VP8_DX_SRCS))
   CODEC_EXPORTS-yes += $(addprefix $(VP8_PREFIX),$(VP8_DX_EXPORTS))
   CODEC_SRCS-yes += $(VP8_PREFIX)vp8dx.mk vpx/vp8.h vpx/vp8dx.h
-  CODEC_SRCS-$(ARCH_ARM) += $(VP8_PREFIX)vp8dx_arm.mk
   INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8dx.h
   INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP8_PREFIX)/%
   CODEC_DOC_SRCS += vpx/vp8.h vpx/vp8dx.h
@@ -90,6 +89,7 @@ endif
 $(eval $(if $(filter universal%,$(TOOLCHAIN)),LIPO_LIBVPX,BUILD_LIBVPX):=yes)
 
 CODEC_SRCS-$(BUILD_LIBVPX) += build/make/version.sh
+CODEC_SRCS-$(BUILD_LIBVPX) += build/make/rtcd.sh
 CODEC_SRCS-$(BUILD_LIBVPX) += vpx/vpx_integer.h
 CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/asm_offsets.h
 CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/vpx_timer.h
@@ -183,6 +183,7 @@ vpx.vcproj: $(CODEC_SRCS) vpx.def
 PROJECTS-$(BUILD_LIBVPX) += vpx.vcproj
 
 vpx.vcproj: vpx_config.asm
+vpx.vcproj: vpx_rtcd.h
 
 endif
 else
@@ -322,6 +323,18 @@ endif
 $(shell $(SRC_PATH_BARE)/build/make/version.sh "$(SRC_PATH_BARE)" $(BUILD_PFX)vpx_version.h)
 CLEAN-OBJS += $(BUILD_PFX)vpx_version.h
 
+#
+# Rule to generate runtime cpu detection files
+#
+$(OBJS-yes:.o=.d): vpx_rtcd.h
+vpx_rtcd.h: $(sort $(filter %rtcd_defs.sh,$(CODEC_SRCS)))
+       @echo "    [CREATE] $@"
+       $(qexec)$(SRC_PATH_BARE)/build/make/rtcd.sh --arch=$(TGT_ISA) \
+          --sym=vpx_rtcd \
+          --config=$(target)$(if $(FAT_ARCHS),,-$(TOOLCHAIN)).mk \
+          $(RTCD_OPTIONS) $^ > $@
+CLEAN-OBJS += $(BUILD_PFX)vpx_rtcd.h
+
 CODEC_DOC_SRCS += vpx/vpx_codec.h \
                   vpx/vpx_decoder.h \
                   vpx/vpx_encoder.h \
index d16ff2bb26281a63efee8bdb0be5a28bab279d03..43a0b7745419877f47a288cb544580801915895b 100644 (file)
@@ -62,12 +62,6 @@ void vp8_arch_arm_common_init(VP8_COMMON *ctx)
         rtcd->recon.copy8x8     = vp8_copy_mem8x8_v6;
         rtcd->recon.copy8x4     = vp8_copy_mem8x4_v6;
         rtcd->recon.intra4x4_predict = vp8_intra4x4_predict_armv6;
-
-        rtcd->dequant.block               = vp8_dequantize_b_v6;
-        rtcd->dequant.idct_add            = vp8_dequant_idct_add_v6;
-        rtcd->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_v6;
-        rtcd->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_v6;
-
     }
 #endif
 
@@ -102,12 +96,6 @@ void vp8_arch_arm_common_init(VP8_COMMON *ctx)
             vp8_build_intra_predictors_mby_neon;
         rtcd->recon.build_intra_predictors_mby_s =
             vp8_build_intra_predictors_mby_s_neon;
-
-        rtcd->dequant.block               = vp8_dequantize_b_neon;
-        rtcd->dequant.idct_add            = vp8_dequant_idct_add_neon;
-        rtcd->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_neon;
-        rtcd->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_neon;
-
     }
 #endif
 
index 9108929f5ecb5c4246f82ae89ad6e8c6d7309086..578f7668f81a20d6152a63ce79105917a27aa928 100644 (file)
@@ -10,7 +10,6 @@
 
 #include "vpx_config.h"
 #include "vp8/common/idct.h"
-#include "vp8/common/dequantize.h"
 
 
 void vp8_dequant_idct_add_y_block_v6(short *q, short *dq,
index 66a5dce2646f688c3c96f8d2e970fc7f9e704f5d..70e72aa4774535e87b7fc0a516910d9b6cf9e318 100644 (file)
@@ -10,8 +10,7 @@
 
 
 #include "vpx_config.h"
-#include "vp8/common/dequantize.h"
-#include "vp8/common/idct.h"
+#include "vp8/common/blockd.h"
 
 #if HAVE_NEON
 extern void vp8_dequantize_b_loop_neon(short *Q, short *DQC, short *DQ);
diff --git a/vp8/common/arm/dequantize_arm.h b/vp8/common/arm/dequantize_arm.h
deleted file mode 100644 (file)
index e330260..0000000
+++ /dev/null
@@ -1,59 +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.
- */
-
-
-#ifndef DEQUANTIZE_ARM_H
-#define DEQUANTIZE_ARM_H
-
-#if HAVE_MEDIA
-extern prototype_dequant_block(vp8_dequantize_b_v6);
-extern prototype_dequant_idct_add(vp8_dequant_idct_add_v6);
-extern prototype_dequant_idct_add_y_block(vp8_dequant_idct_add_y_block_v6);
-extern prototype_dequant_idct_add_uv_block(vp8_dequant_idct_add_uv_block_v6);
-
-#if !CONFIG_RUNTIME_CPU_DETECT
-#undef  vp8_dequant_block
-#define vp8_dequant_block vp8_dequantize_b_v6
-
-#undef  vp8_dequant_idct_add
-#define vp8_dequant_idct_add vp8_dequant_idct_add_v6
-
-#undef  vp8_dequant_idct_add_y_block
-#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_v6
-
-#undef  vp8_dequant_idct_add_uv_block
-#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_v6
-#endif
-#endif
-
-#if HAVE_NEON
-extern prototype_dequant_block(vp8_dequantize_b_neon);
-extern prototype_dequant_idct_add(vp8_dequant_idct_add_neon);
-extern prototype_dequant_idct_add_y_block(vp8_dequant_idct_add_y_block_neon);
-extern prototype_dequant_idct_add_uv_block(vp8_dequant_idct_add_uv_block_neon);
-
-
-#if !CONFIG_RUNTIME_CPU_DETECT
-#undef  vp8_dequant_block
-#define vp8_dequant_block vp8_dequantize_b_neon
-
-#undef  vp8_dequant_idct_add
-#define vp8_dequant_idct_add vp8_dequant_idct_add_neon
-
-#undef  vp8_dequant_idct_add_y_block
-#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_neon
-
-#undef  vp8_dequant_idct_add_uv_block
-#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_neon
-#endif
-
-#endif
-
-#endif
index cc55843d548aac93275b17d3c78fca1b807e7544..7424b029cf1741035ccaba63698838b2918b8f00 100644 (file)
@@ -10,7 +10,6 @@
 
 #include "vpx_config.h"
 #include "vp8/common/idct.h"
-#include "vp8/common/dequantize.h"
 
 /* place these declarations here because we don't want to maintain them
  * outside of this scope
index b237206e676517d6a7e8fd4ebfd552e31394a0cc..6b58397cd61f2e6fb22cea8e02595d0cfe723f90 100644 (file)
@@ -179,7 +179,7 @@ typedef struct
 } LOWER_RES_INFO;
 #endif
 
-typedef struct
+typedef struct blockd
 {
     short *qcoeff;
     short *dqcoeff;
index 96245162f1ee0f0d7b2b175f235db8879f54ec5b..66425da1fecc27e7c182c4553bb93a4a49985035 100644 (file)
@@ -10,7 +10,8 @@
 
 
 #include "vpx_config.h"
-#include "dequantize.h"
+#include "vpx_rtcd.h"
+#include "vp8/common/blockd.h"
 #include "vp8/common/idct.h"
 #include "vpx_mem/vpx_mem.h"
 
diff --git a/vp8/common/dequantize.h b/vp8/common/dequantize.h
deleted file mode 100644 (file)
index 4293591..0000000
+++ /dev/null
@@ -1,85 +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.
- */
-
-
-#ifndef DEQUANTIZE_H
-#define DEQUANTIZE_H
-#include "vp8/common/blockd.h"
-
-#define prototype_dequant_block(sym) \
-    void sym(BLOCKD *x, short *DQC)
-
-#define prototype_dequant_idct_add(sym) \
-    void sym(short *input, short *dq, \
-             unsigned char *output, \
-             int stride)
-
-#define prototype_dequant_idct_add_y_block(sym) \
-    void sym(short *q, short *dq, \
-             unsigned char *dst, \
-             int stride, char *eobs)
-
-#define prototype_dequant_idct_add_uv_block(sym) \
-    void sym(short *q, short *dq, \
-             unsigned char *dst_u, \
-             unsigned char *dst_v, int stride, char *eobs)
-
-#if ARCH_X86 || ARCH_X86_64
-#include "x86/dequantize_x86.h"
-#endif
-
-#if ARCH_ARM
-#include "arm/dequantize_arm.h"
-#endif
-
-#ifndef vp8_dequant_block
-#define vp8_dequant_block vp8_dequantize_b_c
-#endif
-extern prototype_dequant_block(vp8_dequant_block);
-
-#ifndef vp8_dequant_idct_add
-#define vp8_dequant_idct_add vp8_dequant_idct_add_c
-#endif
-extern prototype_dequant_idct_add(vp8_dequant_idct_add);
-
-#ifndef vp8_dequant_idct_add_y_block
-#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_c
-#endif
-extern prototype_dequant_idct_add_y_block(vp8_dequant_idct_add_y_block);
-
-#ifndef vp8_dequant_idct_add_uv_block
-#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_c
-#endif
-extern prototype_dequant_idct_add_uv_block(vp8_dequant_idct_add_uv_block);
-
-
-typedef prototype_dequant_block((*vp8_dequant_block_fn_t));
-
-typedef prototype_dequant_idct_add((*vp8_dequant_idct_add_fn_t));
-
-typedef prototype_dequant_idct_add_y_block((*vp8_dequant_idct_add_y_block_fn_t));
-
-typedef prototype_dequant_idct_add_uv_block((*vp8_dequant_idct_add_uv_block_fn_t));
-
-typedef struct
-{
-    vp8_dequant_block_fn_t               block;
-    vp8_dequant_idct_add_fn_t            idct_add;
-    vp8_dequant_idct_add_y_block_fn_t    idct_add_y_block;
-    vp8_dequant_idct_add_uv_block_fn_t   idct_add_uv_block;
-} vp8_dequant_rtcd_vtable_t;
-
-#if CONFIG_RUNTIME_CPU_DETECT
-#define DEQUANT_INVOKE(ctx,fn) (ctx)->fn
-#else
-#define DEQUANT_INVOKE(ctx,fn) vp8_dequant_##fn
-#endif
-
-#endif
index 01d76206d961d7b7194526ceaeb34f25a0b21871..05c54fb6070644c94ec6e6adfb182acc58e58dc4 100644 (file)
@@ -10,6 +10,7 @@
 
 
 #include "vpx_config.h"
+#include "vpx_rtcd.h"
 #include "vp8/common/subpixel.h"
 #include "vp8/common/loopfilter.h"
 #include "vp8/common/recon.h"
@@ -70,13 +71,6 @@ void vp8_machine_specific_config(VP8_COMMON *ctx)
     VP8_COMMON_RTCD *rtcd = &ctx->rtcd;
 
 
-    rtcd->dequant.block             = vp8_dequantize_b_c;
-    rtcd->dequant.idct_add          = vp8_dequant_idct_add_c;
-    rtcd->dequant.idct_add_y_block  = vp8_dequant_idct_add_y_block_c;
-    rtcd->dequant.idct_add_uv_block =
-        vp8_dequant_idct_add_uv_block_c;
-
-
     rtcd->idct.idct16       = vp8_short_idct4x4llm_c;
     rtcd->idct.idct1_scalar_add = vp8_dc_only_idct_add_c;
     rtcd->idct.iwalsh1      = vp8_short_inv_walsh4x4_1_c;
@@ -138,4 +132,6 @@ void vp8_machine_specific_config(VP8_COMMON *ctx)
 #if CONFIG_MULTITHREAD
     ctx->processor_core_count = get_cpu_count();
 #endif /* CONFIG_MULTITHREAD */
+
+    vpx_rtcd();
 }
index 249fad4ea27587d08ac8c0d9e2df858a3ed87509..b9c5d321252309085bd3dfe3a610293df53145b0 100644 (file)
@@ -10,7 +10,6 @@
 
 #include "vpx_config.h"
 #include "vp8/common/idct.h"
-#include "dequantize.h"
 
 void vp8_dequant_idct_add_c(short *input, short *dq,
                             unsigned char *dest, int stride);
index f49e2e5773a933cfe6b590043d832ffb4ce7852e..c67132ca557379e5744b64da896651c328a840f5 100644 (file)
@@ -13,6 +13,7 @@
 #define __INC_INVTRANS_H
 
 #include "vpx_config.h"
+#include "vpx_rtcd.h"
 #include "idct.h"
 #include "blockd.h"
 #include "onyxc_int.h"
@@ -55,7 +56,7 @@ static void vp8_inverse_transform_mby(MACROBLOCKD *xd,
 
         DQC = xd->dequant_y1_dc;
     }
-    DEQUANT_INVOKE (&rtcd->dequant, idct_add_y_block)
+    vp8_dequant_idct_add_y_block
                     (xd->qcoeff, DQC,
                      xd->dst.y_buffer,
                      xd->dst.y_stride, xd->eobs);
index f91383de83c303d454a6e693d1dae63603000c30..63022f5e495681c412f328d361b711516f818d78 100644 (file)
@@ -22,7 +22,6 @@
 #if CONFIG_POSTPROC
 #include "postproc.h"
 #endif
-#include "dequantize.h"
 
 /*#ifdef PACKET_TESTING*/
 #include "header.h"
@@ -74,7 +73,6 @@ typedef enum
 typedef struct VP8_COMMON_RTCD
 {
 #if CONFIG_RUNTIME_CPU_DETECT
-    vp8_dequant_rtcd_vtable_t        dequant;
     vp8_idct_rtcd_vtable_t        idct;
     vp8_recon_rtcd_vtable_t       recon;
     vp8_subpix_rtcd_vtable_t      subpix;
similarity index 67%
rename from vp8/decoder/x86/x86_dsystemdependent.c
rename to vp8/common/rtcd.c
index 27bf5ddbd96c18b67e38dd2355b8e30b7d2b8e61..232640dc87a3e5c8be6bf827d1cea794f5f22607 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
+ *  Copyright (c) 2011 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
@@ -7,13 +7,6 @@
  *  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/decoder/onyxd_int.h"
-
-void vp8_arch_x86_decode_init(VP8D_COMP *pbi)
-{
-
-}
+#define RTCD_C
+#include "vpx_rtcd.h"
diff --git a/vp8/common/rtcd_defs.sh b/vp8/common/rtcd_defs.sh
new file mode 100644 (file)
index 0000000..0fb40f7
--- /dev/null
@@ -0,0 +1,22 @@
+common_forward_decls() {
+cat <<EOF
+struct blockd;
+EOF
+}
+forward_decls common_forward_decls
+
+prototype void vp8_dequantize_b "struct blockd*, short *dqc"
+specialize vp8_dequantize_b mmx media neon
+vp8_dequantize_b_media=vp8_dequantize_b_v6
+
+prototype void vp8_dequant_idct_add "short *input, short *dq, unsigned char *output, int stride"
+specialize vp8_dequant_idct_add mmx media neon
+vp8_dequant_idct_add_media=vp8_dequant_idct_add_v6
+
+prototype void vp8_dequant_idct_add_y_block "short *q, short *dq, unsigned char *dst, int stride, char *eobs"
+specialize vp8_dequant_idct_add_y_block mmx sse2 media neon
+vp8_dequant_idct_add_y_block_media=vp8_dequant_idct_add_y_block_v6
+
+prototype void vp8_dequant_idct_add_uv_block "short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs"
+specialize vp8_dequant_idct_add_uv_block mmx sse2 media neon
+vp8_dequant_idct_add_uv_block_media=vp8_dequant_idct_add_uv_block_v6
diff --git a/vp8/common/x86/dequantize_x86.h b/vp8/common/x86/dequantize_x86.h
deleted file mode 100644 (file)
index 49bcb7f..0000000
+++ /dev/null
@@ -1,58 +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.
- */
-
-
-#ifndef DEQUANTIZE_X86_H
-#define DEQUANTIZE_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_dequant_block(vp8_dequantize_b_mmx);
-extern prototype_dequant_idct_add(vp8_dequant_idct_add_mmx);
-extern prototype_dequant_idct_add_y_block(vp8_dequant_idct_add_y_block_mmx);
-extern prototype_dequant_idct_add_uv_block(vp8_dequant_idct_add_uv_block_mmx);
-
-#if !CONFIG_RUNTIME_CPU_DETECT
-#undef  vp8_dequant_block
-#define vp8_dequant_block vp8_dequantize_b_mmx
-
-#undef  vp8_dequant_idct_add
-#define vp8_dequant_idct_add vp8_dequant_idct_add_mmx
-
-#undef vp8_dequant_idct_add_y_block
-#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_mmx
-
-#undef vp8_dequant_idct_add_uv_block
-#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_mmx
-
-#endif
-#endif
-
-#if HAVE_SSE2
-extern prototype_dequant_idct_add_y_block(vp8_dequant_idct_add_y_block_sse2);
-extern prototype_dequant_idct_add_uv_block(vp8_dequant_idct_add_uv_block_sse2);
-
-#if !CONFIG_RUNTIME_CPU_DETECT
-#undef vp8_dequant_idct_add_y_block
-#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_sse2
-
-#undef vp8_dequant_idct_add_uv_block
-#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_sse2
-
-#endif
-#endif
-
-#endif
index 8ff4837083d08af9ad7b894a6ba5c2072bc809b2..d01db5d13d19f15fbefe482a0672475eed07c10d 100644 (file)
@@ -9,8 +9,9 @@
  */
 
 #include "vpx_config.h"
+#include "vpx_rtcd.h"
 #include "vp8/common/idct.h"
-#include "vp8/common/dequantize.h"
+#include "vp8/common/blockd.h"
 
 extern void vp8_dequantize_b_impl_mmx(short *sq, short *dq, short *q);
 
index 44e440c0c5fa7a3a212fb0576ba6fb9afce7a4f8..e8dca8df09aa5c61f274917767b7a7fb0b668bf7 100644 (file)
@@ -10,7 +10,6 @@
 
 #include "vpx_config.h"
 #include "vp8/common/idct.h"
-#include "vp8/common/dequantize.h"
 
 void vp8_idct_dequant_0_2x_sse2
             (short *q, short *dq ,
index e1e1b798778b26f53fd635de64b0e22f1efcbf6e..1aab1b80fa25e14938408b389f411afe89a4b53e 100644 (file)
@@ -36,11 +36,6 @@ void vp8_arch_x86_common_init(VP8_COMMON *ctx)
 
     if (flags & HAS_MMX)
     {
-        rtcd->dequant.block               = vp8_dequantize_b_mmx;
-        rtcd->dequant.idct_add            = vp8_dequant_idct_add_mmx;
-        rtcd->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_mmx;
-        rtcd->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_mmx;
-
         rtcd->idct.idct16       = vp8_short_idct4x4llm_mmx;
         rtcd->idct.idct1_scalar_add = vp8_dc_only_idct_add_mmx;
         rtcd->idct.iwalsh16     = vp8_short_inv_walsh4x4_mmx;
@@ -90,9 +85,6 @@ void vp8_arch_x86_common_init(VP8_COMMON *ctx)
         rtcd->recon.build_intra_predictors_mby_s =
             vp8_build_intra_predictors_mby_s_sse2;
 
-        rtcd->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_sse2;
-        rtcd->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_sse2;
-
         rtcd->idct.iwalsh16     = vp8_short_inv_walsh4x4_sse2;
 
         rtcd->subpix.sixtap16x16   = vp8_sixtap_predict16x16_sse2;
diff --git a/vp8/decoder/arm/arm_dsystemdependent.c b/vp8/decoder/arm/arm_dsystemdependent.c
deleted file mode 100644 (file)
index aeecacb..0000000
+++ /dev/null
@@ -1,39 +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/arm.h"
-#include "vp8/decoder/onyxd_int.h"
-
-void vp8_arch_arm_decode_init(VP8D_COMP *pbi)
-{
-#if CONFIG_RUNTIME_CPU_DETECT
-    int flags = pbi->common.rtcd.flags;
-
-#if HAVE_EDSP
-    if (flags & HAS_EDSP)
-    {
-    }
-#endif
-
-#if HAVE_MEDIA
-    if (flags & HAS_MEDIA)
-    {
-    }
-#endif
-
-#if HAVE_NEON
-    if (flags & HAS_NEON)
-    {
-    }
-#endif
-#endif
-}
index 917aeceb60af929adcdde5ebe8a5b15e4524d687..0de9c4314deb9420c34a62056cdaba512c9465b8 100644 (file)
@@ -9,13 +9,14 @@
  */
 
 
+#include "vpx_config.h"
+#include "vpx_rtcd.h"
 #include "onyxd_int.h"
 #include "vp8/common/header.h"
 #include "vp8/common/reconintra.h"
 #include "vp8/common/reconintra4x4.h"
 #include "vp8/common/recon.h"
 #include "vp8/common/reconinter.h"
-#include "vp8/common/dequantize.h"
 #include "detokenize.h"
 #include "vp8/common/invtrans.h"
 #include "vp8/common/alloccommon.h"
@@ -32,7 +33,6 @@
 #endif
 #include "vpx_mem/vpx_mem.h"
 #include "vp8/common/idct.h"
-
 #include "vp8/common/threading.h"
 #include "decoderthreading.h"
 #include "dboolhuff.h"
@@ -194,7 +194,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
                 {
                     if (xd->eobs[i] > 1)
                     {
-                        DEQUANT_INVOKE(&pbi->common.rtcd.dequant, idct_add)
+                    vp8_dequant_idct_add
                             (b->qcoeff, DQC,
                             *(b->base_dst) + b->dst, b->dst_stride);
                     }
@@ -237,8 +237,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
                 /* do 2nd order transform on the dc block */
                 if (xd->eobs[24] > 1)
                 {
-                    DEQUANT_INVOKE(&pbi->common.rtcd.dequant, block)(b,
-                        xd->dequant_y2);
+                    vp8_dequantize_b(b, xd->dequant_y2);
 
                     IDCT_INVOKE(RTCD_VTABLE(idct), iwalsh16)(&b->dqcoeff[0],
                         xd->qcoeff);
@@ -265,13 +264,13 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
                 DQC = xd->dequant_y1_dc;
             }
 
-            DEQUANT_INVOKE (&pbi->common.rtcd.dequant, idct_add_y_block)
+            vp8_dequant_idct_add_y_block
                             (xd->qcoeff, DQC,
                              xd->dst.y_buffer,
                              xd->dst.y_stride, xd->eobs);
         }
 
-        DEQUANT_INVOKE (&pbi->common.rtcd.dequant, idct_add_uv_block)
+        vp8_dequant_idct_add_uv_block
                         (xd->qcoeff+16*16, xd->dequant_uv,
                          xd->dst.u_buffer, xd->dst.v_buffer,
                          xd->dst.uv_stride, xd->eobs+16);
diff --git a/vp8/decoder/generic/dsystemdependent.c b/vp8/decoder/generic/dsystemdependent.c
deleted file mode 100644 (file)
index 8a84e56..0000000
+++ /dev/null
@@ -1,33 +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 "vp8/common/dequantize.h"
-#include "vp8/decoder/onyxd_int.h"
-
-extern void vp8_arch_x86_decode_init(VP8D_COMP *pbi);
-extern void vp8_arch_arm_decode_init(VP8D_COMP *pbi);
-
-void vp8_dmachine_specific_config(VP8D_COMP *pbi)
-{
-    /* Pure C: */
-#if CONFIG_RUNTIME_CPU_DETECT
-    pbi->mb.rtcd                               = &pbi->common.rtcd;
-#endif
-
-#if ARCH_X86 || ARCH_X86_64
-    vp8_arch_x86_decode_init(pbi);
-#endif
-
-#if ARCH_ARM
-    vp8_arch_arm_decode_init(pbi);
-#endif
-}
index 13be34f940cf2607febeb75a09a286dcadf089e9..6a20e5146945ec49a64f7119d69c610e70b9fa5f 100644 (file)
@@ -76,7 +76,9 @@ struct VP8D_COMP * vp8dx_create_decompressor(VP8D_CONFIG *oxcf)
     vp8dx_initialize();
 
     vp8_create_common(&pbi->common);
-    vp8_dmachine_specific_config(pbi);
+#if CONFIG_RUNTIME_CPU_DETECT
+    pbi->mb.rtcd = &pbi->common.rtcd;
+#endif
 
     pbi->common.current_video_frame = 0;
     pbi->ready_for_new_data = 1;
index cb2593b2c75e60257682f0f3382ca5ddd7c298a8..989f68bf8417a7d25069ab1bc4d6886eb5895fae 100644 (file)
@@ -17,7 +17,6 @@
 #include "vp8/common/onyxc_int.h"
 #include "vp8/common/threading.h"
 
-
 #if CONFIG_ERROR_CONCEALMENT
 #include "ec_types.h"
 #endif
@@ -114,8 +113,6 @@ typedef struct VP8D_COMP
 } VP8D_COMP;
 
 int vp8_decode_frame(VP8D_COMP *cpi);
-void vp8_dmachine_specific_config(VP8D_COMP *pbi);
-
 
 #if CONFIG_DEBUG
 #define CHECK_MEM_ERROR(lval,expr) do {\
index 2ce00f7051a8666ac1839eb3ddc26af254016d9c..23c5da4e029664a0b9afe15083524695d4771398 100644 (file)
@@ -9,6 +9,8 @@
  */
 
 
+#include "vpx_config.h"
+#include "vpx_rtcd.h"
 #if !defined(WIN32) && CONFIG_OS_SUPPORT == 1
 # include <unistd.h>
 #endif
@@ -191,7 +193,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, int mb_row, int m
             {
                 if (xd->eobs[i] > 1)
                 {
-                    DEQUANT_INVOKE(&pbi->common.rtcd.dequant, idct_add)
+                    vp8_dequant_idct_add
                         (b->qcoeff, DQC,
                         *(b->base_dst) + b->dst, b->dst_stride);
                 }
@@ -217,7 +219,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, int mb_row, int m
             /* do 2nd order transform on the dc block */
             if (xd->eobs[24] > 1)
             {
-                DEQUANT_INVOKE(&pbi->common.rtcd.dequant, block)(b, xd->dequant_y2);
+                vp8_dequantize_b(b, xd->dequant_y2);
 
                 IDCT_INVOKE(RTCD_VTABLE(idct), iwalsh16)(&b->dqcoeff[0],
                     xd->qcoeff);
@@ -241,13 +243,13 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, int mb_row, int m
             DQC = xd->dequant_y1_dc;
         }
 
-        DEQUANT_INVOKE (&pbi->common.rtcd.dequant, idct_add_y_block)
+        vp8_dequant_idct_add_y_block
                         (xd->qcoeff, DQC,
                          xd->dst.y_buffer,
                          xd->dst.y_stride, xd->eobs);
     }
 
-    DEQUANT_INVOKE (&pbi->common.rtcd.dequant, idct_add_uv_block)
+    vp8_dequant_idct_add_uv_block
                     (xd->qcoeff+16*16, xd->dequant_uv,
                      xd->dst.u_buffer, xd->dst.v_buffer,
                      xd->dst.uv_stride, xd->eobs+16);
index b5c5c7445b52c4777d5441b8911b982c0725b5b4..da24723252294c0a5087e5a7405988c62f1ab85f 100644 (file)
@@ -1119,7 +1119,7 @@ int vp8cx_encode_intra_macro_block(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t,
     if (xd->mode_info_context->mbmi.mode != B_PRED)
         vp8_inverse_transform_mby(xd, IF_RTCD(&cpi->common.rtcd));
 
-    DEQUANT_INVOKE (&cpi->common.rtcd.dequant, idct_add_uv_block)
+    vp8_dequant_idct_add_uv_block
                     (xd->qcoeff+16*16, xd->dequant_uv,
                      xd->dst.u_buffer, xd->dst.v_buffer,
                      xd->dst.uv_stride, xd->eobs+16);
@@ -1304,7 +1304,7 @@ int vp8cx_encode_inter_macroblock
         if (xd->mode_info_context->mbmi.mode != B_PRED)
             vp8_inverse_transform_mby(xd, IF_RTCD(&cpi->common.rtcd));
 
-        DEQUANT_INVOKE (&cpi->common.rtcd.dequant, idct_add_uv_block)
+        vp8_dequant_idct_add_uv_block
                         (xd->qcoeff+16*16, xd->dequant_uv,
                          xd->dst.u_buffer, xd->dst.v_buffer,
                          xd->dst.uv_stride, xd->eobs+16);
index 9dcf71dfcf360ac34f7a2c4afc4de634b9f48741..95f7cfe29940ba98b736ffdd4e0d04aaf6bf7f56 100644 (file)
@@ -55,7 +55,6 @@ extern void vp8cx_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi);
 extern void vp8cx_set_alt_lf_level(VP8_COMP *cpi, int filt_val);
 extern void vp8cx_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi);
 
-extern void vp8_dmachine_specific_config(VP8_COMP *cpi);
 extern void vp8_cmachine_specific_config(VP8_COMP *cpi);
 extern void vp8_deblock_frame(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *post, int filt_lvl, int low_var_thresh, int flag);
 extern void print_parms(VP8_CONFIG *ocf, char *filenam);
@@ -230,7 +229,6 @@ void vp8_initialize()
     {
         vp8_scale_machine_specific_config();
         vp8_initialize_common();
-        //vp8_dmachine_specific_config();
         vp8_tokenize_initialize();
 
         init_done = 1;
index e32fc691764da189d38bdfb49d240c6be04c7e26..b0f45f2b04fe543b574d824551c2f84bca5105ff 100644 (file)
@@ -20,7 +20,6 @@ VP8_COMMON_SRCS-yes += common/coefupdateprobs.h
 VP8_COMMON_SRCS-yes += common/debugmodes.c
 VP8_COMMON_SRCS-yes += common/default_coef_probs.h
 VP8_COMMON_SRCS-yes += common/dequantize.c
-VP8_COMMON_SRCS-yes += common/dequantize.h
 VP8_COMMON_SRCS-yes += common/entropy.c
 VP8_COMMON_SRCS-yes += common/entropymode.c
 VP8_COMMON_SRCS-yes += common/entropymv.c
@@ -51,6 +50,8 @@ VP8_COMMON_SRCS-yes += common/recon.h
 VP8_COMMON_SRCS-yes += common/reconinter.h
 VP8_COMMON_SRCS-yes += common/reconintra.h
 VP8_COMMON_SRCS-yes += common/reconintra4x4.h
+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
@@ -74,7 +75,6 @@ VP8_COMMON_SRCS-yes += common/swapyv12buffer.c
 VP8_COMMON_SRCS-$(CONFIG_POSTPROC_VISUALIZER) += common/textblit.c
 VP8_COMMON_SRCS-yes += common/treecoder.c
 
-VP8_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/dequantize_x86.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/idct_x86.h
@@ -120,7 +120,6 @@ VP8_COMMON_SRCS-$(ARCH_ARM)  += common/arm/recon_arm.h
 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
-VP8_COMMON_SRCS-$(ARCH_ARM)  += common/arm/dequantize_arm.h
 
 # common (media)
 VP8_COMMON_SRCS-$(HAVE_MEDIA)  += common/arm/bilinearfilter_arm.c
index d6dc15305d36b9b09697b057365a4f1be07ec25e..ce307b6d0f84c3a1b5c89d62b6d4b6be8505cd72 100644 (file)
@@ -18,10 +18,6 @@ VP8_DX_SRCS-no  += $(VP8_COMMON_SRCS-no)
 VP8_DX_SRCS_REMOVE-yes += $(VP8_COMMON_SRCS_REMOVE-yes)
 VP8_DX_SRCS_REMOVE-no  += $(VP8_COMMON_SRCS_REMOVE-no)
 
-ifeq ($(ARCH_ARM),yes)
-  include $(SRC_PATH_BARE)/$(VP8_PREFIX)vp8dx_arm.mk
-endif
-
 VP8_DX_SRCS-yes += vp8_dx_iface.c
 
 # common
@@ -56,7 +52,6 @@ VP8_DX_SRCS-yes += decoder/detokenize.c
 VP8_DX_SRCS-$(CONFIG_ERROR_CONCEALMENT) += decoder/ec_types.h
 VP8_DX_SRCS-$(CONFIG_ERROR_CONCEALMENT) += decoder/error_concealment.h
 VP8_DX_SRCS-$(CONFIG_ERROR_CONCEALMENT) += decoder/error_concealment.c
-VP8_DX_SRCS-yes += decoder/generic/dsystemdependent.c
 VP8_DX_SRCS-yes += decoder/dboolhuff.h
 VP8_DX_SRCS-yes += decoder/decodemv.h
 VP8_DX_SRCS-yes += decoder/decoderthreading.h
@@ -69,5 +64,3 @@ VP8_DX_SRCS-$(CONFIG_MULTITHREAD) += decoder/reconintra_mt.h
 VP8_DX_SRCS-$(CONFIG_MULTITHREAD) += decoder/reconintra_mt.c
 
 VP8_DX_SRCS-yes := $(filter-out $(VP8_DX_SRCS_REMOVE-yes),$(VP8_DX_SRCS-yes))
-
-VP8_DX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += decoder/x86/x86_dsystemdependent.c
diff --git a/vp8/vp8dx_arm.mk b/vp8/vp8dx_arm.mk
deleted file mode 100644 (file)
index fa1aaea..0000000
+++ /dev/null
@@ -1,14 +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.
-##
-
-
-#VP8_DX_SRCS list is modified according to different platforms.
-
-VP8_DX_SRCS-$(ARCH_ARM)  += decoder/arm/arm_dsystemdependent.c