comparison vqavideo.c @ 4245:4397b7436222 libavcodec

VQA v1 support
author kostya
date Wed, 29 Nov 2006 05:40:37 +0000
parents 8d1744586070
children 05e932ddaaa9
comparison
equal deleted inserted replaced
4244:54b594d31ac1 4245:4397b7436222
469 switch (s->vqa_version) { 469 switch (s->vqa_version) {
470 470
471 case 1: 471 case 1:
472 /* still need sample media for this case (only one game, "Legend of 472 /* still need sample media for this case (only one game, "Legend of
473 * Kyrandia III : Malcolm's Revenge", is known to use this version) */ 473 * Kyrandia III : Malcolm's Revenge", is known to use this version) */
474 lines = 0; 474 lobyte = s->decode_buffer[lobytes * 2];
475 hibyte = s->decode_buffer[(lobytes * 2) + 1];
476 vector_index = ((hibyte << 8) | lobyte) >> 3;
477 vector_index <<= index_shift;
478 lines = s->vector_height;
479 /* uniform color fill - a quick hack */
480 if (hibyte == 0xFF) {
481 while (lines--) {
482 s->frame.data[0][pixel_ptr + 0] = 255 - lobyte;
483 s->frame.data[0][pixel_ptr + 1] = 255 - lobyte;
484 s->frame.data[0][pixel_ptr + 2] = 255 - lobyte;
485 s->frame.data[0][pixel_ptr + 3] = 255 - lobyte;
486 pixel_ptr += s->frame.linesize[0];
487 }
488 lines=0;
489 }
475 break; 490 break;
476 491
477 case 2: 492 case 2:
478 lobyte = s->decode_buffer[lobytes]; 493 lobyte = s->decode_buffer[lobytes];
479 hibyte = s->decode_buffer[hibytes]; 494 hibyte = s->decode_buffer[hibytes];