[Ffmpeg-cvslog] r7183 - trunk/libavcodec/vqavideo.c

kostya subversion
Wed Nov 29 06:40:38 CET 2006


Author: kostya
Date: Wed Nov 29 06:40:37 2006
New Revision: 7183

Modified:
   trunk/libavcodec/vqavideo.c

Log:
VQA v1 support

Modified: trunk/libavcodec/vqavideo.c
==============================================================================
--- trunk/libavcodec/vqavideo.c	(original)
+++ trunk/libavcodec/vqavideo.c	Wed Nov 29 06:40:37 2006
@@ -471,7 +471,22 @@
             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:




More information about the ffmpeg-cvslog mailing list