[FFmpeg-devel] [RFC]current_picture_ptr->reference
Carl Eugen Hoyos
cehoyos
Thu Feb 26 01:21:27 CET 2009
Hi!
In avcodec.h, FFCOMMONFRAME.reference is defined as being either 1, 2 or
3, depending on which kind of reference it is.
In h264.c, the field can be set to DELAYED_PIC_REF (=4, line 3094).
Is this correct?
The reason I ask is that NVIDIA suggests attached patch to make sure that
vdpau gets the correct value for h264.is_reference.
Please comment, Carl Eugen
-------------- next part --------------
Index: libavcodec/vdpau.c
===================================================================
--- libavcodec/vdpau.c (revision 17586)
+++ libavcodec/vdpau.c (working copy)
@@ -147,7 +147,7 @@
render->info.h264.field_order_cnt[i] = foc;
}
- render->info.h264.is_reference = s->current_picture_ptr->reference ? VDP_TRUE : VDP_FALSE;
+ 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;
More information about the ffmpeg-devel
mailing list