[SCM] libav/experimental: Perform sliding window operation during frame gap handling. This avoids some warnings about too many reference frames.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:10:25 UTC 2013


The following commit has been merged in the experimental branch:
commit 3d5421201ba21d108adc0c76458300ea425114a9
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Mon Jul 5 14:36:03 2010 +0000

    Perform sliding window operation during frame gap handling.
    This avoids some warnings about too many reference frames.
    
    Originally committed as revision 24057 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index e7ffe45..d1662fc 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1908,7 +1908,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
             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... */
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index 7caa4b0..74eaaa8 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -478,6 +478,7 @@ void ff_generate_sliding_window_mmcos(H264Context *h) {
     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;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list