You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
2.2KB

  1. /*
  2. *
  3. * rgb2rgb.h, Software RGB to RGB convertor
  4. * pluralize by Software PAL8 to RGB convertor
  5. * Software YUV to YUV convertor
  6. * Software YUV to RGB convertor
  7. */
  8. #ifndef RGB2RGB_INCLUDED
  9. #define RGB2RGB_INCLUDED
  10. extern void rgb24to32(const uint8_t *src,uint8_t *dst,unsigned src_size);
  11. extern void rgb32to24(const uint8_t *src,uint8_t *dst,unsigned src_size);
  12. extern void rgb15to16(const uint8_t *src,uint8_t *dst,unsigned src_size);
  13. extern void rgb32to16(const uint8_t *src,uint8_t *dst,unsigned src_size);
  14. extern void rgb32to15(const uint8_t *src,uint8_t *dst,unsigned src_size);
  15. extern void rgb24to16(const uint8_t *src,uint8_t *dst,unsigned src_size);
  16. extern void rgb24to15(const uint8_t *src,uint8_t *dst,unsigned src_size);
  17. extern void rgb32tobgr32(const uint8_t *src, uint8_t *dst, unsigned src_size);
  18. extern void palette8torgb32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
  19. extern void palette8torgb16(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
  20. extern void palette8torgb15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
  21. extern void palette8torgb24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
  22. extern void yv12toyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
  23. unsigned int width, unsigned int height,
  24. unsigned int lumStride, unsigned int chromStride, unsigned int dstStride);
  25. extern void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
  26. unsigned int width, unsigned int height,
  27. unsigned int lumStride, unsigned int chromStride, unsigned int srcStride);
  28. extern void rgb24toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
  29. unsigned int width, unsigned int height,
  30. unsigned int lumStride, unsigned int chromStride, unsigned int srcStride);
  31. #define MODE_RGB 0x1
  32. #define MODE_BGR 0x2
  33. typedef void (* yuv2rgb_fun) (uint8_t * image, uint8_t * py,
  34. uint8_t * pu, uint8_t * pv,
  35. int h_size, int v_size,
  36. int rgb_stride, int y_stride, int uv_stride);
  37. extern yuv2rgb_fun yuv2rgb;
  38. void yuv2rgb_init (int bpp, int mode);
  39. #endif