]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
change rle encoder to count up to 127, sgi does not support 128
authorbcoudurier <bcoudurier@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 30 Mar 2008 17:27:58 +0000 (17:27 +0000)
committerbcoudurier <bcoudurier@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 30 Mar 2008 17:27:58 +0000 (17:27 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12631 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/rle.c
tests/libav.regression.ref

index 2fb0d0e4862f6452af0c556e80d6fac69806affc..802f7f34a51aefffe5daa07ddf9c584a308465df 100644 (file)
@@ -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,
index 7a555c16bc3df9422197dacbd04c164fdb2a7c31..1ce4c181b048a2b28b066ed30fd71ca2d0405d3f 100644 (file)
@@ -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