24 #include <vdpau/vdpau.h>
41 rf->surface = VDP_INVALID_HANDLE;
42 rf->is_long_term = VDP_FALSE;
43 rf->top_is_reference = VDP_FALSE;
44 rf->bottom_is_reference = VDP_FALSE;
45 rf->field_order_cnt[0] = 0;
46 rf->field_order_cnt[1] = 0;
55 if (pic_structure == 0)
58 rf->surface = surface;
71 VdpPictureInfoH264 *info = &pic_ctx->info.h264;
74 VdpReferenceFrameH264 *rf = &info->referenceFrames[0];
75 #define H264_RF_COUNT FF_ARRAY_ELEMS(info->referenceFrames)
77 for (list = 0; list < 2; ++list) {
81 for (i = 0; i < ls; ++i) {
83 VdpReferenceFrameH264 *rf2;
84 VdpVideoSurface surface_ref;
92 rf2 = &info->referenceFrames[0];
94 if ((rf2->surface == surface_ref) &&
95 (rf2->is_long_term == pic->
long_ref) &&
96 (rf2->frame_idx == pic_frame_idx))
124 VdpPictureInfoH264 *info = &pic_ctx->info.h264;
127 info->slice_count = 0;
135 info->mb_adaptive_frame_field_flag = h->
sps.
mb_aff && !info->field_pic_flag;
143 info->pic_init_qp_minus26 = h->
pps.
init_qp - 26;
144 info->num_ref_idx_l0_active_minus1 = h->
pps.
ref_count[0] - 1;
145 info->num_ref_idx_l1_active_minus1 = h->
pps.
ref_count[1] - 1;
151 info->entropy_coding_mode_flag = h->
pps.
cabac;
157 sizeof(info->scaling_lists_4x4));
159 sizeof(info->scaling_lists_8x8[0]));
161 sizeof(info->scaling_lists_8x8[1]));
186 pic_ctx->info.h264.slice_count++;
199 #if FF_API_BUFS_VDPAU
201 hwctx->
info = pic_ctx->info;
209 res = hwctx->
render2(avctx, &pic->
f, (
void *)&pic_ctx->info,
210 pic_ctx->bitstream_buffers_used, pic_ctx->bitstream_buffers);
213 pic_ctx->bitstream_buffers_used, pic_ctx->bitstream_buffers);
216 av_freep(&pic_ctx->bitstream_buffers);
218 #if FF_API_BUFS_VDPAU
230 .
name =
"h264_vdpau",
237 .frame_priv_data_size =
sizeof(
struct vdpau_picture_context),