diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-08-30 20:39:12 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-08-30 20:39:12 +0000 |
commit | d3b4b74c32cf302d36a4c4d2cce08027f0a22560 (patch) | |
tree | 247b8e4897c65992a3e6d24793180b2ab06c365a /libavcodec | |
parent | c979fa030f34ed28636fb06dd8849d24c8cfcba0 (diff) | |
download | ffmpeg-streaming-d3b4b74c32cf302d36a4c4d2cce08027f0a22560.zip ffmpeg-streaming-d3b4b74c32cf302d36a4c4d2cce08027f0a22560.tar.gz |
Fix lossless jpeg encoder to comply to spec and store full redundant
residuals, Note this does not change RGB32 as we need to check this
against some decoder that supports it.
Originally committed as revision 15055 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ljpegenc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c index 7ac013e..bb33aba 100644 --- a/libavcodec/ljpegenc.c +++ b/libavcodec/ljpegenc.c @@ -141,9 +141,9 @@ static int encode_picture_lossless(AVCodecContext *avctx, unsigned char *buf, in } if(i==0) - ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly + ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly else - ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_chrominance, m->huff_code_dc_chrominance); + ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance); } } } @@ -164,9 +164,9 @@ static int encode_picture_lossless(AVCodecContext *avctx, unsigned char *buf, in PREDICT(pred, ptr[-linesize-1], ptr[-linesize], ptr[-1], predictor); if(i==0) - ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly + ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_luminance, m->huff_code_dc_luminance); //FIXME ugly else - ff_mjpeg_encode_dc(s, (int8_t)(*ptr - pred), m->huff_size_dc_chrominance, m->huff_code_dc_chrominance); + ff_mjpeg_encode_dc(s, *ptr - pred, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance); } } } |