summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-22 13:51:33 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-22 13:51:33 +0000
commit986a40a7d57589c7e8db787751fbf822e3a6f0db (patch)
treef2ca5dc0049233be4de99b245dd922654ebd1446 /tools
parent8339da46719b5876723b1182b5ca60e9e07c2d81 (diff)
downloadchromium_src-986a40a7d57589c7e8db787751fbf822e3a6f0db.zip
chromium_src-986a40a7d57589c7e8db787751fbf822e3a6f0db.tar.gz
chromium_src-986a40a7d57589c7e8db787751fbf822e3a6f0db.tar.bz2
Speed up encoding by using active map
Using active map can greatly reduce the amount of macro blocks need to be encoded by vp8. This brings average encoding time from 35ms per frame to about 8ms on the tested system. However this change depends on an updated version of libvpx. BUG=None TEST=chromoting still works & no visual problems Review URL: http://codereview.chromium.org/6518011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75586 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-xtools/generate_stubs/generate_stubs.py19
1 files changed, 16 insertions, 3 deletions
diff --git a/tools/generate_stubs/generate_stubs.py b/tools/generate_stubs/generate_stubs.py
index 97c8106..d8fac2d 100755
--- a/tools/generate_stubs/generate_stubs.py
+++ b/tools/generate_stubs/generate_stubs.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
#
-# Copyright (c) 2010 The Chromium Authors. All rights reserved.
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -15,6 +15,19 @@ found via dlsym.
This script takes a set of files, where each file is a list of C-style
signatures (one signature per line). The output is either a windows def file,
or a header + implementation file of stubs suitable for use in a posix system.
+
+This script also handles varidiac functions, e.g.
+void printf(const char* s, ...);
+
+TODO(hclam): Fix the situation for varidiac functions.
+Stub for the above function will be generated and inside the stub function it
+is translated to:
+void printf(const char* s, ...) {
+ printf_ptr(s, (void*)arg1);
+}
+
+Only one argument from the varidiac arguments is used and it will be used as
+type void*.
"""
__author__ = 'ajwong@chromium.org (Albert J. Wong)'
@@ -96,7 +109,7 @@ VARIADIC_STUB_FUNCTION_DEFINITION = (
%(return_type)s %(name)s(%(params)s) {
va_list args___;
va_start(args___, %(last_named_arg)s);
- %(return_type)s ret___ = %(name)s_ptr(%(arg_list)s, args___);
+ %(return_type)s ret___ = %(name)s_ptr(%(arg_list)s, va_arg(args___, void*));
va_end(args___);
return ret___;
}""")
@@ -116,7 +129,7 @@ VOID_VARIADIC_STUB_FUNCTION_DEFINITION = (
void %(name)s(%(params)s) {
va_list args___;
va_start(args___, %(last_named_arg)s);
- %(name)s_ptr(%(arg_list)s, args___);
+ %(name)s_ptr(%(arg_list)s, va_arg(args___, void*));
va_end(args___);
}""")