| 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  334                           ref_frame->video_frame_buffer()->DataV(), |  334                           ref_frame->video_frame_buffer()->DataV(), | 
|  335                           ref_frame->video_frame_buffer()->StrideV(), |  335                           ref_frame->video_frame_buffer()->StrideV(), | 
|  336                           test_frame->video_frame_buffer()->DataY(), |  336                           test_frame->video_frame_buffer()->DataY(), | 
|  337                           test_frame->video_frame_buffer()->StrideY(), |  337                           test_frame->video_frame_buffer()->StrideY(), | 
|  338                           test_frame->video_frame_buffer()->DataU(), |  338                           test_frame->video_frame_buffer()->DataU(), | 
|  339                           test_frame->video_frame_buffer()->StrideU(), |  339                           test_frame->video_frame_buffer()->StrideU(), | 
|  340                           test_frame->video_frame_buffer()->DataV(), |  340                           test_frame->video_frame_buffer()->DataV(), | 
|  341                           test_frame->video_frame_buffer()->StrideV(), |  341                           test_frame->video_frame_buffer()->StrideV(), | 
|  342                           test_frame->width(), test_frame->height()); |  342                           test_frame->width(), test_frame->height()); | 
|  343 } |  343 } | 
|  344  |  | 
|  345 void NV12ToI420Scale(uint8_t* tmp_data, |  | 
|  346                      const uint8_t* src_y, int src_stride_y, |  | 
|  347                      const uint8_t* src_uv, int src_stride_uv, |  | 
|  348                      int src_width, int src_height, |  | 
|  349                      uint8_t* dst_y, int dst_stride_y, |  | 
|  350                      uint8_t* dst_u, int dst_stride_u, |  | 
|  351                      uint8_t* dst_v, int dst_stride_v, |  | 
|  352                      int dst_width, int dst_height) { |  | 
|  353   // Split source UV plane into separate U and V plane using the temporary data. |  | 
|  354   const int src_uv_width = (src_width + 1) / 2; |  | 
|  355   const int src_uv_height = (src_height + 1) / 2; |  | 
|  356   uint8_t* const src_u = tmp_data; |  | 
|  357   uint8_t* const src_v = tmp_data + src_uv_width * src_uv_height; |  | 
|  358   libyuv::SplitUVPlane(src_uv, src_stride_uv, |  | 
|  359                        src_u, src_uv_width, |  | 
|  360                        src_v, src_uv_width, |  | 
|  361                        src_uv_width, src_uv_height); |  | 
|  362   // Scale the planes into the destination. |  | 
|  363   libyuv::I420Scale(src_y, src_stride_y, |  | 
|  364                     src_u, src_uv_width, |  | 
|  365                     src_v, src_uv_width, |  | 
|  366                     src_width, src_height, |  | 
|  367                     dst_y, dst_stride_y, |  | 
|  368                     dst_u, dst_stride_u, |  | 
|  369                     dst_v, dst_stride_v, |  | 
|  370                     dst_width, dst_height, |  | 
|  371                     libyuv::kFilterBox); |  | 
|  372 } |  | 
|  373  |  | 
|  374 }  // namespace webrtc |  344 }  // namespace webrtc | 
| OLD | NEW |