diff options
author | Stephen Warren <> | 2010-03-30 08:10:29 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-03-30 08:10:29 +0000 |
commit | 3bccd93ac0b7e5dbb4a335257eaee9d8908dad3c (patch) | |
tree | 6b2c19d479c69711a3f1e39f7fe60ed8583e5343 /libavcodec/vdpau.c | |
parent | e5efbafdfdffb8717cbeccced224fce4b422ee20 (diff) | |
download | ffmpeg-3bccd93ac0b7e5dbb4a335257eaee9d8908dad3c.tar.gz |
Set VDPAU H264 picture parameter field_order_cnt and frame_num at the
start of decoding a picture instead of at the end.
Fixes mmco01.264
Patch by Stephen Warren
Originally committed as revision 22728 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vdpau.c')
-rw-r--r-- | libavcodec/vdpau.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index 1ee935bf3b..bd721e8f8e 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -127,7 +127,7 @@ void ff_vdpau_add_data_chunk(MpegEncContext *s, render->bitstream_buffers_used++; } -void ff_vdpau_h264_picture_complete(MpegEncContext *s) +void ff_vdpau_h264_picture_start(MpegEncContext *s) { H264Context *h = s->avctx->priv_data; struct vdpau_render_state *render; @@ -136,10 +136,6 @@ void ff_vdpau_h264_picture_complete(MpegEncContext *s) render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; assert(render); - render->info.h264.slice_count = h->slice_num; - if (render->info.h264.slice_count < 1) - return; - for (i = 0; i < 2; ++i) { int foc = s->current_picture_ptr->field_poc[i]; if (foc == INT_MAX) @@ -147,8 +143,22 @@ void ff_vdpau_h264_picture_complete(MpegEncContext *s) render->info.h264.field_order_cnt[i] = foc; } + render->info.h264.frame_num = h->frame_num; +} + +void ff_vdpau_h264_picture_complete(MpegEncContext *s) +{ + H264Context *h = s->avctx->priv_data; + struct vdpau_render_state *render; + + render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; + assert(render); + + render->info.h264.slice_count = h->slice_num; + if (render->info.h264.slice_count < 1) + return; + render->info.h264.is_reference = (s->current_picture_ptr->reference & 3) ? VDP_TRUE : VDP_FALSE; - render->info.h264.frame_num = h->frame_num; render->info.h264.field_pic_flag = s->picture_structure != PICT_FRAME; render->info.h264.bottom_field_flag = s->picture_structure == PICT_BOTTOM_FIELD; render->info.h264.num_ref_frames = h->sps.ref_frame_count; |