52 pic_ctx->bitstream_buffers_allocated = 0;
53 pic_ctx->bitstream_buffers_used = 0;
54 pic_ctx->bitstream_buffers = NULL;
58 #if CONFIG_H263_VDPAU_HWACCEL || CONFIG_MPEG1_VDPAU_HWACCEL || \
59 CONFIG_MPEG2_VDPAU_HWACCEL || CONFIG_MPEG4_VDPAU_HWACCEL || \
60 CONFIG_VC1_VDPAU_HWACCEL || CONFIG_WMV3_VDPAU_HWACCEL
72 hwctx->
info = pic_ctx->info;
80 res = hwctx->
render2(avctx, pic->
f, (
void *)&pic_ctx->info,
81 pic_ctx->bitstream_buffers_used, pic_ctx->bitstream_buffers);
84 pic_ctx->bitstream_buffers_used, pic_ctx->bitstream_buffers);
87 av_freep(&pic_ctx->bitstream_buffers);
104 VdpBitstreamBuffer *
buffers = pic_ctx->bitstream_buffers;
106 buffers =
av_fast_realloc(buffers, &pic_ctx->bitstream_buffers_allocated,
107 (pic_ctx->bitstream_buffers_used + 1) *
sizeof(*buffers));
111 pic_ctx->bitstream_buffers =
buffers;
112 buffers += pic_ctx->bitstream_buffers_used++;
114 buffers->struct_version = VDP_BITSTREAM_BUFFER_VERSION;
115 buffers->bitstream =
buf;
116 buffers->bitstream_bytes =
size;
125 VdpReferenceFrameH264 *rf, *rf2;
127 int i, list, pic_frame_idx;
132 rf = &render->
info.
h264.referenceFrames[0];
133 #define H264_RF_COUNT FF_ARRAY_ELEMS(render->info.h264.referenceFrames)
135 for (list = 0; list < 2; ++list) {
139 for (i = 0; i < ls; ++i) {
148 rf2 = &render->
info.
h264.referenceFrames[0];
151 (rf2->surface == render_ref->
surface)
152 && (rf2->is_long_term == pic->
long_ref)
153 && (rf2->frame_idx == pic_frame_idx)
167 rf->surface = render_ref->
surface;
171 rf->field_order_cnt[0] = pic->
field_poc[0];
172 rf->field_order_cnt[1] = pic->
field_poc[1];
173 rf->frame_idx = pic_frame_idx;
180 rf->surface = VDP_INVALID_HANDLE;
181 rf->is_long_term = 0;
182 rf->top_is_reference = 0;
183 rf->bottom_is_reference = 0;
184 rf->field_order_cnt[0] = 0;
185 rf->field_order_cnt[1] = 0;
207 #if CONFIG_H264_VDPAU_DECODER
216 for (i = 0; i < 2; ++i) {
220 render->
info.
h264.field_order_cnt[i] = foc;
234 if (render->
info.
h264.slice_count < 1)
270 #if CONFIG_MPEG_VDPAU_DECODER || CONFIG_MPEG1_VDPAU_DECODER
272 int buf_size,
int slice_count)
298 for (i = 0; i < 64; ++i) {
303 render->
info.
mpeg.forward_reference = VDP_INVALID_HANDLE;
304 render->
info.
mpeg.backward_reference = VDP_INVALID_HANDLE;
321 render->
info.
mpeg.slice_count = slice_count;
329 #if CONFIG_VC1_VDPAU_DECODER
340 render->
info.
vc1.frame_coding_mode = v->
fcm ? v->
fcm + 1 : 0;
370 render->
info.
vc1.forward_reference = VDP_INVALID_HANDLE;
371 render->
info.
vc1.backward_reference = VDP_INVALID_HANDLE;
374 render->
info.
vc1.picture_type = 4;
393 render->
info.
vc1.slice_count = 1;
400 #if CONFIG_MPEG4_VDPAU_DECODER
430 for (i = 0; i < 64; ++i) {
434 render->
info.
mpeg4.forward_reference = VDP_INVALID_HANDLE;
435 render->
info.
mpeg4.backward_reference = VDP_INVALID_HANDLE;
459 #define PROFILE(prof) \
471 default:
return AVERROR(EINVAL);
478 default:
return AVERROR(EINVAL);
486 default:
return AVERROR(EINVAL);
494 default:
return AVERROR(EINVAL);