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

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

Issue 978133002: Revert of Use tiles when encoding with VP9. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 // Use the lowest level of noise sensitivity so as to spend less time 127 // Use the lowest level of noise sensitivity so as to spend less time
128 // on motion estimation and inter-prediction mode. 128 // on motion estimation and inter-prediction mode.
129 ret = vpx_codec_control(codec, VP9E_SET_NOISE_SENSITIVITY, 0); 129 ret = vpx_codec_control(codec, VP9E_SET_NOISE_SENSITIVITY, 0);
130 DCHECK_EQ(VPX_CODEC_OK, ret) << "Failed to set noise sensitivity"; 130 DCHECK_EQ(VPX_CODEC_OK, ret) << "Failed to set noise sensitivity";
131 131
132 // Configure the codec to tune it for screen media. 132 // Configure the codec to tune it for screen media.
133 ret = vpx_codec_control( 133 ret = vpx_codec_control(
134 codec, VP9E_SET_TUNE_CONTENT, VP9E_CONTENT_SCREEN); 134 codec, VP9E_SET_TUNE_CONTENT, VP9E_CONTENT_SCREEN);
135 DCHECK_EQ(VPX_CODEC_OK, ret) << "Failed to set screen content mode"; 135 DCHECK_EQ(VPX_CODEC_OK, ret) << "Failed to set screen content mode";
136
137 // VP9 tiles allow for parallelism on both encode and decode
138 ret = vpx_codec_control(codec, VP9E_SET_TILE_COLUMNS, 1);
139 DCHECK_EQ(VPX_CODEC_OK, ret) << "Failed to set tile columns";
140 } 136 }
141 137
142 void CreateImage(bool use_i444, 138 void CreateImage(bool use_i444,
143 const webrtc::DesktopSize& size, 139 const webrtc::DesktopSize& size,
144 scoped_ptr<vpx_image_t>* out_image, 140 scoped_ptr<vpx_image_t>* out_image,
145 scoped_ptr<uint8[]>* out_image_buffer) { 141 scoped_ptr<uint8[]>* out_image_buffer) {
146 DCHECK(!size.is_empty()); 142 DCHECK(!size.is_empty());
147 143
148 scoped_ptr<vpx_image_t> image(new vpx_image_t()); 144 scoped_ptr<vpx_image_t> image(new vpx_image_t());
149 memset(image.get(), 0, sizeof(vpx_image_t)); 145 memset(image.get(), 0, sizeof(vpx_image_t));
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 uint8* map = active_map_.get() + top * active_map_width_; 473 uint8* map = active_map_.get() + top * active_map_width_;
478 for (int y = top; y <= bottom; ++y) { 474 for (int y = top; y <= bottom; ++y) {
479 for (int x = left; x <= right; ++x) 475 for (int x = left; x <= right; ++x)
480 map[x] = 1; 476 map[x] = 1;
481 map += active_map_width_; 477 map += active_map_width_;
482 } 478 }
483 } 479 }
484 } 480 }
485 481
486 } // namespace remoting 482 } // 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