[FFmpeg-cvslog] r16513 - in trunk/libavcodec: h264.c vdpau_internal.h vdpauvideo.c

cehoyos subversion
Sat Jan 10 03:45:08 CET 2009


Author: cehoyos
Date: Sat Jan 10 03:45:07 2009
New Revision: 16513

Log:
Move vdpau_h264_set_reference_frames() call from vdpauvideo.c into h264.c.

Modified:
   trunk/libavcodec/h264.c
   trunk/libavcodec/vdpau_internal.h
   trunk/libavcodec/vdpauvideo.c

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	Sat Jan 10 00:54:57 2009	(r16512)
+++ trunk/libavcodec/h264.c	Sat Jan 10 03:45:07 2009	(r16513)
@@ -7624,6 +7624,9 @@ static int decode_frame(AVCodecContext *
         s->current_picture_ptr->qscale_type= FF_QSCALE_TYPE_H264;
         s->current_picture_ptr->pict_type= s->pict_type;
 
+        if (ENABLE_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU)
+            ff_vdpau_h264_set_reference_frames(h);
+
         if(!s->dropable) {
             execute_ref_pic_marking(h, h->mmco, h->mmco_index);
             h->prev_poc_msb= h->poc_msb;

Modified: trunk/libavcodec/vdpau_internal.h
==============================================================================
--- trunk/libavcodec/vdpau_internal.h	Sat Jan 10 00:54:57 2009	(r16512)
+++ trunk/libavcodec/vdpau_internal.h	Sat Jan 10 03:45:07 2009	(r16513)
@@ -29,6 +29,7 @@
 
 void ff_vdpau_h264_add_data_chunk(H264Context *h, const uint8_t *buf,
                                   int buf_size);
+void ff_vdpau_h264_set_reference_frames(H264Context *h);
 void ff_vdpau_h264_picture_complete(H264Context *h);
 
 #endif /* AVCODEC_VDPAU_INTERNAL_H */

Modified: trunk/libavcodec/vdpauvideo.c
==============================================================================
--- trunk/libavcodec/vdpauvideo.c	Sat Jan 10 00:54:57 2009	(r16512)
+++ trunk/libavcodec/vdpauvideo.c	Sat Jan 10 03:45:07 2009	(r16513)
@@ -37,7 +37,7 @@
  * @{
  */
 
-static void vdpau_h264_set_reference_frames(H264Context *h)
+void ff_vdpau_h264_set_reference_frames(H264Context *h)
 {
     MpegEncContext * s = &h->s;
     struct vdpau_render_state * render, * render_ref;
@@ -114,9 +114,6 @@ void ff_vdpau_h264_add_data_chunk(H264Co
     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,




More information about the ffmpeg-cvslog mailing list