[FFmpeg-cvslog] sgienc: Do not end RLE lines with 0s

Vittorio Giovara git at videolan.org
Sun Nov 29 15:42:43 CET 2015


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Fri Nov 20 02:17:31 2015 +0100| [99f40fd02f1870c2dee70977b672da9cb198f0be] | committer: Vittorio Giovara

sgienc: Do not end RLE lines with 0s

This is never mentioned in the specifications, and decoders work
just as fine without it. Update the fate references since the compressed
file is smaller.

Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99f40fd02f1870c2dee70977b672da9cb198f0be
---

 libavcodec/sgienc.c     |    3 +--
 tests/ref/lavf/sgi      |    4 ++--
 tests/ref/seek/lavf-sgi |    2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c
index b88f6c3..e7aa394 100644
--- a/libavcodec/sgienc.c
+++ b/libavcodec/sgienc.c
@@ -171,8 +171,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
                 }
 
                 buf += length;
-                bytestream_put_byte(&buf, 0);
-                bytestream_put_be32(&lengthtab, length + 1);
+                bytestream_put_be32(&lengthtab, length);
                 in_buf -= p->linesize[0];
             }
         }
diff --git a/tests/ref/lavf/sgi b/tests/ref/lavf/sgi
index b0cd303..703b83c 100644
--- a/tests/ref/lavf/sgi
+++ b/tests/ref/lavf/sgi
@@ -1,3 +1,3 @@
-7054acafd275e51cec28d4518e213081 *./tests/data/images/sgi/02.sgi
+d446e540a7c18da5fd3cc0e9942cd46f *./tests/data/images/sgi/02.sgi
 ./tests/data/images/sgi/%02d.sgi CRC=0x28c7369b
-308151 ./tests/data/images/sgi/02.sgi
+307287 ./tests/data/images/sgi/02.sgi
diff --git a/tests/ref/seek/lavf-sgi b/tests/ref/seek/lavf-sgi
index b2f605a..04c7b2b 100644
--- a/tests/ref/seek/lavf-sgi
+++ b/tests/ref/seek/lavf-sgi
@@ -1,4 +1,4 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:     -1 size:308336
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:     -1 size:307472
 ret:-EINVAL    st:-1 flags:0  ts:-1.000000
 ret:-EINVAL    st:-1 flags:1  ts: 1.894167
 ret:-EINVAL    st: 0 flags:0  ts: 0.800000



More information about the ffmpeg-cvslog mailing list