scale_rgb.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright 2022 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_RGB_H_
  11. #define INCLUDE_LIBYUV_SCALE_RGB_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. // RGB can be RAW, RGB24 or YUV24
  19. // RGB scales 24 bit images by converting a row at a time to ARGB
  20. // and using ARGB row functions to scale, then convert to RGB.
  21. // TODO(fbarchard): Allow input/output formats to be specified.
  22. LIBYUV_API
  23. int RGBScale(const uint8_t* src_rgb,
  24. int src_stride_rgb,
  25. int src_width,
  26. int src_height,
  27. uint8_t* dst_rgb,
  28. int dst_stride_rgb,
  29. int dst_width,
  30. int dst_height,
  31. enum FilterMode filtering);
  32. #ifdef __cplusplus
  33. } // extern "C"
  34. } // namespace libyuv
  35. #endif
  36. #endif // INCLUDE_LIBYUV_SCALE_UV_H_