00001 00002 #ifndef _MOM_STRUCTS_H_ 00003 #define _MOM_STRUCTS_H_ 00004 00005 00006 #include "momusys.h" 00007 00008 #define VERSION 1 /* Image Structure Version */ 00009 00010 /***** 00011 * 00012 * Basic and generic image structure 00013 * 00014 *****/ 00015 enum image_type {SHORT_TYPE,FLOAT_TYPE,UCHAR_TYPE}; 00016 typedef enum image_type ImageType; 00017 00018 union image_data 00019 { 00020 SInt *s; /* SHORT data */ 00021 Float *f; /* FLOAT data */ 00022 UChar *u; /* UCHAR data */ 00023 }; 00024 typedef union image_data ImageData; 00025 00026 struct image 00027 { 00028 Int version; /* Version number */ 00029 UInt x,y; /* Image size */ 00030 Char upperodd; /* Flag to tell if the top line is considered 00031 as even or odd (used for hex grids) */ 00032 Char grid; /* Grid type: s = square, h = hexagonal */ 00033 SInt *f; /* Image data with short int values */ 00034 ImageData *data; /* NEW: pointer to image data */ 00035 ImageType type; /* NEW: type of the image */ 00036 }; 00037 typedef struct image Image; 00038 00039 typedef struct image ImageI; /* For compatibility with old source code */ 00040 typedef struct image ImageF; /* For compatibility with old source code */ 00041 00042 /***** 00043 * 00044 * Recommended structures for VOPs, VOLs and VOs (now compliant with VM3.0) 00045 * (in the VOP structure *all* entries from the VOL syntax which 00046 * are necessary for decoding the VOP are duplicated. These entries 00047 * are marked as "VOL ...") 00048 * 00049 *****/ 00050 struct vop 00051 { 00052 /* Actual syntax elements for VOP (standard) */ 00053 Int prediction_type; /* VOP prediction type */ 00054 Int mod_time_base; /* VOP modulo time base (absolute) */ 00055 Float time_inc; /* VOP time increment (relative to last mtb) */ 00056 Int rounding_type; 00057 00058 Int width; /* VOP height (smallest rectangle) */ 00059 Int height; /* VOP width (smallest rectangle) */ 00060 Int hor_spat_ref; /* VOP horizontal ref. (for composition) */ 00061 Int ver_spat_ref; /* VOP vertical ref. (for composition) */ 00062 00063 Int intra_dc_vlc_thr; 00064 00065 Int quantizer; /* VOP quantizer for P-VOPs */ 00066 Int intra_quantizer; /* VOP quantizer for I-VOPs */ 00067 00068 /* Syntax elements copied from VOL (standard) */ 00069 Int time_increment_resolution; 00070 00071 Int intra_acdc_pred_disable; /* VOL disable INTRA DC prediction */ 00072 Int sr_for; /* VOP search range of motion vectors */ 00073 Int fcode_for; /* VOP dynamic range of motion vectors */ 00074 Int quant_precision; 00075 Int bits_per_pixel; 00076 00077 /* Pointers to the images (YUVA) and to related VOPs */ 00078 Image *y_chan; /* Y component of the VOP texture */ 00079 Image *u_chan; /* U component of the VOP texture */ 00080 Image *v_chan; /* V component of the VOP texture */ 00081 }; 00082 typedef struct vop Vop; 00083 00084 struct object_layer_cfg 00085 { 00086 Float frame_rate; /* VOL frame rate */ 00087 Int M; /* M-1 number of B-VOPs between consecutive P-VOPs*/ 00088 Int start_frame; /* Frame at which to start coding */ 00089 Int end_frame; /* Frame at which to end coding */ 00090 Int bit_rate; /* Target bitrate */ 00091 Int frame_skip; /* Number of frames to skip between codings */ 00092 00093 Int quantizer; /* Initial value for H.263 INTRA quantizer */ 00094 Int intra_quantizer; /* Initial value for H.263 INTER quantizer */ 00095 00096 Int intra_period; /* Regular rate of INTRA VOP */ 00097 00098 /* Automatically calculated coding fields */ 00099 Int modulo_time_base[2]; /* Modulo time base must be maintained for VOL */ 00100 }; 00101 typedef struct object_layer_cfg VolConfig; 00102 00103 00104 #include "mom_util.h" 00105 #include "mom_access.h" 00106 00107 00108 #endif /* _MOM_STRUCTS_H_ */
1.5.5