home *** CD-ROM | disk | FTP | other *** search
/ Geek 6 / Geek-006.iso / linux / video / xmovie-1.5.3.tar.gz / xmovie-1.5.3.tar / xmovie-1.5.3 / quicktime / colormodels.h < prev    next >
C/C++ Source or Header  |  2000-11-29  |  2KB  |  84 lines

  1. #ifndef COLORMODELS_H
  2. #define COLORMODELS_H
  3.  
  4. // Colormodels
  5. #define BC_TRANSPARENCY 0
  6. #define BC_COMPRESSED   1
  7. #define BC_RGB8         2
  8. #define BC_RGB565       3
  9. #define BC_BGR565       4
  10. #define BC_BGR888       5
  11. #define BC_BGR8888      6
  12. // Working bitmaps are packed to simplify processing
  13. #define BC_RGB888       9
  14. #define BC_RGBA8888     10
  15. #define BC_RGB161616    11
  16. #define BC_RGBA16161616 12
  17. #define BC_YUV888       13
  18. #define BC_YUVA8888     14
  19. #define BC_YUV161616    15
  20. #define BC_YUVA16161616 16
  21. // Planar
  22. #define BC_YUV420P      7
  23. #define BC_YUV422P      17
  24. #define BC_YUV422       19
  25. #define BC_YUV411P      18
  26.  
  27. // For communication with the X Server
  28. #define FOURCC_YV12 0x32315659  /* YV12   YUV420P */
  29. #define FOURCC_YUV2 0x32595559  /* YUV2   YUV422 */
  30. #define FOURCC_I420 0x30323449  /* I420   Intel Indeo 4 */
  31.  
  32. #undef RECLIP
  33. #define RECLIP(x, y, z) ((x) = ((x) < (y) ? (y) : ((x) > (z) ? (z) : (x))))
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38.  
  39. typedef struct
  40. {
  41.     long rtoy_tab[256], gtoy_tab[256], btoy_tab[256];
  42.     long rtou_tab[256], gtou_tab[256], btou_tab[256];
  43.     long rtov_tab[256], gtov_tab[256], btov_tab[256];
  44.  
  45.     long vtor_tab[256], vtog_tab[256];
  46.     long utog_tab[256], utob_tab[256];
  47.     long *vtor, *vtog, *utog, *utob;
  48. } cmodel_yuv_t;
  49.  
  50. int cmodel_calculate_pixelsize(int colormodel);
  51.  
  52. void cmodel_transfer(unsigned char **output_rows, 
  53.     unsigned char **input_rows,
  54.     unsigned char *out_y_plane,
  55.     unsigned char *out_u_plane,
  56.     unsigned char *out_v_plane,
  57.     unsigned char *in_y_plane,
  58.     unsigned char *in_u_plane,
  59.     unsigned char *in_v_plane,
  60.     int in_x, 
  61.     int in_y, 
  62.     int in_w, 
  63.     int in_h,
  64.     int out_x, 
  65.     int out_y, 
  66.     int out_w, 
  67.     int out_h,
  68.     int in_colormodel, 
  69.     int out_colormodel,
  70.     int bg_color,
  71.     int total_in_w);
  72.  
  73. void cmodel_init_yuv(cmodel_yuv_t *yuv_table);
  74. void cmodel_delete_yuv(cmodel_yuv_t *yuv_table);
  75. int cmodel_bc_to_x(int color_model);
  76. // Tell when to use plane arguments or row pointer arguments to functions
  77. int cmodel_is_planar(int color_model);
  78.  
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82.  
  83. #endif
  84.