scale_argb.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * Copyright 2012 The LibYuv Project Authors. All rights reserved.
  3. *
  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
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef INCLUDE_LIBYUV_SCALE_ARGB_H_
  11. #define INCLUDE_LIBYUV_SCALE_ARGB_H_
  12. #include "libyuv/basic_types.h"
  13. #include "libyuv/scale.h" // For FilterMode
  14. #ifdef __cplusplus
  15. namespace libyuv {
  16. extern "C" {
  17. #endif
  18. LIBYUV_API
  19. int ARGBScale(const uint8* src_argb,
  20. int src_stride_argb,
  21. int src_width,
  22. int src_height,
  23. uint8* dst_argb,
  24. int dst_stride_argb,
  25. int dst_width,
  26. int dst_height,
  27. enum FilterMode filtering);
  28. // Clipped scale takes destination rectangle coordinates for clip values.
  29. LIBYUV_API
  30. int ARGBScaleClip(const uint8* src_argb,
  31. int src_stride_argb,
  32. int src_width,
  33. int src_height,
  34. uint8* dst_argb,
  35. int dst_stride_argb,
  36. int dst_width,
  37. int dst_height,
  38. int clip_x,
  39. int clip_y,
  40. int clip_width,
  41. int clip_height,
  42. enum FilterMode filtering);
  43. // Scale with YUV conversion to ARGB and clipping.
  44. LIBYUV_API
  45. int YUVToARGBScaleClip(const uint8* src_y,
  46. int src_stride_y,
  47. const uint8* src_u,
  48. int src_stride_u,
  49. const uint8* src_v,
  50. int src_stride_v,
  51. uint32 src_fourcc,
  52. int src_width,
  53. int src_height,
  54. uint8* dst_argb,
  55. int dst_stride_argb,
  56. uint32 dst_fourcc,
  57. int dst_width,
  58. int dst_height,
  59. int clip_x,
  60. int clip_y,
  61. int clip_width,
  62. int clip_height,
  63. enum FilterMode filtering);
  64. #ifdef __cplusplus
  65. } // extern "C"
  66. } // namespace libyuv
  67. #endif
  68. #endif // INCLUDE_LIBYUV_SCALE_ARGB_H_