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

Side by Side Diff: source/libvpx/third_party/libyuv/include/libyuv/planar_functions.h

Issue 1302353004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 3 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
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 27 matching lines...) Expand all
38 void SetPlane(uint8* dst_y, int dst_stride_y, 38 void SetPlane(uint8* dst_y, int dst_stride_y,
39 int width, int height, 39 int width, int height,
40 uint32 value); 40 uint32 value);
41 41
42 // Copy I400. Supports inverting. 42 // Copy I400. Supports inverting.
43 LIBYUV_API 43 LIBYUV_API
44 int I400ToI400(const uint8* src_y, int src_stride_y, 44 int I400ToI400(const uint8* src_y, int src_stride_y,
45 uint8* dst_y, int dst_stride_y, 45 uint8* dst_y, int dst_stride_y,
46 int width, int height); 46 int width, int height);
47 47
48 #define J400ToJ400 I400ToI400
48 49
49 // Copy I422 to I422. 50 // Copy I422 to I422.
50 #define I422ToI422 I422Copy 51 #define I422ToI422 I422Copy
51 LIBYUV_API 52 LIBYUV_API
52 int I422Copy(const uint8* src_y, int src_stride_y, 53 int I422Copy(const uint8* src_y, int src_stride_y,
53 const uint8* src_u, int src_stride_u, 54 const uint8* src_u, int src_stride_u,
54 const uint8* src_v, int src_stride_v, 55 const uint8* src_v, int src_stride_v,
55 uint8* dst_y, int dst_stride_y, 56 uint8* dst_y, int dst_stride_y,
56 uint8* dst_u, int dst_stride_u, 57 uint8* dst_u, int dst_stride_u,
57 uint8* dst_v, int dst_stride_v, 58 uint8* dst_v, int dst_stride_v,
(...skipping 19 matching lines...) Expand all
77 int width, int height); 78 int width, int height);
78 79
79 // Convert UYVY to I422. 80 // Convert UYVY to I422.
80 LIBYUV_API 81 LIBYUV_API
81 int UYVYToI422(const uint8* src_uyvy, int src_stride_uyvy, 82 int UYVYToI422(const uint8* src_uyvy, int src_stride_uyvy,
82 uint8* dst_y, int dst_stride_y, 83 uint8* dst_y, int dst_stride_y,
83 uint8* dst_u, int dst_stride_u, 84 uint8* dst_u, int dst_stride_u,
84 uint8* dst_v, int dst_stride_v, 85 uint8* dst_v, int dst_stride_v,
85 int width, int height); 86 int width, int height);
86 87
88 LIBYUV_API
89 int YUY2ToNV12(const uint8* src_yuy2, int src_stride_yuy2,
90 uint8* dst_y, int dst_stride_y,
91 uint8* dst_uv, int dst_stride_uv,
92 int width, int height);
93
94 LIBYUV_API
95 int UYVYToNV12(const uint8* src_uyvy, int src_stride_uyvy,
96 uint8* dst_y, int dst_stride_y,
97 uint8* dst_uv, int dst_stride_uv,
98 int width, int height);
99
87 // Convert I420 to I400. (calls CopyPlane ignoring u/v). 100 // Convert I420 to I400. (calls CopyPlane ignoring u/v).
88 LIBYUV_API 101 LIBYUV_API
89 int I420ToI400(const uint8* src_y, int src_stride_y, 102 int I420ToI400(const uint8* src_y, int src_stride_y,
90 const uint8* src_u, int src_stride_u, 103 const uint8* src_u, int src_stride_u,
91 const uint8* src_v, int src_stride_v, 104 const uint8* src_v, int src_stride_v,
92 uint8* dst_y, int dst_stride_y, 105 uint8* dst_y, int dst_stride_y,
93 int width, int height); 106 int width, int height);
94 107
95 // Alias 108 // Alias
109 #define J420ToJ400 I420ToI400
96 #define I420ToI420Mirror I420Mirror 110 #define I420ToI420Mirror I420Mirror
97 111
98 // I420 mirror. 112 // I420 mirror.
99 LIBYUV_API 113 LIBYUV_API
100 int I420Mirror(const uint8* src_y, int src_stride_y, 114 int I420Mirror(const uint8* src_y, int src_stride_y,
101 const uint8* src_u, int src_stride_u, 115 const uint8* src_u, int src_stride_u,
102 const uint8* src_v, int src_stride_v, 116 const uint8* src_v, int src_stride_v,
103 uint8* dst_y, int dst_stride_y, 117 uint8* dst_y, int dst_stride_y,
104 uint8* dst_u, int dst_stride_u, 118 uint8* dst_u, int dst_stride_u,
105 uint8* dst_v, int dst_stride_v, 119 uint8* dst_v, int dst_stride_v,
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 // 'interpolation' is specified as 8 bit fraction where 0 means 100% src_argb0 394 // 'interpolation' is specified as 8 bit fraction where 0 means 100% src_argb0
381 // and 255 means 1% src_argb0 and 99% src_argb1. 395 // and 255 means 1% src_argb0 and 99% src_argb1.
382 // Internally uses ARGBScale bilinear filtering. 396 // Internally uses ARGBScale bilinear filtering.
383 // Caveat: This function will write up to 16 bytes beyond the end of dst_argb. 397 // Caveat: This function will write up to 16 bytes beyond the end of dst_argb.
384 LIBYUV_API 398 LIBYUV_API
385 int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0, 399 int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0,
386 const uint8* src_argb1, int src_stride_argb1, 400 const uint8* src_argb1, int src_stride_argb1,
387 uint8* dst_argb, int dst_stride_argb, 401 uint8* dst_argb, int dst_stride_argb,
388 int width, int height, int interpolation); 402 int width, int height, int interpolation);
389 403
390 #if defined(__pnacl__) || defined(__CLR_VER) || defined(COVERAGE_ENABLED) || \ 404 #if defined(__pnacl__) || defined(__CLR_VER) || \
391 defined(TARGET_IPHONE_SIMULATOR) 405 (defined(__i386__) && !defined(__SSE2__))
392 #define LIBYUV_DISABLE_X86 406 #define LIBYUV_DISABLE_X86
393 #endif 407 #endif
408 // The following are available on all x86 platforms:
409 #if !defined(LIBYUV_DISABLE_X86) && \
410 (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
411 #define HAS_ARGBAFFINEROW_SSE2
412 #endif
394 413
395 // Row functions for copying a pixels from a source with a slope to a row 414 // Row function for copying pixels from a source with a slope to a row
396 // of destination. Useful for scaling, rotation, mirror, texture mapping. 415 // of destination. Useful for scaling, rotation, mirror, texture mapping.
397 LIBYUV_API 416 LIBYUV_API
398 void ARGBAffineRow_C(const uint8* src_argb, int src_argb_stride, 417 void ARGBAffineRow_C(const uint8* src_argb, int src_argb_stride,
399 uint8* dst_argb, const float* uv_dudv, int width); 418 uint8* dst_argb, const float* uv_dudv, int width);
400 // The following are available on all x86 platforms:
401 #if !defined(LIBYUV_DISABLE_X86) && \
402 (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
403 LIBYUV_API 419 LIBYUV_API
404 void ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride, 420 void ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride,
405 uint8* dst_argb, const float* uv_dudv, int width); 421 uint8* dst_argb, const float* uv_dudv, int width);
406 #define HAS_ARGBAFFINEROW_SSE2
407 #endif // LIBYUV_DISABLE_X86
408 422
409 // Shuffle ARGB channel order. e.g. BGRA to ARGB. 423 // Shuffle ARGB channel order. e.g. BGRA to ARGB.
410 // shuffler is 16 bytes and must be aligned. 424 // shuffler is 16 bytes and must be aligned.
411 LIBYUV_API 425 LIBYUV_API
412 int ARGBShuffle(const uint8* src_bgra, int src_stride_bgra, 426 int ARGBShuffle(const uint8* src_bgra, int src_stride_bgra,
413 uint8* dst_argb, int dst_stride_argb, 427 uint8* dst_argb, int dst_stride_argb,
414 const uint8* shuffler, int width, int height); 428 const uint8* shuffler, int width, int height);
415 429
416 // Sobel ARGB effect with planar output. 430 // Sobel ARGB effect with planar output.
417 LIBYUV_API 431 LIBYUV_API
(...skipping 12 matching lines...) Expand all
430 int ARGBSobelXY(const uint8* src_argb, int src_stride_argb, 444 int ARGBSobelXY(const uint8* src_argb, int src_stride_argb,
431 uint8* dst_argb, int dst_stride_argb, 445 uint8* dst_argb, int dst_stride_argb,
432 int width, int height); 446 int width, int height);
433 447
434 #ifdef __cplusplus 448 #ifdef __cplusplus
435 } // extern "C" 449 } // extern "C"
436 } // namespace libyuv 450 } // namespace libyuv
437 #endif 451 #endif
438 452
439 #endif // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ NOLINT 453 #endif // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ NOLINT
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698