From 3cb32e3d1fb6c058bf6b3ce45d5e758a4608c847 Mon Sep 17 00:00:00 2001 From: Arpi Date: Sat, 9 Feb 2002 01:25:06 +0000 Subject: [PATCH] PATCH by Rik Snel this includes the range for quantized dct coefficients in dct_quantize() (-1023...1023) Originally committed as revision 291 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/i386/mpegvideo_mmx_template.c | 4 ++++ libavcodec/mpegvideo.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/libavcodec/i386/mpegvideo_mmx_template.c b/libavcodec/i386/mpegvideo_mmx_template.c index ffe5c848af..2b33229159 100644 --- a/libavcodec/i386/mpegvideo_mmx_template.c +++ b/libavcodec/i386/mpegvideo_mmx_template.c @@ -48,6 +48,10 @@ static int RENAME(dct_quantize)(MpegEncContext *s, /* mpeg1 */ minLevel= -255; maxLevel= 255; + }else if(s->out_format==FMT_MJPEG){ + /* (m)jpeg */ + minLevel= -1023; + maxLevel= 1023; }else{ /* h263 / msmpeg4 */ minLevel= -128; diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index f43588cf45..72b8058a22 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1079,6 +1079,10 @@ static int dct_quantize_c(MpegEncContext *s, /* mpeg1 */ minLevel= -255; maxLevel= 255; + }else if(s->out_format==FMT_MJPEG){ + /* (m)jpeg */ + minLevel= -1023; + maxLevel= 1023; }else{ /* h263 / msmpeg4 */ minLevel= -128;