frame.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*!
  2. ************************************************************************
  3. * \file frame.h
  4. *
  5. * \brief
  6. * headers for frame format related information
  7. *
  8. * \author
  9. *
  10. ************************************************************************
  11. */
  12. #ifndef H264_FRAME_H_
  13. #define H264_FRAME_H_
  14. #pragma once
  15. typedef enum {
  16. CM_UNKNOWN = -1,
  17. CM_YUV = 0,
  18. CM_RGB = 1,
  19. CM_XYZ = 2
  20. } ColorModel;
  21. typedef enum {
  22. CF_UNKNOWN = -1, //!< Unknown color format
  23. YUV400 = 0, //!< Monochrome
  24. YUV420 = 1, //!< 4:2:0
  25. YUV422 = 2, //!< 4:2:2
  26. YUV444 = 3 //!< 4:4:4
  27. } ColorFormat;
  28. typedef struct frame_format
  29. {
  30. ColorFormat yuv_format; //!< YUV format (0=4:0:0, 1=4:2:0, 2=4:2:2, 3=4:4:4)
  31. int width; //!< luma component frame width
  32. int height; //!< luma component frame height
  33. int height_cr; //!< chroma component frame width
  34. int width_cr; //!< chroma component frame height
  35. int width_crop; //!< width after cropping consideration
  36. int height_crop; //!< height after cropping consideration
  37. int mb_width; //!< luma component frame width
  38. int mb_height; //!< luma component frame height
  39. int size_cmp[3]; //!< component sizes
  40. int size; //!< total image size
  41. int bit_depth[3]; //!< component bit depth
  42. int max_value[3]; //!< component max value
  43. int max_value_sq[3]; //!< component max value squared
  44. } FrameFormat;
  45. #endif