Mercurial > mplayer.hg
diff dec_video.c @ 2827:b4d46817f050
ms video1 (cram) codecs by Mike Melanson <melanson@pcisys.net>
author | arpi |
---|---|
date | Sun, 11 Nov 2001 13:35:00 +0000 |
parents | 411be2ac50ae |
children | 757c3ab1a45a |
line wrap: on
line diff
--- a/dec_video.c Sun Nov 11 13:25:06 2001 +0000 +++ b/dec_video.c Sun Nov 11 13:35:00 2001 +0000 @@ -86,6 +86,23 @@ void AVI_Decode_RLE8(char *image,char *delta,int tdsize, unsigned int *map,int imagex,int imagey,unsigned char x11_bytes_pixel); +void AVI_Decode_Video1_16( + char *encoded, + int encoded_size, + char *decoded, + int width, + int height, + int bytes_per_pixel); + +void AVI_Decode_Video1_8( + char *encoded, + int encoded_size, + char *decoded, + int width, + int height, + unsigned char *palette_map, + int bytes_per_pixel); + //**************************************************************************// // The OpenDivX stuff: //**************************************************************************// @@ -251,7 +268,7 @@ switch(sh_video->codec->driver){ case VFM_XANIM: { #ifdef USE_XANIM - int ret=xacodec_init_video(sh_video,out_fmt); + int ret=xacodec_init_video(sh_video,out_fmt); if(!ret) return 0; #else // mp_msg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_NoXAnimSupport); @@ -450,6 +467,12 @@ } } break; + case VFM_MSVIDC: { + int bpp=((out_fmt&255)+7)/8; // RGB only + sh_video->our_out_buffer = + (char*)memalign(64, sh_video->disp_w*sh_video->disp_h*bpp); // FIXME!!! + } + break; } } sh_video->inited=1; @@ -681,6 +704,19 @@ sh_video->disp_w,sh_video->disp_h,((out_fmt&255)+7)/8); blit_frame=3; break; + case VFM_MSVIDC: + if (sh_video->bih->biBitCount == 16) + AVI_Decode_Video1_16( + start, in_size, sh_video->our_out_buffer, + sh_video->disp_w, sh_video->disp_h, + ((out_fmt&255)+7)/8); + else + AVI_Decode_Video1_8( + start, in_size, sh_video->our_out_buffer, + sh_video->disp_w, sh_video->disp_h, + (char *)sh_video->bih+40, ((out_fmt&255)+7)/8); + blit_frame = 3; + break; } // switch //------------------------ frame decoded. -------------------- @@ -727,3 +763,4 @@ return blit_frame; } +