00001 00002 /*! 00003 ************************************************************************ 00004 * \file frame.h 00005 * 00006 * \brief 00007 * headers for frame format related information 00008 * 00009 * \author 00010 * 00011 ************************************************************************ 00012 */ 00013 #ifndef _FRAME_H_ 00014 #define _FRAME_H_ 00015 00016 typedef enum { 00017 CM_UNKNOWN = -1, 00018 CM_YUV = 0, 00019 CM_RGB = 1, 00020 CM_XYZ = 2 00021 } ColorModel; 00022 00023 typedef enum { 00024 CF_UNKNOWN = -1, //!< Unknown color format 00025 YUV400 = 0, //!< Monochrome 00026 YUV420 = 1, //!< 4:2:0 00027 YUV422 = 2, //!< 4:2:2 00028 YUV444 = 3 //!< 4:4:4 00029 } ColorFormat; 00030 00031 typedef struct frame_format 00032 { 00033 ColorFormat yuv_format; //!< YUV format (0=4:0:0, 1=4:2:0, 2=4:2:2, 3=4:4:4) 00034 ColorModel color_model; //!< 4:4:4 format (0: YUV, 1: RGB, 2: XYZ) 00035 double frame_rate; //!< frame rate 00036 int width; //!< luma component frame width 00037 int height; //!< luma component frame height 00038 int height_cr; //!< chroma component frame width 00039 int width_cr; //!< chroma component frame height 00040 int auto_crop_right; //!< luma component auto crop right 00041 int auto_crop_bottom; //!< luma component auto crop bottom 00042 int auto_crop_right_cr; //!< chroma component auto crop right 00043 int auto_crop_bottom_cr; //!< chroma component auto crop bottom 00044 int width_crop; //!< width after cropping consideration 00045 int height_crop; //!< height after cropping consideration 00046 int mb_width; //!< luma component frame width 00047 int mb_height; //!< luma component frame height 00048 int size_cmp[3]; //!< component sizes 00049 int size; //!< total image size 00050 int bit_depth[3]; //!< component bit depth 00051 int max_value[3]; //!< component max value 00052 int max_value_sq[3]; //!< component max value squared 00053 int pic_unit_size_on_disk; //!< picture sample unit size on storage medium 00054 int pic_unit_size_shift3; //!< pic_unit_size_on_disk >> 3 00055 } FrameFormat; 00056 00057 #endif