ArDrone SDK 1.8 added
[mardrone] / mardrone / ARDrone_SDK_Version_1_8_20110726 / ARDroneLib / VLIB / P264 / p264_layers.h
1 #ifndef _P264_LAYERS_H_
2 #define _P264_LAYERS_H_
3
4 #include <VP_Os/vp_os_types.h>
5 #include <VLIB/video_macroblock.h>
6
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)
10
11 #define UVLC_FORMAT_CIF   1
12 #define UVLC_FORMAT_VGA   2
13 //
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   */
19
20 typedef struct _p264_mb_layer_t {
21   uint32_t desc;
22   uint32_t dquant;
23 } p264_mb_layer_t;
24
25 typedef struct _p264_gob_layer_t {
26   video_macroblock_t* macroblocks;
27   uint32_t quant;
28 } p264_gob_layer_t;
29
30 typedef struct _p264_picture_layer_t {
31   uint32_t format;
32   uint32_t resolution;
33   uint32_t picture_type;
34   uint32_t quant;
35   p264_gob_layer_t* gobs;
36 } p264_picture_layer_t;
37
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 );
40
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 );
43
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);
46
47 #endif // _UVLC_LAYERS_H_