Merge commit '19cac8e301419dcde31526d15196a952ddf2c4c7'

* commit '19cac8e301419dcde31526d15196a952ddf2c4c7':
  mpegvideo: remove useless references to h264 and svq3

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-03-13 12:56:43 +01:00
commit f45fdb123f

View File

@ -1027,7 +1027,7 @@ av_cold int ff_MPV_common_init(MpegEncContext *s)
if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
s->mb_height = (s->height + 31) / 32 * 2;
else if (s->codec_id != AV_CODEC_ID_H264)
else
s->mb_height = (s->height + 15) / 16;
if (s->avctx->pix_fmt == AV_PIX_FMT_NONE) {
@ -1222,7 +1222,7 @@ int ff_MPV_common_frame_size_change(MpegEncContext *s)
// init
if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
s->mb_height = (s->height + 31) / 32 * 2;
else if (s->codec_id != AV_CODEC_ID_H264)
else
s->mb_height = (s->height + 15) / 16;
if ((s->width || s->height) &&
@ -1531,7 +1531,6 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
}
/* mark & release old frames */
if (s->out_format != FMT_H264 || s->codec_id == AV_CODEC_ID_SVQ3) {
if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr &&
s->last_picture_ptr != s->next_picture_ptr &&
s->last_picture_ptr->f.data[0]) {
@ -1552,7 +1551,6 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
}
}
}
}
if (!s->encoding) {
ff_release_unused_pictures(s, 1);
@ -1573,9 +1571,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
pic->reference = 0;
if (!s->droppable) {
if (s->codec_id == AV_CODEC_ID_H264)
pic->reference = s->picture_structure;
else if (s->pict_type != AV_PICTURE_TYPE_B)
if (s->pict_type != AV_PICTURE_TYPE_B)
pic->reference = 3;
}
@ -1608,7 +1604,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
s->current_picture_ptr)) < 0)
return ret;
if (s->codec_id != AV_CODEC_ID_H264 && s->pict_type != AV_PICTURE_TYPE_B) {
if (s->pict_type != AV_PICTURE_TYPE_B) {
s->last_picture_ptr = s->next_picture_ptr;
if (!s->droppable)
s->next_picture_ptr = s->current_picture_ptr;
@ -1620,7 +1616,6 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
s->current_picture_ptr ? s->current_picture_ptr->f.data[0] : NULL,
s->pict_type, s->droppable);
if (s->codec_id != AV_CODEC_ID_H264) {
if ((s->last_picture_ptr == NULL ||
s->last_picture_ptr->f.data[0] == NULL) &&
(s->pict_type != AV_PICTURE_TYPE_I ||
@ -1682,13 +1677,11 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
ff_thread_report_progress(&s->next_picture_ptr->tf, INT_MAX, 0);
ff_thread_report_progress(&s->next_picture_ptr->tf, INT_MAX, 1);
}
}
#if 0 // BUFREF-FIXME
memset(s->last_picture.f.data, 0, sizeof(s->last_picture.f.data));
memset(s->next_picture.f.data, 0, sizeof(s->next_picture.f.data));
#endif
if (s->codec_id != AV_CODEC_ID_H264) {
if (s->last_picture_ptr) {
ff_mpeg_unref_picture(s, &s->last_picture);
if (s->last_picture_ptr->f.data[0] &&
@ -1706,9 +1699,8 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
assert(s->pict_type == AV_PICTURE_TYPE_I || (s->last_picture_ptr &&
s->last_picture_ptr->f.data[0]));
}
if (s->picture_structure!= PICT_FRAME && s->out_format != FMT_H264) {
if (s->picture_structure!= PICT_FRAME) {
int i;
for (i = 0; i < 4; i++) {
if (s->picture_structure == PICT_BOTTOM_FIELD) {
@ -1816,7 +1808,7 @@ void ff_MPV_frame_end(MpegEncContext *s)
#endif
s->avctx->coded_frame = &s->current_picture_ptr->f;
if (s->codec_id != AV_CODEC_ID_H264 && s->current_picture.reference)
if (s->current_picture.reference)
ff_thread_report_progress(&s->current_picture_ptr->tf, INT_MAX, 0);
}
@ -2998,8 +2990,7 @@ void ff_draw_horiz_band(AVCodecContext *avctx, DSPContext *dsp, Picture *cur,
return;
if (cur->f.pict_type == AV_PICTURE_TYPE_B &&
picture_structure == PICT_FRAME &&
avctx->codec_id != AV_CODEC_ID_H264 &&
picture_structure == PICT_FRAME &&
avctx->codec_id != AV_CODEC_ID_SVQ3) {
for (i = 0; i < AV_NUM_DATA_POINTERS; i++)
offset[i] = 0;