summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau
diff options
context:
space:
mode:
authorChristian König <[email protected]>2013-09-24 03:03:33 -0600
committerChristian König <[email protected]>2013-10-28 11:08:12 +0100
commit925ffa8c4a5760d0f79de6bf1fab52c2d6e83b17 (patch)
treea833c0b55f211e8352946041970106fc1a8b7761 /src/gallium/state_trackers/vdpau
parent6f2410c9aa5b0a2e7f08c9e60f4d3dc84cfa9f41 (diff)
vl/h264: split fields into SPS/PPS
Add alot of missing fields as well. Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vdpau')
-rw-r--r--src/gallium/state_trackers/vdpau/decode.c47
1 files changed, 26 insertions, 21 deletions
diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c
index d741c79efc3..f62deb15041 100644
--- a/src/gallium/state_trackers/vdpau/decode.c
+++ b/src/gallium/state_trackers/vdpau/decode.c
@@ -352,6 +352,28 @@ vlVdpDecoderRenderH264(struct pipe_h264_picture_desc *picture,
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Decoding H264\n");
+ picture->pps->sps->mb_adaptive_frame_field_flag = picture_info->mb_adaptive_frame_field_flag;
+ picture->pps->sps->frame_mbs_only_flag = picture_info->frame_mbs_only_flag;
+ picture->pps->sps->log2_max_frame_num_minus4 = picture_info->log2_max_frame_num_minus4;
+ picture->pps->sps->pic_order_cnt_type = picture_info->pic_order_cnt_type;
+ picture->pps->sps->log2_max_pic_order_cnt_lsb_minus4 = picture_info->log2_max_pic_order_cnt_lsb_minus4;
+ picture->pps->sps->delta_pic_order_always_zero_flag = picture_info->delta_pic_order_always_zero_flag;
+ picture->pps->sps->direct_8x8_inference_flag = picture_info->direct_8x8_inference_flag;
+
+ picture->pps->transform_8x8_mode_flag = picture_info->transform_8x8_mode_flag;
+ picture->pps->chroma_qp_index_offset = picture_info->chroma_qp_index_offset;
+ picture->pps->second_chroma_qp_index_offset = picture_info->second_chroma_qp_index_offset;
+ picture->pps->pic_init_qp_minus26 = picture_info->pic_init_qp_minus26;
+ picture->pps->entropy_coding_mode_flag = picture_info->entropy_coding_mode_flag;
+ picture->pps->deblocking_filter_control_present_flag = picture_info->deblocking_filter_control_present_flag;
+ picture->pps->redundant_pic_cnt_present_flag = picture_info->redundant_pic_cnt_present_flag;
+ picture->pps->constrained_intra_pred_flag = picture_info->constrained_intra_pred_flag;
+ picture->pps->weighted_pred_flag = picture_info->weighted_pred_flag;
+ picture->pps->weighted_bipred_idc = picture_info->weighted_bipred_idc;
+ picture->pps->bottom_field_pic_order_in_frame_present_flag = picture_info->pic_order_present_flag;
+ memcpy(picture->pps->ScalingList4x4, picture_info->scaling_lists_4x4, 6*16);
+ memcpy(picture->pps->ScalingList8x8, picture_info->scaling_lists_8x8, 2*64);
+
picture->slice_count = picture_info->slice_count;
picture->field_order_cnt[0] = picture_info->field_order_cnt[0];
picture->field_order_cnt[1] = picture_info->field_order_cnt[1];
@@ -360,29 +382,9 @@ vlVdpDecoderRenderH264(struct pipe_h264_picture_desc *picture,
picture->field_pic_flag = picture_info->field_pic_flag;
picture->bottom_field_flag = picture_info->bottom_field_flag;
picture->num_ref_frames = picture_info->num_ref_frames;
- picture->mb_adaptive_frame_field_flag = picture_info->mb_adaptive_frame_field_flag;
- picture->constrained_intra_pred_flag = picture_info->constrained_intra_pred_flag;
- picture->weighted_pred_flag = picture_info->weighted_pred_flag;
- picture->weighted_bipred_idc = picture_info->weighted_bipred_idc;
- picture->frame_mbs_only_flag = picture_info->frame_mbs_only_flag;
- picture->transform_8x8_mode_flag = picture_info->transform_8x8_mode_flag;
- picture->chroma_qp_index_offset = picture_info->chroma_qp_index_offset;
- picture->second_chroma_qp_index_offset = picture_info->second_chroma_qp_index_offset;
- picture->pic_init_qp_minus26 = picture_info->pic_init_qp_minus26;
+
picture->num_ref_idx_l0_active_minus1 = picture_info->num_ref_idx_l0_active_minus1;
picture->num_ref_idx_l1_active_minus1 = picture_info->num_ref_idx_l1_active_minus1;
- picture->log2_max_frame_num_minus4 = picture_info->log2_max_frame_num_minus4;
- picture->pic_order_cnt_type = picture_info->pic_order_cnt_type;
- picture->log2_max_pic_order_cnt_lsb_minus4 = picture_info->log2_max_pic_order_cnt_lsb_minus4;
- picture->delta_pic_order_always_zero_flag = picture_info->delta_pic_order_always_zero_flag;
- picture->direct_8x8_inference_flag = picture_info->direct_8x8_inference_flag;
- picture->entropy_coding_mode_flag = picture_info->entropy_coding_mode_flag;
- picture->pic_order_present_flag = picture_info->pic_order_present_flag;
- picture->deblocking_filter_control_present_flag = picture_info->deblocking_filter_control_present_flag;
- picture->redundant_pic_cnt_present_flag = picture_info->redundant_pic_cnt_present_flag;
-
- memcpy(picture->scaling_lists_4x4, picture_info->scaling_lists_4x4, 6*16);
- memcpy(picture->scaling_lists_8x8, picture_info->scaling_lists_8x8, 2*64);
for (i = 0; i < 16; ++i) {
VdpStatus ret = vlVdpGetReferenceFrame
@@ -452,6 +454,8 @@ vlVdpDecoderRender(VdpDecoder decoder,
struct pipe_video_codec *dec;
bool buffer_support[2];
unsigned i;
+ struct pipe_h264_sps sps = {};
+ struct pipe_h264_pps pps = { &sps };
union {
struct pipe_picture_desc base;
struct pipe_mpeg12_picture_desc mpeg12;
@@ -536,6 +540,7 @@ vlVdpDecoderRender(VdpDecoder decoder,
ret = vlVdpDecoderRenderVC1(&desc.vc1, (VdpPictureInfoVC1 *)picture_info);
break;
case PIPE_VIDEO_FORMAT_MPEG4_AVC:
+ desc.h264.pps = &pps;
ret = vlVdpDecoderRenderH264(&desc.h264, (VdpPictureInfoH264 *)picture_info);
break;
default: