From 2e6274fc3b123e7de695038054b5cbd20b11559a Mon Sep 17 00:00:00 2001 From: Christian König Date: Sat, 23 Apr 2011 13:24:35 +0200 Subject: [g3dvl] make ycbcr stream and block data a public interface --- src/gallium/include/pipe/p_video_context.h | 24 +++++++++++------------- src/gallium/include/pipe/p_video_state.h | 29 +++++++++++++---------------- 2 files changed, 24 insertions(+), 29 deletions(-) (limited to 'src/gallium/include') diff --git a/src/gallium/include/pipe/p_video_context.h b/src/gallium/include/pipe/p_video_context.h index 1eb96420fb7..8775bbb2705 100644 --- a/src/gallium/include/pipe/p_video_context.h +++ b/src/gallium/include/pipe/p_video_context.h @@ -158,15 +158,10 @@ struct pipe_video_decoder * flush decoder buffer to video hardware */ void (*flush_buffer)(struct pipe_video_decode_buffer *decbuf, + unsigned num_ycbcr_blocks[3], struct pipe_video_buffer *ref_frames[2], struct pipe_video_buffer *dst, struct pipe_fence_handle **fence); - - /** - * clear decoder buffers todo list - */ - void (*clear_buffer)(struct pipe_video_decode_buffer *decbuf); - }; /** @@ -186,6 +181,16 @@ struct pipe_video_decode_buffer */ void (*map)(struct pipe_video_decode_buffer *decbuf); + /** + * get the pointer where to put the ycbcr blocks of a component + */ + struct pipe_ycbcr_block *(*get_ycbcr_stream)(struct pipe_video_decode_buffer *, int component); + + /** + * get the pointer where to put the ycbcr dct block data of a component + */ + short *(*get_ycbcr_buffer)(struct pipe_video_decode_buffer *, int component); + /** * get the stride of the mv buffer */ @@ -205,13 +210,6 @@ struct pipe_video_decode_buffer struct pipe_buffer **bitstream_buf); #endif - /** - * add macroblocks to decoder buffer - */ - void (*add_macroblocks)(struct pipe_video_decode_buffer *decbuf, - unsigned num_macroblocks, - struct pipe_macroblock *macroblocks); - /** * unmap decoder buffer before flushing */ diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h index dcb64d3c220..8bd84c2846a 100644 --- a/src/gallium/include/pipe/p_video_state.h +++ b/src/gallium/include/pipe/p_video_state.h @@ -50,10 +50,16 @@ enum pipe_mpeg12_picture_type PIPE_MPEG12_PICTURE_TYPE_FRAME }; +enum pipe_mpeg12_dct_intra +{ + PIPE_MPEG12_DCT_DELTA = 0, + PIPE_MPEG12_DCT_INTRA = 1 +}; + enum pipe_mpeg12_dct_type { - PIPE_MPEG12_DCT_TYPE_FIELD, - PIPE_MPEG12_DCT_TYPE_FRAME + PIPE_MPEG12_DCT_TYPE_FRAME = 0, + PIPE_MPEG12_DCT_TYPE_FIELD = 1 }; enum pipe_video_field_select @@ -75,11 +81,6 @@ enum pipe_video_mv_weight 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 { @@ -90,16 +91,12 @@ struct pipe_motionvector } top, bottom; }; -struct pipe_mpeg12_macroblock +/* bitfields because this is used as a vertex buffer element */ +struct pipe_ycbcr_block { - struct pipe_macroblock base; - - unsigned mbx; - unsigned mby; - bool dct_intra; - enum pipe_mpeg12_dct_type dct_type; - unsigned cbp; - short *blocks; + unsigned x:8, y:8; + enum pipe_mpeg12_dct_intra intra:8; + enum pipe_mpeg12_dct_type coding:8; }; #if 0 -- cgit v1.2.3