summaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 31649ca..5af3515 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -149,8 +149,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)
@@ -239,9 +239,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;
@@ -844,6 +843,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
ret = AVERROR(EINVAL);
goto free_and_end;
}
+
if (av_codec_is_encoder(avctx->codec)) {
int i;
if (avctx->codec->sample_fmts) {
OpenPOWER on IntegriCloud