]> git.sesse.net Git - ffmpeg/commitdiff
Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 6 Feb 2013 15:59:32 +0000 (16:59 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 6 Feb 2013 15:59:32 +0000 (16:59 +0100)
* qatar/master:
  mpegvideo: initialize dummy reference frames.

Conflicts:
libavcodec/mpegvideo.c
tests/ref/fate/filter-yadif-mode1

The luma init is left at 0x80 as it was previously, and tested and
working since a long time. Its also mandated to be 0x80 by at least
one specification. Cases that need different values already had
code in place to handle them.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/mpegvideo.c

index 33e275826bfc450a9eaac0481fdd43bc889e97dc,82bc57d1d94a11e66c06685d5258fb0afa1948a3..0c7b02b3c7c9dd7af27f28b35dfe57d4fe4fa621
@@@ -1485,11 -1492,15 +1488,20 @@@ int ff_MPV_frame_start(MpegEncContext *
                  return -1;
              }
  
 -            memset(s->last_picture_ptr->f.data[0], 0,
++            memset(s->last_picture_ptr->f.data[0], 0x80,
+                    avctx->height * s->last_picture_ptr->f.linesize[0]);
+             memset(s->last_picture_ptr->f.data[1], 0x80,
+                    (avctx->height >> v_chroma_shift) *
+                    s->last_picture_ptr->f.linesize[1]);
+             memset(s->last_picture_ptr->f.data[2], 0x80,
+                    (avctx->height >> v_chroma_shift) *
+                    s->last_picture_ptr->f.linesize[2]);
 +            if(s->codec_id == AV_CODEC_ID_FLV1 || s->codec_id == AV_CODEC_ID_H263){
 +                for(i=0; i<avctx->height; i++)
 +                    memset(s->last_picture_ptr->f.data[0] + s->last_picture_ptr->f.linesize[0]*i, 16, avctx->width);
 +            }
 +
              ff_thread_report_progress(&s->last_picture_ptr->f, INT_MAX, 0);
              ff_thread_report_progress(&s->last_picture_ptr->f, INT_MAX, 1);
              s->last_picture_ptr->f.reference = 3;