diff options
author | Christian König <[email protected]> | 2011-04-20 13:44:26 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-04-20 13:44:26 +0200 |
commit | b7acf83d523563cde613fe805bd8edaa02f64b53 (patch) | |
tree | adb2a0d5a668fab33b62ee478b767f10673d6fa3 /src/gallium/include | |
parent | 3511780a43077d1359bd491eadb4ab9b3b86795a (diff) |
[g3dvl] make motion vector buffers a public interface
Diffstat (limited to 'src/gallium/include')
-rw-r--r-- | src/gallium/include/pipe/p_video_context.h | 10 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_video_state.h | 36 |
2 files changed, 33 insertions, 13 deletions
diff --git a/src/gallium/include/pipe/p_video_context.h b/src/gallium/include/pipe/p_video_context.h index 81fc2812249..1eb96420fb7 100644 --- a/src/gallium/include/pipe/p_video_context.h +++ b/src/gallium/include/pipe/p_video_context.h @@ -186,6 +186,16 @@ struct pipe_video_decode_buffer */ void (*map)(struct pipe_video_decode_buffer *decbuf); + /** + * get the stride of the mv buffer + */ + unsigned (*get_mv_stream_stride)(struct pipe_video_decode_buffer *decbuf); + + /** + * get the pointer where to put the motion vectors of a ref frame + */ + struct pipe_motionvector *(*get_mv_stream)(struct pipe_video_decode_buffer *decbuf, int ref_frame); + #if 0 /** * decode a bitstream diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h index 2cf5ea4d975..dcb64d3c220 100644 --- a/src/gallium/include/pipe/p_video_state.h +++ b/src/gallium/include/pipe/p_video_state.h @@ -50,31 +50,43 @@ enum pipe_mpeg12_picture_type PIPE_MPEG12_PICTURE_TYPE_FRAME }; -enum pipe_mpeg12_motion_type -{ - PIPE_MPEG12_MOTION_TYPE_FIELD, - PIPE_MPEG12_MOTION_TYPE_FRAME, - PIPE_MPEG12_MOTION_TYPE_DUALPRIME, - PIPE_MPEG12_MOTION_TYPE_16x8 -}; - enum pipe_mpeg12_dct_type { PIPE_MPEG12_DCT_TYPE_FIELD, PIPE_MPEG12_DCT_TYPE_FRAME }; +enum pipe_video_field_select +{ + PIPE_VIDEO_FRAME = 0, + PIPE_VIDEO_TOP_FIELD = 1, + PIPE_VIDEO_BOTTOM_FIELD = 3, + + /* TODO + PIPE_VIDEO_DUALPRIME + PIPE_VIDEO_16x8 + */ +}; + +enum pipe_video_mv_weight +{ + PIPE_VIDEO_MV_WEIGHT_MIN = 0, + PIPE_VIDEO_MV_WEIGHT_HALF = 128, + PIPE_VIDEO_MV_WEIGHT_MAX = 256 +}; + struct pipe_macroblock { enum pipe_video_codec codec; }; +/* bitfields because this is used as a vertex buffer element */ struct pipe_motionvector { struct { - signed x, y; - bool field_select; - unsigned wheight:8; + signed x:16, y:16; + enum pipe_video_field_select field_select:16; + enum pipe_video_mv_weight weight:16; } top, bottom; }; @@ -84,10 +96,8 @@ struct pipe_mpeg12_macroblock unsigned mbx; unsigned mby; - enum pipe_mpeg12_motion_type mo_type; bool dct_intra; enum pipe_mpeg12_dct_type dct_type; - struct pipe_motionvector mv[2]; unsigned cbp; short *blocks; }; |