PageRenderTime 16ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/Avc/yuv2rgb.h

http://github.com/mbebenita/Broadway
C Header | 51 lines | 28 code | 9 blank | 14 comment | 0 complexity | 4c7def4d95875efeab9aa1c94b1761a0 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. /* YUV-> RGB conversion code.
  2. *
  3. * Copyright (C) 2011 Robin Watts (robin@wss.co.uk) for Pinknoise
  4. * Productions Ltd.
  5. *
  6. * Licensed under the BSD license. See 'COPYING' for details of
  7. * (non-)warranty.
  8. *
  9. */
  10. #include <stdint.h>
  11. #ifndef YUV2RGB_H
  12. #define YUV2RGB_H
  13. /* Define these to something appropriate in your build */
  14. //typedef unsigned int uint32_t;
  15. //typedef signed int int32_t;
  16. //typedef unsigned short uint16_t;
  17. //typedef unsigned char uint8_t;
  18. extern const uint32_t yuv2rgb565_table[];
  19. extern const uint32_t yuv2bgr565_table[];
  20. void yuv420_2_rgb888(uint8_t *dst_ptr,
  21. const uint8_t *y_ptr,
  22. const uint8_t *u_ptr,
  23. const uint8_t *v_ptr,
  24. int32_t width,
  25. int32_t height,
  26. int32_t y_span,
  27. int32_t uv_span,
  28. int32_t dst_span,
  29. const uint32_t *tables,
  30. int32_t dither);
  31. void yuv420_2_rgb8888(uint8_t *dst_ptr,
  32. const uint8_t *y_ptr,
  33. const uint8_t *u_ptr,
  34. const uint8_t *v_ptr,
  35. int32_t width,
  36. int32_t height,
  37. int32_t y_span,
  38. int32_t uv_span,
  39. int32_t dst_span,
  40. const uint32_t *tables,
  41. int32_t dither);
  42. #endif /* YUV2RGB_H */