[Ffmpeg-cvslog] r7686 - trunk/libavcodec/mpegvideo.c

michael subversion
Wed Jan 24 15:20:01 CET 2007


Author: michael
Date: Wed Jan 24 15:20:00 2007
New Revision: 7686

Modified:
   trunk/libavcodec/mpegvideo.c

Log:
set last_picture for h.264 too, this significantly improves error concealment quality, i hope it doesnt break anything as last_picture_ptr was always NULL for h.264


Modified: trunk/libavcodec/mpegvideo.c
==============================================================================
--- trunk/libavcodec/mpegvideo.c	(original)
+++ trunk/libavcodec/mpegvideo.c	Wed Jan 24 15:20:00 2007
@@ -1538,6 +1538,7 @@
 
     /* mark&release old frames */
     if (s->pict_type != B_TYPE && s->last_picture_ptr && s->last_picture_ptr != s->next_picture_ptr && s->last_picture_ptr->data[0]) {
+      if(s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3){
         avctx->release_buffer(avctx, (AVFrame*)s->last_picture_ptr);
 
         /* release forgotten pictures */
@@ -1550,6 +1551,7 @@
                 }
             }
         }
+      }
     }
 alloc:
     if(!s->encoding){
@@ -1587,7 +1589,6 @@
 
     copy_picture(&s->current_picture, s->current_picture_ptr);
 
-  if(s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3){
     if (s->pict_type != B_TYPE) {
         s->last_picture_ptr= s->next_picture_ptr;
         if(!s->dropable)
@@ -1621,7 +1622,6 @@
             s->next_picture.linesize[i] *=2;
         }
     }
-  }
 
     s->hurry_up= s->avctx->hurry_up;
     s->error_resilience= avctx->error_resilience;




More information about the ffmpeg-cvslog mailing list