* @{
*/
-static void VDPAU_h264_set_reference_frames(H264Context *h)
+void ff_vdpau_h264_set_reference_frames(MpegEncContext *s)
{
- MpegEncContext * s = &h->s;
+ H264Context *h = s->avctx->priv_data;
struct vdpau_render_state * render, * render_ref;
VdpReferenceFrameH264 * rf, * rf2;
Picture * pic;
}
}
-void ff_VDPAU_h264_add_data_chunk(H264Context *h, const uint8_t *buf, int buf_size)
+void ff_vdpau_add_data_chunk(MpegEncContext *s,
+ const uint8_t *buf, int buf_size)
{
- MpegEncContext * s = &h->s;
struct vdpau_render_state * render;
render = (struct vdpau_render_state*)s->current_picture_ptr->data[0];
assert(render);
- if (!render->bitstream_buffers_used)
- VDPAU_h264_set_reference_frames(h);
-
render->bitstream_buffers= av_fast_realloc(
render->bitstream_buffers,
&render->bitstream_buffers_allocated,
render->bitstream_buffers_used++;
}
-void ff_VDPAU_h264_picture_complete(H264Context *h)
+void ff_vdpau_h264_picture_complete(MpegEncContext *s)
{
- MpegEncContext * s = &h->s;
+ H264Context *h = s->avctx->priv_data;
struct vdpau_render_state * render;
render = (struct vdpau_render_state*)s->current_picture_ptr->data[0];