Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: remoting/codec/video_encoder_vpx.cc

Issue 590363002: Use VPX_IMG_FMT_*/VPX_PLANE_* defines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: VP9E_SET_NOISE Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/sys_info.h" 10 #include "base/sys_info.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 // Request the lowest-CPU usage that VP9 supports, which depends on whether 136 // Request the lowest-CPU usage that VP9 supports, which depends on whether
137 // we are encoding lossy or lossless. 137 // we are encoding lossy or lossless.
138 // Note that this is configured via the same parameter as for VP8. 138 // Note that this is configured via the same parameter as for VP8.
139 int cpu_used = lossless_encode ? 5 : 7; 139 int cpu_used = lossless_encode ? 5 : 7;
140 if (vpx_codec_control(codec.get(), VP8E_SET_CPUUSED, cpu_used)) 140 if (vpx_codec_control(codec.get(), VP8E_SET_CPUUSED, cpu_used))
141 return ScopedVpxCodec(); 141 return ScopedVpxCodec();
142 142
143 // Use the lowest level of noise sensitivity so as to spend less time 143 // Use the lowest level of noise sensitivity so as to spend less time
144 // on motion estimation and inter-prediction mode. 144 // on motion estimation and inter-prediction mode.
145 // Note that this is configured via the same parameter as for VP8. 145 if (vpx_codec_control(codec.get(), VP9E_SET_NOISE_SENSITIVITY, 0))
146 if (vpx_codec_control(codec.get(), VP8E_SET_NOISE_SENSITIVITY, 0))
147 return ScopedVpxCodec(); 146 return ScopedVpxCodec();
148 147
149 return codec.Pass(); 148 return codec.Pass();
150 } 149 }
151 150
152 void CreateImage(bool use_i444, 151 void CreateImage(bool use_i444,
153 const webrtc::DesktopSize& size, 152 const webrtc::DesktopSize& size,
154 scoped_ptr<vpx_image_t>* out_image, 153 scoped_ptr<vpx_image_t>* out_image,
155 scoped_ptr<uint8[]>* out_image_buffer) { 154 scoped_ptr<uint8[]>* out_image_buffer) {
156 DCHECK(!size.is_empty()); 155 DCHECK(!size.is_empty());
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 uint8* map = active_map_.get() + top * active_map_width_; 444 uint8* map = active_map_.get() + top * active_map_width_;
446 for (int y = top; y <= bottom; ++y) { 445 for (int y = top; y <= bottom; ++y) {
447 for (int x = left; x <= right; ++x) 446 for (int x = left; x <= right; ++x)
448 map[x] = 1; 447 map[x] = 1;
449 map += active_map_width_; 448 map += active_map_width_;
450 } 449 }
451 } 450 }
452 } 451 }
453 452
454 } // namespace remoting 453 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698