Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/codec/video_decoder_vpx.h" | 5 #include "remoting/codec/video_decoder_vpx.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "remoting/base/util.h" | 10 #include "remoting/base/util.h" |
| 11 #include "remoting/proto/video.pb.h" | 11 #include "remoting/proto/video.pb.h" |
| 12 #include "third_party/libyuv/include/libyuv/convert_argb.h" | 12 #include "third_party/libyuv/include/libyuv/convert_argb.h" |
| 13 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 13 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
| 14 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" | 14 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
| 15 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" | 15 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" |
| 16 | 16 |
| 17 extern "C" { | 17 extern "C" { |
| 18 #define VPX_CODEC_DISABLE_COMPAT 1 | 18 #define VPX_CODEC_DISABLE_COMPAT 1 |
| 19 #include "third_party/libvpx/source/libvpx/vpx/vpx_decoder.h" | 19 #include "third_party/libvpx_new/source/libvpx/vpx/vpx_decoder.h" |
| 20 #include "third_party/libvpx/source/libvpx/vpx/vp8dx.h" | 20 #include "third_party/libvpx_new/source/libvpx/vpx/vp8dx.h" |
|
Johann
2015/09/17 16:32:18
presubmit would like vp8 before vpx
| |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace remoting { | 23 namespace remoting { |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 void RenderRect(vpx_image_t* image, | 27 void RenderRect(vpx_image_t* image, |
| 28 webrtc::DesktopRect rect, | 28 webrtc::DesktopRect rect, |
| 29 webrtc::DesktopFrame* frame) { | 29 webrtc::DesktopFrame* frame) { |
| 30 switch (image->fmt) { | 30 switch (image->fmt) { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 | 144 |
| 145 vpx_codec_dec_cfg config; | 145 vpx_codec_dec_cfg config; |
| 146 config.w = 0; | 146 config.w = 0; |
| 147 config.h = 0; | 147 config.h = 0; |
| 148 config.threads = 2; | 148 config.threads = 2; |
| 149 vpx_codec_err_t ret = vpx_codec_dec_init(codec_.get(), codec, &config, 0); | 149 vpx_codec_err_t ret = vpx_codec_dec_init(codec_.get(), codec, &config, 0); |
| 150 CHECK_EQ(VPX_CODEC_OK, ret); | 150 CHECK_EQ(VPX_CODEC_OK, ret); |
| 151 } | 151 } |
| 152 | 152 |
| 153 } // namespace remoting | 153 } // namespace remoting |
| OLD | NEW |