/xbmc/cores/VideoRenderers/OverlayRendererUtil.h

http://github.com/xbmc/xbmc · C Header · 68 lines · 41 code · 8 blank · 19 comment · 0 complexity · d7143b86491b75871a6e5dad9778d0a0 MD5 · raw file

  1. /*
  2. * Copyright (C) 2005-2013 Team XBMC
  3. * http://xbmc.org
  4. *
  5. * This Program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2, or (at your option)
  8. * any later version.
  9. *
  10. * This Program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with XBMC; see the file COPYING. If not, see
  17. * <http://www.gnu.org/licenses/>.
  18. *
  19. */
  20. #pragma once
  21. #include <stdlib.h>
  22. class CDVDOverlayImage;
  23. class CDVDOverlaySpu;
  24. class CDVDOverlaySSA;
  25. typedef struct ass_image ASS_Image;
  26. namespace OVERLAY {
  27. struct SQuad
  28. {
  29. int u, v;
  30. unsigned char r, g, b, a;
  31. int x, y;
  32. int w, h;
  33. };
  34. struct SQuads
  35. {
  36. SQuads()
  37. {
  38. data = NULL;
  39. quad = NULL;
  40. size_x = 0;
  41. size_y = 0;
  42. count = 0;
  43. }
  44. ~SQuads()
  45. {
  46. free(data);
  47. free(quad);
  48. }
  49. int size_x;
  50. int size_y;
  51. int count;
  52. uint8_t* data;
  53. SQuad* quad;
  54. };
  55. uint32_t* convert_rgba(CDVDOverlayImage* o, bool mergealpha);
  56. uint32_t* convert_rgba(CDVDOverlaySpu* o, bool mergealpha
  57. , int& min_x, int& max_x
  58. , int& min_y, int& max_y);
  59. bool convert_quad(ASS_Image* images, SQuads& quads);
  60. }