From 2bcbd98459915baefc15043d02f4a942ebcd33da Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Thu, 12 Apr 2012 13:55:49 +0100 Subject: Remove lowres video decoding This feature is complex, of questionable utility, and slows down normal decoding. Signed-off-by: Mans Rullgard --- libavcodec/mpeg12.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'libavcodec/mpeg12.c') diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 8cdc704c73..40ba97b0d0 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1631,7 +1631,6 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y, const uint8_t **buf, int buf_size) { AVCodecContext *avctx = s->avctx; - const int lowres = s->avctx->lowres; const int field_pic = s->picture_structure != PICT_FRAME; s->resync_mb_x = @@ -1752,14 +1751,14 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y, } } - s->dest[0] += 16 >> lowres; - s->dest[1] +=(16 >> lowres) >> s->chroma_x_shift; - s->dest[2] +=(16 >> lowres) >> s->chroma_x_shift; + s->dest[0] += 16; + s->dest[1] += 16 >> s->chroma_x_shift; + s->dest[2] += 16 >> s->chroma_x_shift; ff_MPV_decode_mb(s, s->block); if (++s->mb_x >= s->mb_width) { - const int mb_size = 16 >> s->avctx->lowres; + const int mb_size = 16; ff_draw_horiz_band(s, mb_size*(s->mb_y >> field_pic), mb_size); ff_MPV_report_decode_progress(s); @@ -2508,7 +2507,6 @@ AVCodec ff_mpeg1video_decoder = { CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, .flush = flush, - .max_lowres = 3, .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), .update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg_decode_update_thread_context) }; @@ -2525,7 +2523,6 @@ AVCodec ff_mpeg2video_decoder = { CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, .flush = flush, - .max_lowres = 3, .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"), .profiles = NULL_IF_CONFIG_SMALL(mpeg2_video_profiles), }; -- cgit v1.2.3