summaryrefslogtreecommitdiff
path: root/libavcodec/vqavideo.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2006-11-29 05:40:37 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2006-11-29 05:40:37 +0000
commit7667896a364edf67bfd2149a27bbc8f4a224ced5 (patch)
treeeb8cc5aff5b299126881a7fa7401ca63df42d72c /libavcodec/vqavideo.c
parentf39020269e387b1aadbef1ebf23aa04dc662710f (diff)
VQA v1 support
Originally committed as revision 7183 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vqavideo.c')
-rw-r--r--libavcodec/vqavideo.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index 2a546d8a6f..912ced0df8 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -471,7 +471,22 @@ static void vqa_decode_chunk(VqaContext *s)
case 1:
/* still need sample media for this case (only one game, "Legend of
* Kyrandia III : Malcolm's Revenge", is known to use this version) */
- lines = 0;
+ lobyte = s->decode_buffer[lobytes * 2];
+ hibyte = s->decode_buffer[(lobytes * 2) + 1];
+ vector_index = ((hibyte << 8) | lobyte) >> 3;
+ vector_index <<= index_shift;
+ lines = s->vector_height;
+ /* uniform color fill - a quick hack */
+ if (hibyte == 0xFF) {
+ while (lines--) {
+ s->frame.data[0][pixel_ptr + 0] = 255 - lobyte;
+ s->frame.data[0][pixel_ptr + 1] = 255 - lobyte;
+ s->frame.data[0][pixel_ptr + 2] = 255 - lobyte;
+ s->frame.data[0][pixel_ptr + 3] = 255 - lobyte;
+ pixel_ptr += s->frame.linesize[0];
+ }
+ lines=0;
+ }
break;
case 2: