Mesa (pipe-video): [g3dvl] remove unused and dublicate fields from picture structure
Christian König
deathsimple at kemper.freedesktop.org
Sun Jun 5 22:38:02 UTC 2011
Module: Mesa
Branch: pipe-video
Commit: 7e1fbb360332ecac2789e28a0f3d303306f687b1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7e1fbb360332ecac2789e28a0f3d303306f687b1
Author: Christian König <deathsimple at vodafone.de>
Date: Sun Jun 5 17:07:17 2011 +0200
[g3dvl] remove unused and dublicate fields from picture structure
---
src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c | 6 +++---
src/gallium/include/pipe/p_video_state.h | 10 ----------
src/gallium/state_trackers/vdpau/decode.c | 1 +
3 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
index e7fbc31..7a14efb 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
@@ -1209,7 +1209,7 @@ slice_intra_DCT(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * pictur
memset(dest, 0, sizeof(int16_t) * 64);
dest[0] = dc_dct_pred[cc];
- if (picture->mpeg1) {
+ if (picture->base.profile == PIPE_VIDEO_PROFILE_MPEG1) {
if (picture->picture_coding_type != D_TYPE)
get_mpeg1_intra_block(bs, quantizer_scale, dest);
} else if (picture->intra_vlc_format)
@@ -1236,7 +1236,7 @@ slice_non_intra_DCT(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * pi
bs->ycbcr_stream[cc]->coding = coding;
memset(dest, 0, sizeof(int16_t) * 64);
- if (picture->mpeg1)
+ if (picture->base.profile == PIPE_VIDEO_PROFILE_MPEG1)
get_mpeg1_non_intra_block(bs, quantizer_scale, dest);
else
get_non_intra_block(bs, quantizer_scale, dest);
@@ -1654,7 +1654,7 @@ decode_slice(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc *picture)
if (picture->picture_structure == FRAME_PICTURE)
switch (macroblock_modes & MOTION_TYPE_MASK) {
case MC_FRAME:
- if (picture->mpeg1) {
+ if (picture->base.profile == PIPE_VIDEO_PROFILE_MPEG1) {
MOTION_CALL(motion_mp1, macroblock_modes);
} else {
MOTION_CALL(motion_fr_frame, macroblock_modes);
diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h
index f46c2dd..6f64c38 100644
--- a/src/gallium/include/pipe/p_video_state.h
+++ b/src/gallium/include/pipe/p_video_state.h
@@ -118,18 +118,8 @@ struct pipe_mpeg12_picture_desc
unsigned concealment_motion_vectors;
unsigned f_code[2][2];
- bool mpeg1;
uint8_t *intra_quantizer_matrix;
uint8_t *non_intra_quantizer_matrix;
-
-#if 0
- /* TODO: Use bitfields where possible? */
- unsigned top_field_first;
- unsigned full_pel_forward_vector;
- unsigned full_pel_backward_vector;
- struct pipe_buffer *chroma_intra_quantizer_matrix;
- struct pipe_buffer *chroma_non_intra_quantizer_matrix;
-#endif
};
#ifdef __cplusplus
diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c
index 0f658a9..de6f96b 100644
--- a/src/gallium/state_trackers/vdpau/decode.c
+++ b/src/gallium/state_trackers/vdpau/decode.c
@@ -183,6 +183,7 @@ vlVdpDecoderRenderMpeg2(struct pipe_video_decoder *decoder,
}
memset(&picture, 0, sizeof(picture));
+ picture.base.profile = decoder->profile;
picture.picture_coding_type = picture_info->picture_coding_type;
picture.picture_structure = picture_info->picture_structure;
picture.frame_pred_frame_dct = picture_info->frame_pred_frame_dct;
More information about the mesa-commit
mailing list