diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-28 00:23:35 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-28 00:23:35 +0000 |
commit | e4695f7bd6821bf4156863087e2acdd3e84befd2 (patch) | |
tree | 12a609eeb64ef57851f95ff2045f33087b72c748 /remoting | |
parent | bf756cbbcf91a32250df042d7c557135308a7e55 (diff) | |
download | chromium_src-e4695f7bd6821bf4156863087e2acdd3e84befd2.zip chromium_src-e4695f7bd6821bf4156863087e2acdd3e84befd2.tar.gz chromium_src-e4695f7bd6821bf4156863087e2acdd3e84befd2.tar.bz2 |
Use 2 threads for decoding for remoting
Make thing faster on machines with more than 1 core.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/7088002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87118 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/base/decoder_vp8.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/remoting/base/decoder_vp8.cc b/remoting/base/decoder_vp8.cc index 615c453..c0c798a 100644 --- a/remoting/base/decoder_vp8.cc +++ b/remoting/base/decoder_vp8.cc @@ -47,9 +47,16 @@ Decoder::DecodeResult DecoderVp8::DecodePacket(const VideoPacket* packet) { // Initialize the codec as needed. if (!codec_) { codec_ = new vpx_codec_ctx_t(); + + // TODO(hclam): Scale the number of threads with number of cores of the + // machine. + vpx_codec_dec_cfg config; + config.w = 0; + config.h = 0; + config.threads = 2; vpx_codec_err_t ret = vpx_codec_dec_init( - codec_, vpx_codec_vp8_dx(), NULL, 0); + codec_, vpx_codec_vp8_dx(), &config, 0); if (ret != VPX_CODEC_OK) { LOG(INFO) << "Cannot initialize codec."; delete codec_; |