[FFmpeg-cvslog] iff decoder: initialise HAM line decoder with first palette entry

Peter Ross git at videolan.org
Sun Nov 25 14:47:52 CET 2012


ffmpeg | branch: master | Peter Ross <pross at xvid.org> | Sun Nov 25 22:04:11 2012 +1100| [fdd71cf04c4fdcea0af911d808687c07d150fee2] | committer: Michael Niedermayer

iff decoder: initialise HAM line decoder with first palette entry

The palette is organised into 'hold' and 'modify' pairs, hence why
the first palette entry is pal[1].

Fixes ticket #1701.

Signed-off-by: Peter Ross <pross at xvid.org>
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/iff.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index 7fa0d52..a52a1bc 100644
--- a/libavcodec/iff.c
+++ b/libavcodec/iff.c
@@ -428,7 +428,7 @@ static void decodeplane32(uint32_t *dst, const uint8_t *buf, int buf_size, int p
 static void decode_ham_plane32(uint32_t *dst, const uint8_t  *buf,
                                const uint32_t *const pal, unsigned buf_size)
 {
-    uint32_t delta = 0;
+    uint32_t delta = pal[1]; /* first palette entry */
     do {
         uint32_t first, second;
         DECODE_HAM_PLANE32(0);



More information about the ffmpeg-cvslog mailing list