aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/rle.c
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 /libavcodec/rle.c
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
Diffstat (limited to 'libavcodec/rle.c')
-rw-r--r--libavcodec/rle.c4
1 files changed, 2 insertions, 2 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,