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

Side by Side Diff: remoting/base/decoder_vp8.cc

Issue 9138050: Merge 117748 - Linear sub-rectangle scaler for use in Chromoting. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/963/src/
Patch Set: Created 8 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « media/tools/scaler_bench/scaler_bench.cc ('k') | remoting/base/util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/base/decoder_vp8.h" 5 #include "remoting/base/decoder_vp8.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 "media/base/media.h" 10 #include "media/base/media.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 output_rects->reserve(input_rects.size()); 223 output_rects->reserve(input_rects.size());
224 224
225 for (size_t i = 0; i < input_rects.size(); ++i) { 225 for (size_t i = 0; i < input_rects.size(); ++i) {
226 // Determine the scaled area affected by this rectangle changing. 226 // Determine the scaled area affected by this rectangle changing.
227 SkIRect output_rect = ScaleRect(input_rects[i], 227 SkIRect output_rect = ScaleRect(input_rects[i],
228 horizontal_scale_ratio_, 228 horizontal_scale_ratio_,
229 vertical_scale_ratio_); 229 vertical_scale_ratio_);
230 if (!output_rect.intersect(clip_rect)) 230 if (!output_rect.intersect(clip_rect))
231 continue; 231 continue;
232 232
233 // The scaler will not read outside the input dimensions. 233 // The scaler will not to read outside the input dimensions.
234 ScaleYUVToRGB32WithRect(last_image_->planes[0], 234 media::ScaleYUVToRGB32WithRect(last_image_->planes[0],
235 last_image_->planes[1], 235 last_image_->planes[1],
236 last_image_->planes[2], 236 last_image_->planes[2],
237 output_rgb_buf, 237 output_rgb_buf,
238 input_rects[i], 238 image_size.width(),
239 output_rect, 239 image_size.height(),
240 last_image_->stride[0], 240 output_size_.width(),
241 last_image_->stride[1], 241 output_size_.height(),
242 output_stride); 242 output_rect.x(),
243 output_rect.y(),
244 output_rect.right(),
245 output_rect.bottom(),
246 last_image_->stride[0],
247 last_image_->stride[1],
248 output_stride);
243 output_rects->push_back(output_rect); 249 output_rects->push_back(output_rect);
244 } 250 }
245 } 251 }
246 252
247 } // namespace remoting 253 } // namespace remoting
OLDNEW
« no previous file with comments | « media/tools/scaler_bench/scaler_bench.cc ('k') | remoting/base/util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698