summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-04-23 13:24:35 +0200
committerChristian König <[email protected]>2011-04-23 13:24:35 +0200
commit2e6274fc3b123e7de695038054b5cbd20b11559a (patch)
treea2081e884d6f610e084c00a07ededc42115db9e3 /src/gallium/include
parentf0819a22f3dc63d1c0dde6320babf9b7fcda15bb (diff)
[g3dvl] make ycbcr stream and block data a public interface
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_video_context.h24
-rw-r--r--src/gallium/include/pipe/p_video_state.h29
2 files changed, 24 insertions, 29 deletions
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);
-
};
/**
@@ -187,6 +182,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
*/
unsigned (*get_mv_stream_stride)(struct pipe_video_decode_buffer *decbuf);
@@ -206,13 +211,6 @@ struct pipe_video_decode_buffer
#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
*/
void (*unmap)(struct pipe_video_decode_buffer *decbuf);
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