OSDN Git Service

Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 7 Mar 2013 10:50:17 +0000 (11:50 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 7 Mar 2013 10:50:17 +0000 (11:50 +0100)
* qatar/master:
  lavc: Deprecate the deinterlace functions in libavcodec
  h264: Integrate draw_horiz_band into ff_h264_draw_horiz_band

Conflicts:
configure
ffmpeg_opt.c
libavcodec/avcodec.h
libavcodec/h264.c
libavcodec/imgconvert.c
libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
ffmpeg.c
libavcodec/avcodec.h
libavcodec/h264.c
libavcodec/version.h

diff --cc ffmpeg.c
+++ b/ffmpeg.c
@@@ -1657,25 -1180,12 +1659,27 @@@ static int decode_video(InputStream *is
          return ret;
      }
  
 -    decoded_frame->pts = guess_correct_pts(&ist->pts_ctx, decoded_frame->pkt_pts,
 -                                           decoded_frame->pkt_dts);
 +    if(ist->top_field_first>=0)
 +        decoded_frame->top_field_first = ist->top_field_first;
 +
 +    best_effort_timestamp= av_frame_get_best_effort_timestamp(decoded_frame);
 +    if(best_effort_timestamp != AV_NOPTS_VALUE)
 +        ist->next_pts = ist->pts = av_rescale_q(decoded_frame->pts = best_effort_timestamp, ist->st->time_base, AV_TIME_BASE_Q);
 +
 +    if (debug_ts) {
 +        av_log(NULL, AV_LOG_INFO, "decoder -> ist_index:%d type:video "
 +                "frame_pts:%s frame_pts_time:%s best_effort_ts:%"PRId64" best_effort_ts_time:%s keyframe:%d frame_type:%d \n",
 +                ist->st->index, av_ts2str(decoded_frame->pts),
 +                av_ts2timestr(decoded_frame->pts, &ist->st->time_base),
 +                best_effort_timestamp,
 +                av_ts2timestr(best_effort_timestamp, &ist->st->time_base),
 +                decoded_frame->key_frame, decoded_frame->pict_type);
 +    }
 +
      pkt->size = 0;
+ #if FF_API_DEINTERLACE
      pre_process_video_frame(ist, (AVPicture *)decoded_frame, &buffer_to_free);
+ #endif
  
      rate_emu_sleep(ist);
  
@@@ -4624,8 -4276,9 +4625,9 @@@ int avpicture_get_size(enum AVPixelForm
  attribute_deprecated
  int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
                            enum AVPixelFormat pix_fmt, int width, int height);
+ #endif
  /**
 - * Copy image src to dst. Wraps av_picture_data_copy() above.
 + * Copy image src to dst. Wraps av_image_copy().
   */
  void av_picture_copy(AVPicture *dst, const AVPicture *src,
                       enum AVPixelFormat pix_fmt, int width, int height);
@@@ -185,17 -165,8 +187,9 @@@ void ff_h264_draw_horiz_band(H264Contex
      }
  }
  
- void ff_h264_draw_horiz_band(H264Context *h, int y, int height)
- {
-     draw_horiz_band(h->avctx, &h->cur_pic,
-                     h->ref_list[0][0].f.data[0] ? &h->ref_list[0][0] : NULL,
-                     y, height, h->picture_structure, h->first_field,
-                     h->low_delay);
- }
  static void free_frame_buffer(H264Context *h, Picture *pic)
  {
 +    pic->period_since_free = 0;
      ff_thread_release_buffer(h->avctx, &pic->f);
      av_freep(&pic->f.hwaccel_picture_private);
  }
Simple merge