bc_decoder.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // SPDX-License-Identifier: MPL-2.0
  2. // Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/)
  3. #pragma once
  4. #include <cstdint>
  5. namespace bcn {
  6. /**
  7. * @brief Decodes a BC1 encoded image to R8G8B8A8
  8. */
  9. void DecodeBc1(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height);
  10. /**
  11. * @brief Decodes a BC2 encoded image to R8G8B8A8
  12. */
  13. void DecodeBc2(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height);
  14. /**
  15. * @brief Decodes a BC3 encoded image to R8G8B8A8
  16. */
  17. void DecodeBc3(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height);
  18. /**
  19. * @brief Decodes a BC4 encoded image to R8
  20. */
  21. void DecodeBc4(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height, bool isSigned);
  22. /**
  23. * @brief Decodes a BC5 encoded image to R8G8
  24. */
  25. void DecodeBc5(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height, bool isSigned);
  26. /**
  27. * @brief Decodes a BC6 encoded image to R16G16B16A16
  28. */
  29. void DecodeBc6(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height, bool isSigned);
  30. /**
  31. * @brief Decodes a BC7 encoded image to R8G8B8A8
  32. */
  33. void DecodeBc7(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height);
  34. }