Limit output sample to 0..maxval, fixes decoding of T16E0.JLS
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 6 Nov 2006 05:35:09 +0000 (05:35 +0000)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 6 Nov 2006 05:35:09 +0000 (05:35 +0000)
Originally committed as revision 6908 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/jpeg_ls.c

index 6f6d109..1b4df2b 100644 (file)
@@ -384,6 +384,7 @@ static inline void ls_decode_line(JLSState *state, MJpegDecodeContext *s, void *
             pred = clip(pred, 0, state->maxval);
         }
 
+        pred &= state->maxval;
         W(dst, x, pred);
         x += stride;
     }