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

Side by Side Diff: source/planar_functions.cc

Issue 1506973002: Bug fix for UYVYToNV12 odd height (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: Created 5 years 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 /* 1 /*
2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. 2 * Copyright 2011 The LibYuv 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 2499 matching lines...) Expand 10 before | Expand all | Expand 10 after
2510 SplitUVRow(src_yuy2, dst_y, rows, awidth); 2510 SplitUVRow(src_yuy2, dst_y, rows, awidth);
2511 SplitUVRow(src_yuy2 + src_stride_yuy2, dst_y + dst_stride_y, 2511 SplitUVRow(src_yuy2 + src_stride_yuy2, dst_y + dst_stride_y,
2512 rows + awidth, awidth); 2512 rows + awidth, awidth);
2513 InterpolateRow(dst_uv, rows, awidth, awidth, 128); 2513 InterpolateRow(dst_uv, rows, awidth, awidth, 128);
2514 src_yuy2 += src_stride_yuy2 * 2; 2514 src_yuy2 += src_stride_yuy2 * 2;
2515 dst_y += dst_stride_y * 2; 2515 dst_y += dst_stride_y * 2;
2516 dst_uv += dst_stride_uv; 2516 dst_uv += dst_stride_uv;
2517 } 2517 }
2518 if (height & 1) { 2518 if (height & 1) {
2519 // Split Y from UV. 2519 // Split Y from UV.
2520 SplitUVRow(src_yuy2, dst_y, dst_uv, width); 2520 SplitUVRow(src_yuy2, dst_y, dst_uv, awidth);
2521 } 2521 }
2522 free_aligned_buffer_64(rows); 2522 free_aligned_buffer_64(rows);
2523 } 2523 }
2524 return 0; 2524 return 0;
2525 } 2525 }
2526 2526
2527 LIBYUV_API 2527 LIBYUV_API
2528 int UYVYToNV12(const uint8* src_uyvy, int src_stride_uyvy, 2528 int UYVYToNV12(const uint8* src_uyvy, int src_stride_uyvy,
2529 uint8* dst_y, int dst_stride_y, 2529 uint8* dst_y, int dst_stride_y,
2530 uint8* dst_uv, int dst_stride_uv, 2530 uint8* dst_uv, int dst_stride_uv,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
2614 SplitUVRow(src_uyvy, rows, dst_y, awidth); 2614 SplitUVRow(src_uyvy, rows, dst_y, awidth);
2615 SplitUVRow(src_uyvy + src_stride_uyvy, rows + awidth, 2615 SplitUVRow(src_uyvy + src_stride_uyvy, rows + awidth,
2616 dst_y + dst_stride_y, awidth); 2616 dst_y + dst_stride_y, awidth);
2617 InterpolateRow(dst_uv, rows, awidth, awidth, 128); 2617 InterpolateRow(dst_uv, rows, awidth, awidth, 128);
2618 src_uyvy += src_stride_uyvy * 2; 2618 src_uyvy += src_stride_uyvy * 2;
2619 dst_y += dst_stride_y * 2; 2619 dst_y += dst_stride_y * 2;
2620 dst_uv += dst_stride_uv; 2620 dst_uv += dst_stride_uv;
2621 } 2621 }
2622 if (height & 1) { 2622 if (height & 1) {
2623 // Split Y from UV. 2623 // Split Y from UV.
2624 SplitUVRow(src_uyvy, dst_y, dst_uv, width); 2624 SplitUVRow(src_uyvy, dst_uv, dst_y, awidth);
2625 } 2625 }
2626 free_aligned_buffer_64(rows); 2626 free_aligned_buffer_64(rows);
2627 } 2627 }
2628 return 0; 2628 return 0;
2629 } 2629 }
2630 2630
2631 #ifdef __cplusplus 2631 #ifdef __cplusplus
2632 } // extern "C" 2632 } // extern "C"
2633 } // namespace libyuv 2633 } // namespace libyuv
2634 #endif 2634 #endif
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