diff options
author | Mans Rullgard <mans@mansr.com> | 2012-04-12 16:55:49 +0400 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-04-21 21:56:19 +0400 |
commit | 2bcbd98459915baefc15043d02f4a942ebcd33da (patch) | |
tree | 8dc1411f9bab944622c785efbd9c5dc4959b00ee /libavcodec/utils.c | |
parent | 95510be8c35753da8f48062b28b65e7acdab965f (diff) |
Remove lowres video decoding
This feature is complex, of questionable utility, and slows down
normal decoding.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 7caf93f65d..4492486771 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -143,8 +143,8 @@ unsigned avcodec_get_edge_width(void) void avcodec_set_dimensions(AVCodecContext *s, int width, int height){ s->coded_width = width; s->coded_height= height; - s->width = -((-width )>>s->lowres); - s->height= -((-height)>>s->lowres); + s->width = width; + s->height = height; } #define INTERNAL_BUFFER_SIZE (32+1) @@ -228,9 +228,8 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, *width = FFALIGN(*width , w_align); *height= FFALIGN(*height, h_align); - if(s->codec_id == CODEC_ID_H264 || s->lowres) + if (s->codec_id == CODEC_ID_H264) *height+=2; // some of the optimized chroma MC reads one line too much - // which is also done in mpeg decoders with lowres > 0 for (i = 0; i < 4; i++) linesize_align[i] = STRIDE_ALIGN; @@ -741,12 +740,6 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD if (!HAVE_THREADS && !(codec->capabilities & CODEC_CAP_AUTO_THREADS)) avctx->thread_count = 1; - if (avctx->codec->max_lowres < avctx->lowres) { - av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n", - avctx->codec->max_lowres); - ret = AVERROR(EINVAL); - goto free_and_end; - } if (av_codec_is_encoder(avctx->codec)) { int i; if (avctx->codec->sample_fmts) { |