OLD | NEW |
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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 int width, int height); | 295 int width, int height); |
296 | 296 |
297 typedef void (*ARGBBlendRow)(const uint8* src_argb0, const uint8* src_argb1, | 297 typedef void (*ARGBBlendRow)(const uint8* src_argb0, const uint8* src_argb1, |
298 uint8* dst_argb, int width); | 298 uint8* dst_argb, int width); |
299 | 299 |
300 // Get function to Alpha Blend ARGB pixels and store to destination. | 300 // Get function to Alpha Blend ARGB pixels and store to destination. |
301 LIBYUV_API | 301 LIBYUV_API |
302 ARGBBlendRow GetARGBBlend(); | 302 ARGBBlendRow GetARGBBlend(); |
303 | 303 |
304 // Alpha Blend ARGB images and store to destination. | 304 // Alpha Blend ARGB images and store to destination. |
| 305 // Source is pre-multiplied by alpha using ARGBAttenuate. |
305 // Alpha of destination is set to 255. | 306 // Alpha of destination is set to 255. |
306 LIBYUV_API | 307 LIBYUV_API |
307 int ARGBBlend(const uint8* src_argb0, int src_stride_argb0, | 308 int ARGBBlend(const uint8* src_argb0, int src_stride_argb0, |
308 const uint8* src_argb1, int src_stride_argb1, | 309 const uint8* src_argb1, int src_stride_argb1, |
309 uint8* dst_argb, int dst_stride_argb, | 310 uint8* dst_argb, int dst_stride_argb, |
310 int width, int height); | 311 int width, int height); |
311 | 312 |
| 313 // Alpha Blend plane and store to destination. |
| 314 // Source is not pre-multiplied by alpha. |
| 315 LIBYUV_API |
| 316 int BlendPlane(const uint8* src_y0, int src_stride_y0, |
| 317 const uint8* src_y1, int src_stride_y1, |
| 318 const uint8* alpha, int alpha_stride, |
| 319 uint8* dst_y, int dst_stride_y, |
| 320 int width, int height); |
| 321 |
| 322 // Alpha Blend YUV images and store to destination. |
| 323 // Source is not pre-multiplied by alpha. |
| 324 // Alpha is full width x height and subsampled to half size to apply to UV. |
| 325 LIBYUV_API |
| 326 int I420Blend(const uint8* src_y0, int src_stride_y0, |
| 327 const uint8* src_u0, int src_stride_u0, |
| 328 const uint8* src_v0, int src_stride_v0, |
| 329 const uint8* src_y1, int src_stride_y1, |
| 330 const uint8* src_u1, int src_stride_u1, |
| 331 const uint8* src_v1, int src_stride_v1, |
| 332 const uint8* alpha, int alpha_stride, |
| 333 uint8* dst_y, int dst_stride_y, |
| 334 uint8* dst_u, int dst_stride_u, |
| 335 uint8* dst_v, int dst_stride_v, |
| 336 int width, int height); |
| 337 |
312 // Multiply ARGB image by ARGB image. Shifted down by 8. Saturates to 255. | 338 // Multiply ARGB image by ARGB image. Shifted down by 8. Saturates to 255. |
313 LIBYUV_API | 339 LIBYUV_API |
314 int ARGBMultiply(const uint8* src_argb0, int src_stride_argb0, | 340 int ARGBMultiply(const uint8* src_argb0, int src_stride_argb0, |
315 const uint8* src_argb1, int src_stride_argb1, | 341 const uint8* src_argb1, int src_stride_argb1, |
316 uint8* dst_argb, int dst_stride_argb, | 342 uint8* dst_argb, int dst_stride_argb, |
317 int width, int height); | 343 int width, int height); |
318 | 344 |
319 // Add ARGB image with ARGB image. Saturates to 255. | 345 // Add ARGB image with ARGB image. Saturates to 255. |
320 LIBYUV_API | 346 LIBYUV_API |
321 int ARGBAdd(const uint8* src_argb0, int src_stride_argb0, | 347 int ARGBAdd(const uint8* src_argb0, int src_stride_argb0, |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 int ARGBSobelXY(const uint8* src_argb, int src_stride_argb, | 492 int ARGBSobelXY(const uint8* src_argb, int src_stride_argb, |
467 uint8* dst_argb, int dst_stride_argb, | 493 uint8* dst_argb, int dst_stride_argb, |
468 int width, int height); | 494 int width, int height); |
469 | 495 |
470 #ifdef __cplusplus | 496 #ifdef __cplusplus |
471 } // extern "C" | 497 } // extern "C" |
472 } // namespace libyuv | 498 } // namespace libyuv |
473 #endif | 499 #endif |
474 | 500 |
475 #endif // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ NOLINT | 501 #endif // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ NOLINT |
OLD | NEW |