From a910049aea5e2be97b232dbdd7700d078eb7ecd0 Mon Sep 17 00:00:00 2001 From: John Koleszar Date: Fri, 19 Aug 2011 14:06:00 -0400 Subject: 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 --- vp8/decoder/onyxd_if.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vp8/decoder/onyxd_if.c') diff --git a/vp8/decoder/onyxd_if.c b/vp8/decoder/onyxd_if.c index 13be34f94..6a20e5146 100644 --- a/vp8/decoder/onyxd_if.c +++ b/vp8/decoder/onyxd_if.c @@ -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; -- cgit v1.2.3