[FFmpeg-cvslog] r24057 - in trunk/libavcodec: h264.c h264_refs.c

michael subversion
Mon Jul 5 16:36:03 CEST 2010


Author: michael
Date: Mon Jul  5 16:36:03 2010
New Revision: 24057

Log:
Perform sliding window operation during frame gap handling.
This avoids some warnings about too many reference frames.

Modified:
   trunk/libavcodec/h264.c
   trunk/libavcodec/h264_refs.c

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	Mon Jul  5 14:42:19 2010	(r24056)
+++ trunk/libavcodec/h264.c	Mon Jul  5 16:36:03 2010	(r24057)
@@ -1908,7 +1908,8 @@ static int decode_slice_header(H264Conte
             h->prev_frame_num++;
             h->prev_frame_num %= 1<<h->sps.log2_max_frame_num;
             s->current_picture_ptr->frame_num= h->prev_frame_num;
-            ff_h264_execute_ref_pic_marking(h, NULL, 0);
+            ff_generate_sliding_window_mmcos(h);
+            ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index);
         }
 
         /* See if we have a decoded first field looking for a pair... */

Modified: trunk/libavcodec/h264_refs.c
==============================================================================
--- trunk/libavcodec/h264_refs.c	Mon Jul  5 14:42:19 2010	(r24056)
+++ trunk/libavcodec/h264_refs.c	Mon Jul  5 16:36:03 2010	(r24057)
@@ -478,6 +478,7 @@ void ff_generate_sliding_window_mmcos(H2
     MpegEncContext * const s = &h->s;
     assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count);
 
+    h->mmco_index= 0;
     if(h->short_ref_count && h->long_ref_count + h->short_ref_count == h->sps.ref_frame_count &&
             !(FIELD_PICTURE && !s->first_field && s->current_picture_ptr->reference)) {
         h->mmco[0].opcode= MMCO_SHORT2UNUSED;



More information about the ffmpeg-cvslog mailing list