24 #include <vdpau/vdpau.h>
44 rf->surface = VDP_INVALID_HANDLE;
45 rf->is_long_term = VDP_FALSE;
46 rf->top_is_reference = VDP_FALSE;
47 rf->bottom_is_reference = VDP_FALSE;
48 rf->field_order_cnt[0] = 0;
49 rf->field_order_cnt[1] = 0;
58 if (pic_structure == 0)
61 rf->surface = surface;
77 VdpReferenceFrameH264 *rf = &
info->referenceFrames[0];
78 #define H264_RF_COUNT FF_ARRAY_ELEMS(info->referenceFrames)
82 int i, ls =
list ? 16 :
h->short_ref_count;
84 for (
i = 0;
i < ls; ++
i) {
86 VdpReferenceFrameH264 *rf2;
87 VdpVideoSurface surface_ref;
95 rf2 = &
info->referenceFrames[0];
97 if ((rf2->surface == surface_ref) &&
98 (rf2->is_long_term == pic->
long_ref) &&
99 (rf2->frame_idx == pic_frame_idx))
130 #ifdef VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE
131 VdpPictureInfoH264Predictive *info2 = &pic_ctx->
info.h264_predictive;
135 info->slice_count = 0;
138 info->is_reference =
h->nal_ref_idc != 0;
139 info->frame_num =
h->poc.frame_num;
142 info->num_ref_frames =
sps->ref_frame_count;
143 info->mb_adaptive_frame_field_flag =
sps->mb_aff && !
info->field_pic_flag;
144 info->constrained_intra_pred_flag =
pps->constrained_intra_pred;
145 info->weighted_pred_flag =
pps->weighted_pred;
146 info->weighted_bipred_idc =
pps->weighted_bipred_idc;
147 info->frame_mbs_only_flag =
sps->frame_mbs_only_flag;
148 info->transform_8x8_mode_flag =
pps->transform_8x8_mode;
149 info->chroma_qp_index_offset =
pps->chroma_qp_index_offset[0];
150 info->second_chroma_qp_index_offset =
pps->chroma_qp_index_offset[1];
151 info->pic_init_qp_minus26 =
pps->init_qp - 26;
152 info->num_ref_idx_l0_active_minus1 =
pps->ref_count[0] - 1;
153 info->num_ref_idx_l1_active_minus1 =
pps->ref_count[1] - 1;
154 info->log2_max_frame_num_minus4 =
sps->log2_max_frame_num - 4;
155 info->pic_order_cnt_type =
sps->poc_type;
156 info->log2_max_pic_order_cnt_lsb_minus4 =
sps->poc_type ? 0 :
sps->log2_max_poc_lsb - 4;
157 info->delta_pic_order_always_zero_flag =
sps->delta_pic_order_always_zero_flag;
158 info->direct_8x8_inference_flag =
sps->direct_8x8_inference_flag;
159 #ifdef VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE
160 info2->qpprime_y_zero_transform_bypass_flag =
sps->transform_bypass;
161 info2->separate_colour_plane_flag =
sps->residual_color_transform_flag;
163 info->entropy_coding_mode_flag =
pps->cabac;
164 info->pic_order_present_flag =
pps->pic_order_present;
165 info->deblocking_filter_control_present_flag =
pps->deblocking_filter_parameters_present;
166 info->redundant_pic_cnt_present_flag =
pps->redundant_pic_cnt_present;
168 memcpy(
info->scaling_lists_4x4,
pps->scaling_matrix4,
169 sizeof(
info->scaling_lists_4x4));
170 memcpy(
info->scaling_lists_8x8[0],
pps->scaling_matrix8[0],
171 sizeof(
info->scaling_lists_8x8[0]));
172 memcpy(
info->scaling_lists_8x8[1],
pps->scaling_matrix8[3],
173 sizeof(
info->scaling_lists_8x8[1]));
225 profile = VDP_DECODER_PROFILE_H264_BASELINE;
228 #ifdef VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE
229 profile = VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE;
233 profile = VDP_DECODER_PROFILE_H264_MAIN;
236 profile = VDP_DECODER_PROFILE_H264_HIGH;
238 #ifdef VDP_DECODER_PROFILE_H264_EXTENDED
240 profile = VDP_DECODER_PROFILE_H264_EXTENDED;
246 profile = VDP_DECODER_PROFILE_H264_HIGH;
248 #ifdef VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE
252 profile = VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE;
260 level = VDP_DECODER_LEVEL_H264_1b;
266 .
name =
"h264_vdpau",