aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-30 17:27:58 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-30 17:27:58 +0000
commite516d3488ab46823389113aec5386eb5e4365d64 (patch)
treec7c80adccf6e140b26b7477d9fddb73455269dd9
parentfe790f89e81e489b941caae278cb2fac163a4595 (diff)
downloadffmpeg-e516d3488ab46823389113aec5386eb5e4365d64.tar.gz
change rle encoder to count up to 127, sgi does not support 128
Originally committed as revision 12631 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/rle.c4
-rw-r--r--tests/libav.regression.ref6
2 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/rle.c b/libavcodec/rle.c
index 2fb0d0e486..802f7f34a5 100644
--- a/libavcodec/rle.c
+++ b/libavcodec/rle.c
@@ -35,12 +35,12 @@ static int count_pixels(const uint8_t *start, int len, int bpp, int same)
const uint8_t *pos;
int count = 1;
- for(pos = start + bpp; count < FFMIN(128, len); pos += bpp, count ++) {
+ for(pos = start + bpp; count < FFMIN(127, len); pos += bpp, count ++) {
if(same != !memcmp(pos-bpp, pos, bpp)) {
if(!same) {
/* if bpp == 1, then 0 1 1 0 is more efficiently encoded as a single
* raw block of pixels. for larger bpp, RLE is as good or better */
- if(bpp == 1 && count + 1 < FFMIN(128, len) && *pos != *(pos+1))
+ if(bpp == 1 && count + 1 < FFMIN(127, len) && *pos != *(pos+1))
continue;
/* if RLE can encode the next block better than as a raw block,
diff --git a/tests/libav.regression.ref b/tests/libav.regression.ref
index 7a555c16bc..1ce4c181b0 100644
--- a/tests/libav.regression.ref
+++ b/tests/libav.regression.ref
@@ -58,9 +58,9 @@ c3a9f333ddebff6eae3f4360bad2de29 *./tests/data/b-libav02.bmp
./tests/data/b-libav%02d.tga CRC=0xf3a66ecf
f558eef0740c4b247f1eb17e1dbf7adf *./tests/data/b-libav02.tga
./tests/data/b-libav%02d.tiff CRC=0x25c06ecf
-3076b16ac0c8a39a796e69944f6a40dc *./tests/data/b-libav02.tiff
-./tests/data/b-libav%02d.sgi CRC=0x00000001
-c6cab058a2b0a33ee843bd096b280075 *./tests/data/b-libav02.sgi
+7211a09803f104e59196bc712a819e69 *./tests/data/b-libav02.tiff
+./tests/data/b-libav%02d.sgi CRC=0x25c06ecf
+50a1d8ca27813084e20b7ae0b8f9d663 *./tests/data/b-libav02.sgi
./tests/data/b-libav%02d.jpg CRC=0x62328baa
5d6c53e5297c4485e26c25e37885376f *./tests/data/b-libav02.jpg
b0a8c8063d81921db5d7c8f50a1cc454 *./tests/data/b-libav.wav