mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 18:02:11 +00:00
mpegvideo: remove useless references to h264 and svq3
The h264 decoder does not use mpegvideo anymore. The svq3 decoder only uses ff_draw_horiz_band().
This commit is contained in:
parent
85a5bc054c
commit
19cac8e301
@ -1029,7 +1029,7 @@ av_cold int ff_MPV_common_init(MpegEncContext *s)
|
|||||||
|
|
||||||
if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
|
if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
|
||||||
s->mb_height = (s->height + 31) / 32 * 2;
|
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;
|
s->mb_height = (s->height + 15) / 16;
|
||||||
|
|
||||||
if (s->avctx->pix_fmt == AV_PIX_FMT_NONE) {
|
if (s->avctx->pix_fmt == AV_PIX_FMT_NONE) {
|
||||||
@ -1235,7 +1235,7 @@ int ff_MPV_common_frame_size_change(MpegEncContext *s)
|
|||||||
// init
|
// init
|
||||||
if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
|
if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
|
||||||
s->mb_height = (s->height + 31) / 32 * 2;
|
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;
|
s->mb_height = (s->height + 15) / 16;
|
||||||
|
|
||||||
if ((s->width || s->height) &&
|
if ((s->width || s->height) &&
|
||||||
@ -1515,7 +1515,6 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
|
|||||||
s->mb_skipped = 0;
|
s->mb_skipped = 0;
|
||||||
|
|
||||||
/* mark & release old frames */
|
/* 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 &&
|
if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr &&
|
||||||
s->last_picture_ptr != s->next_picture_ptr &&
|
s->last_picture_ptr != s->next_picture_ptr &&
|
||||||
s->last_picture_ptr->f.data[0]) {
|
s->last_picture_ptr->f.data[0]) {
|
||||||
@ -1536,7 +1535,6 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!s->encoding) {
|
if (!s->encoding) {
|
||||||
ff_release_unused_pictures(s, 1);
|
ff_release_unused_pictures(s, 1);
|
||||||
@ -1557,9 +1555,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
|
|||||||
|
|
||||||
pic->reference = 0;
|
pic->reference = 0;
|
||||||
if (!s->droppable) {
|
if (!s->droppable) {
|
||||||
if (s->codec_id == AV_CODEC_ID_H264)
|
if (s->pict_type != AV_PICTURE_TYPE_B)
|
||||||
pic->reference = s->picture_structure;
|
|
||||||
else if (s->pict_type != AV_PICTURE_TYPE_B)
|
|
||||||
pic->reference = 3;
|
pic->reference = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1592,7 +1588,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
|
|||||||
s->current_picture_ptr)) < 0)
|
s->current_picture_ptr)) < 0)
|
||||||
return ret;
|
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;
|
s->last_picture_ptr = s->next_picture_ptr;
|
||||||
if (!s->droppable)
|
if (!s->droppable)
|
||||||
s->next_picture_ptr = s->current_picture_ptr;
|
s->next_picture_ptr = s->current_picture_ptr;
|
||||||
@ -1604,7 +1600,6 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
|
|||||||
s->current_picture_ptr ? s->current_picture_ptr->f.data[0] : NULL,
|
s->current_picture_ptr ? s->current_picture_ptr->f.data[0] : NULL,
|
||||||
s->pict_type, s->droppable);
|
s->pict_type, s->droppable);
|
||||||
|
|
||||||
if (s->codec_id != AV_CODEC_ID_H264) {
|
|
||||||
if ((s->last_picture_ptr == NULL ||
|
if ((s->last_picture_ptr == NULL ||
|
||||||
s->last_picture_ptr->f.data[0] == NULL) &&
|
s->last_picture_ptr->f.data[0] == NULL) &&
|
||||||
(s->pict_type != AV_PICTURE_TYPE_I ||
|
(s->pict_type != AV_PICTURE_TYPE_I ||
|
||||||
@ -1660,9 +1655,7 @@ 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, 0);
|
||||||
ff_thread_report_progress(&s->next_picture_ptr->tf, INT_MAX, 1);
|
ff_thread_report_progress(&s->next_picture_ptr->tf, INT_MAX, 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (s->codec_id != AV_CODEC_ID_H264) {
|
|
||||||
if (s->last_picture_ptr) {
|
if (s->last_picture_ptr) {
|
||||||
ff_mpeg_unref_picture(s, &s->last_picture);
|
ff_mpeg_unref_picture(s, &s->last_picture);
|
||||||
if (s->last_picture_ptr->f.data[0] &&
|
if (s->last_picture_ptr->f.data[0] &&
|
||||||
@ -1680,9 +1673,8 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
|
|||||||
|
|
||||||
assert(s->pict_type == AV_PICTURE_TYPE_I || (s->last_picture_ptr &&
|
assert(s->pict_type == AV_PICTURE_TYPE_I || (s->last_picture_ptr &&
|
||||||
s->last_picture_ptr->f.data[0]));
|
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;
|
int i;
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
if (s->picture_structure == PICT_BOTTOM_FIELD) {
|
if (s->picture_structure == PICT_BOTTOM_FIELD) {
|
||||||
@ -1788,7 +1780,7 @@ void ff_MPV_frame_end(MpegEncContext *s)
|
|||||||
#endif
|
#endif
|
||||||
s->avctx->coded_frame = &s->current_picture_ptr->f;
|
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);
|
ff_thread_report_progress(&s->current_picture_ptr->tf, INT_MAX, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2298,8 +2290,7 @@ void ff_draw_horiz_band(AVCodecContext *avctx, DSPContext *dsp, Picture *cur,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (cur->f.pict_type == AV_PICTURE_TYPE_B &&
|
if (cur->f.pict_type == AV_PICTURE_TYPE_B &&
|
||||||
picture_structure == PICT_FRAME &&
|
picture_structure == PICT_FRAME &&
|
||||||
avctx->codec_id != AV_CODEC_ID_H264 &&
|
|
||||||
avctx->codec_id != AV_CODEC_ID_SVQ3) {
|
avctx->codec_id != AV_CODEC_ID_SVQ3) {
|
||||||
for (i = 0; i < AV_NUM_DATA_POINTERS; i++)
|
for (i = 0; i < AV_NUM_DATA_POINTERS; i++)
|
||||||
offset[i] = 0;
|
offset[i] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user