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)
commita910049aea5e2be97b232dbdd7700d078eb7ecd0
tree756d6b7f6a9e9af9006a6ecee4ad3a4d3c809627
parent57cc35dd603491a90524c04ef23dfbbef3d1af5a
New RTCD implementation

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]