Merge commit 'c6aa0554b0c3e31fec4580b68ea85b66966cd381'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 10 Jun 2015 18:50:36 +0000 (20:50 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 10 Jun 2015 18:50:36 +0000 (20:50 +0200)
* commit 'c6aa0554b0c3e31fec4580b68ea85b66966cd381':
  mpegvideo: Drop release_unused_pictures() function

Conflicts:
libavcodec/mpegvideo.c

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

@@@ -1140,33 -1109,6 +1140,23 @@@ void ff_mpv_common_end(MpegEncContext *
      s->linesize = s->uvlinesize = 0;
  }
  
- static void release_unused_pictures(AVCodecContext *avctx, Picture *picture)
- {
-     int i;
-     /* release non reference frames */
-     for (i = 0; i < MAX_PICTURE_COUNT; i++) {
-         if (!picture[i].reference)
-             ff_mpeg_unref_picture(avctx, &picture[i]);
-     }
- }
 +
 +static void gray_frame(AVFrame *frame)
 +{
 +    int i, h_chroma_shift, v_chroma_shift;
 +
 +    av_pix_fmt_get_chroma_sub_sample(frame->format, &h_chroma_shift, &v_chroma_shift);
 +
 +    for(i=0; i<frame->height; i++)
 +        memset(frame->data[0] + frame->linesize[0]*i, 0x80, frame->width);
 +    for(i=0; i<FF_CEIL_RSHIFT(frame->height, v_chroma_shift); i++) {
 +        memset(frame->data[1] + frame->linesize[1]*i,
 +               0x80, FF_CEIL_RSHIFT(frame->width, h_chroma_shift));
 +        memset(frame->data[2] + frame->linesize[2]*i,
 +               0x80, FF_CEIL_RSHIFT(frame->width, h_chroma_shift));
 +    }
 +}
 +
  /**
   * generic function called after decoding
   * the header and before a frame is decoded.