OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 dst_width, dst_height, | 360 dst_width, dst_height, |
361 libyuv::kFilterBox); | 361 libyuv::kFilterBox); |
362 | 362 |
363 // Merge the UV planes into the destination. | 363 // Merge the UV planes into the destination. |
364 libyuv::MergeUVPlane(dst_u, dst_chroma_width, | 364 libyuv::MergeUVPlane(dst_u, dst_chroma_width, |
365 dst_v, dst_chroma_width, | 365 dst_v, dst_chroma_width, |
366 dst_uv, dst_stride_uv, | 366 dst_uv, dst_stride_uv, |
367 dst_chroma_width, dst_chroma_height); | 367 dst_chroma_width, dst_chroma_height); |
368 } | 368 } |
369 | 369 |
370 NV12ToI420Scaler::NV12ToI420Scaler() = default; | |
371 NV12ToI420Scaler::~NV12ToI420Scaler() = default; | |
372 | |
373 void NV12ToI420Scaler::NV12ToI420Scale( | 370 void NV12ToI420Scaler::NV12ToI420Scale( |
374 const uint8_t* src_y, int src_stride_y, | 371 const uint8_t* src_y, int src_stride_y, |
375 const uint8_t* src_uv, int src_stride_uv, | 372 const uint8_t* src_uv, int src_stride_uv, |
376 int src_width, int src_height, | 373 int src_width, int src_height, |
377 uint8_t* dst_y, int dst_stride_y, | 374 uint8_t* dst_y, int dst_stride_y, |
378 uint8_t* dst_u, int dst_stride_u, | 375 uint8_t* dst_u, int dst_stride_u, |
379 uint8_t* dst_v, int dst_stride_v, | 376 uint8_t* dst_v, int dst_stride_v, |
380 int dst_width, int dst_height) { | 377 int dst_width, int dst_height) { |
381 if (src_width == dst_width && src_height == dst_height) { | 378 if (src_width == dst_width && src_height == dst_height) { |
382 // No scaling. | 379 // No scaling. |
(...skipping 30 matching lines...) Expand all Loading... |
413 src_v, src_uv_width, | 410 src_v, src_uv_width, |
414 src_width, src_height, | 411 src_width, src_height, |
415 dst_y, dst_stride_y, | 412 dst_y, dst_stride_y, |
416 dst_u, dst_stride_u, | 413 dst_u, dst_stride_u, |
417 dst_v, dst_stride_v, | 414 dst_v, dst_stride_v, |
418 dst_width, dst_height, | 415 dst_width, dst_height, |
419 libyuv::kFilterBox); | 416 libyuv::kFilterBox); |
420 } | 417 } |
421 | 418 |
422 } // namespace webrtc | 419 } // namespace webrtc |
OLD | NEW |