2 #ifndef _MOM_STRUCTS_H_
3 #define _MOM_STRUCTS_H_
8 #define VERSION 1 /* Image Structure Version */
12 * Basic and generic image structure
15 enum image_type
{SHORT_TYPE
,FLOAT_TYPE
,UCHAR_TYPE
};
16 typedef enum image_type ImageType
;
20 SInt
*s
; /* SHORT data */
21 Float
*f
; /* FLOAT data */
22 UChar
*u
; /* UCHAR data */
24 typedef union image_data ImageData
;
28 Int version
; /* Version number */
29 UInt x
,y
; /* Image size */
30 Char upperodd
; /* Flag to tell if the top line is considered
31 as even or odd (used for hex grids) */
32 Char grid
; /* Grid type: s = square, h = hexagonal */
33 SInt
*f
; /* Image data with short int values */
34 ImageData
*data
; /* NEW: pointer to image data */
35 ImageType type
; /* NEW: type of the image */
37 typedef struct image Image
;
39 typedef struct image ImageI
; /* For compatibility with old source code */
40 typedef struct image ImageF
; /* For compatibility with old source code */
44 * Recommended structures for VOPs, VOLs and VOs (now compliant with VM3.0)
45 * (in the VOP structure *all* entries from the VOL syntax which
46 * are necessary for decoding the VOP are duplicated. These entries
47 * are marked as "VOL ...")
52 /* Actual syntax elements for VOP (standard) */
53 Int prediction_type
; /* VOP prediction type */
54 Int mod_time_base
; /* VOP modulo time base (absolute) */
55 Float time_inc
; /* VOP time increment (relative to last mtb) */
58 Int width
; /* VOP height (smallest rectangle) */
59 Int height
; /* VOP width (smallest rectangle) */
60 Int hor_spat_ref
; /* VOP horizontal ref. (for composition) */
61 Int ver_spat_ref
; /* VOP vertical ref. (for composition) */
65 Int quantizer
; /* VOP quantizer for P-VOPs */
66 Int intra_quantizer
; /* VOP quantizer for I-VOPs */
68 /* Syntax elements copied from VOL (standard) */
69 Int time_increment_resolution
;
71 Int intra_acdc_pred_disable
; /* VOL disable INTRA DC prediction */
72 Int sr_for
; /* VOP search range of motion vectors */
73 Int fcode_for
; /* VOP dynamic range of motion vectors */
77 /* Pointers to the images (YUVA) and to related VOPs */
78 Image
*y_chan
; /* Y component of the VOP texture */
79 Image
*u_chan
; /* U component of the VOP texture */
80 Image
*v_chan
; /* V component of the VOP texture */
82 typedef struct vop Vop
;
84 struct object_layer_cfg
86 Float frame_rate
; /* VOL frame rate */
87 Int M
; /* M-1 number of B-VOPs between consecutive P-VOPs*/
88 Int start_frame
; /* Frame at which to start coding */
89 Int end_frame
; /* Frame at which to end coding */
90 Int bit_rate
; /* Target bitrate */
91 Int frame_skip
; /* Number of frames to skip between codings */
93 Int quantizer
; /* Initial value for H.263 INTRA quantizer */
94 Int intra_quantizer
; /* Initial value for H.263 INTER quantizer */
96 Int intra_period
; /* Regular rate of INTRA VOP */
98 /* Automatically calculated coding fields */
99 Int modulo_time_base
[2]; /* Modulo time base must be maintained for VOL */
101 typedef struct object_layer_cfg VolConfig
;
104 #include "mom_util.h"
105 #include "mom_access.h"
108 #endif /* _MOM_STRUCTS_H_ */