24 #include <vdpau/vdpau.h>
40 rf->surface = VDP_INVALID_HANDLE;
41 rf->is_long_term = VDP_FALSE;
42 rf->top_is_reference = VDP_FALSE;
43 rf->bottom_is_reference = VDP_FALSE;
44 rf->field_order_cnt[0] = 0;
45 rf->field_order_cnt[1] = 0;
54 if (pic_structure == 0)
57 rf->surface = surface;
70 VdpPictureInfoH264 *info = &pic_ctx->info.h264;
73 VdpReferenceFrameH264 *rf = &info->referenceFrames[0];
74 #define H264_RF_COUNT FF_ARRAY_ELEMS(info->referenceFrames)
76 for (list = 0; list < 2; ++list) {
80 for (i = 0; i < ls; ++i) {
82 VdpReferenceFrameH264 *rf2;
83 VdpVideoSurface surface_ref;
91 rf2 = &info->referenceFrames[0];
93 if ((rf2->surface == surface_ref) &&
94 (rf2->is_long_term == pic->
long_ref) &&
95 (rf2->frame_idx == pic_frame_idx))
123 VdpPictureInfoH264 *info = &pic_ctx->info.h264;
126 info->slice_count = 0;
134 info->mb_adaptive_frame_field_flag = h->
sps.
mb_aff && !info->field_pic_flag;
142 info->pic_init_qp_minus26 = h->
pps.
init_qp - 26;
143 info->num_ref_idx_l0_active_minus1 = h->
pps.
ref_count[0] - 1;
144 info->num_ref_idx_l1_active_minus1 = h->
pps.
ref_count[1] - 1;
150 info->entropy_coding_mode_flag = h->
pps.
cabac;
156 sizeof(info->scaling_lists_4x4));
158 sizeof(info->scaling_lists_8x8[0]));
160 sizeof(info->scaling_lists_8x8[1]));
185 pic_ctx->info.h264.slice_count++;
198 #if FF_API_BUFS_VDPAU
200 hwctx->
info = pic_ctx->info;
208 res = hwctx->
render2(avctx, &pic->
f, (
void *)&pic_ctx->info,
209 pic_ctx->bitstream_buffers_used, pic_ctx->bitstream_buffers);
212 pic_ctx->bitstream_buffers_used, pic_ctx->bitstream_buffers);
215 av_freep(&pic_ctx->bitstream_buffers);
217 #if FF_API_BUFS_VDPAU
229 .
name =
"h264_vdpau",
236 .priv_data_size =
sizeof(
struct vdpau_picture_context),