Mercurial > libavcodec.hg
diff targaenc.c @ 4771:7cd3ffe4897f libavcodec
Changed the rle encoder a little and made it more universal.
Not only the repeated byte is calculated as (count ^ xor) + add
but also the raw encoding lenth byte is calculated as that too
patch by Xiaohui Sun sunxiaohui dsp ac cn
| author | michael |
|---|---|
| date | Tue, 03 Apr 2007 06:40:21 +0000 |
| parents | a3667e74f44b |
| children | 2b72f9bc4f06 |
line wrap: on
line diff
--- a/targaenc.c Tue Apr 03 02:18:00 2007 +0000 +++ b/targaenc.c Tue Apr 03 06:40:21 2007 +0000 @@ -41,7 +41,7 @@ out = outbuf; for(y = 0; y < h; y ++) { - ret = ff_rle_encode(out, out_size, pic->data[0] + pic->linesize[0] * y, bpp, w, 0x7f, 0); + ret = ff_rle_encode(out, out_size, pic->data[0] + pic->linesize[0] * y, bpp, w, 0x7f, 0, -1, 0); if(ret == -1){ return -1; }
