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_encoder_vpx.h" | 5 #include "remoting/codec/video_encoder_vpx.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/sys_info.h" | 11 #include "base/sys_info.h" |
12 #include "remoting/base/util.h" | 12 #include "remoting/base/util.h" |
13 #include "remoting/proto/video.pb.h" | 13 #include "remoting/proto/video.pb.h" |
14 #include "third_party/libyuv/include/libyuv/convert_from_argb.h" | 14 #include "third_party/libyuv/include/libyuv/convert_from_argb.h" |
15 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 15 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
16 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" | 16 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
17 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" | 17 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" |
18 | 18 |
19 extern "C" { | 19 extern "C" { |
20 #define VPX_CODEC_DISABLE_COMPAT 1 | 20 #define VPX_CODEC_DISABLE_COMPAT 1 |
21 #include "third_party/libvpx_new/source/libvpx/vpx/vp8cx.h" | 21 #include "third_party/libvpx/source/libvpx/vpx/vp8cx.h" |
22 #include "third_party/libvpx_new/source/libvpx/vpx/vpx_encoder.h" | 22 #include "third_party/libvpx/source/libvpx/vpx/vpx_encoder.h" |
23 } | 23 } |
24 | 24 |
25 namespace remoting { | 25 namespace remoting { |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 // Number of bytes in an RGBx pixel. | 29 // Number of bytes in an RGBx pixel. |
30 const int kBytesPerRgbPixel = 4; | 30 const int kBytesPerRgbPixel = 4; |
31 | 31 |
32 // Defines the dimension of a macro block. This is used to compute the active | 32 // Defines the dimension of a macro block. This is used to compute the active |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 kMacroBlockSize * (y + 1))); | 541 kMacroBlockSize * (y + 1))); |
542 } | 542 } |
543 x0 = x1 + 1; | 543 x0 = x1 + 1; |
544 } | 544 } |
545 } | 545 } |
546 updated_region->IntersectWith( | 546 updated_region->IntersectWith( |
547 webrtc::DesktopRect::MakeWH(image_->w, image_->h)); | 547 webrtc::DesktopRect::MakeWH(image_->w, image_->h)); |
548 } | 548 } |
549 | 549 |
550 } // namespace remoting | 550 } // namespace remoting |
OLD | NEW |