1 #ifndef _P264_LAYERS_H_
2 #define _P264_LAYERS_H_
4 #include <VP_Os/vp_os_types.h>
5 #include <VLIB/video_macroblock.h>
7 #define MAKE_START_CODE(gob) ( P264_CODEC | (gob) )
8 #define PICTURE_START_CODE MAKE_START_CODE(0)
9 #define PICTURE_END_CODE MAKE_START_CODE(0x1F)
11 #define UVLC_FORMAT_CIF 1
12 #define UVLC_FORMAT_VGA 2
14 //#define UVLC_RESOLUTION_SUBQ 1 /* sub-QCIF */
15 //#define UVLC_RESOLUTION_Q 2 /* QCIF */
16 //#define UVLC_RESOLUTION_1 3 /* CIF */
17 //#define UVLC_RESOLUTION_4 4 /* 4-CIF */
18 //#define UVLC_RESOLUTION_16 5 /* 16-CIF */
20 typedef struct _p264_mb_layer_t {
25 typedef struct _p264_gob_layer_t {
26 video_macroblock_t* macroblocks;
30 typedef struct _p264_picture_layer_t {
33 uint32_t picture_type;
35 p264_gob_layer_t* gobs;
36 } p264_picture_layer_t;
38 C_RESULT p264_write_picture_layer( video_controller_t* controller, video_stream_t* stream );
39 C_RESULT p264_read_picture_layer( video_controller_t* controller, video_stream_t* stream );
41 C_RESULT p264_write_gob_layer( video_stream_t* stream, p264_gob_layer_t* gob );
42 C_RESULT p264_read_gob_layer( video_stream_t* stream, p264_gob_layer_t* gob );
44 C_RESULT p264_write_mb_layer(video_controller_t* controller, video_stream_t* stream, video_macroblock_t* mb, int32_t num_macro_blocks );
45 C_RESULT p264_read_mb_layer(video_controller_t* controller, video_stream_t* stream, video_gob_t* gobs, uint32_t i_blockline, uint32_t i_mb);
47 #endif // _UVLC_LAYERS_H_