diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-11 13:35:00 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-11 13:35:00 +0000 |
commit | 72c07064bd85402dcf2ef2f0e2e40e5e5da4d3fa (patch) | |
tree | 80c9159ef0d5276c5da70bacbb6cdfc13ba87bb1 /dec_video.c | |
parent | 28695eedd88737c462e3f9980be4a40377e2d2b3 (diff) | |
download | mpv-72c07064bd85402dcf2ef2f0e2e40e5e5da4d3fa.tar.bz2 mpv-72c07064bd85402dcf2ef2f0e2e40e5e5da4d3fa.tar.xz |
ms video1 (cram) codecs by Mike Melanson <melanson@pcisys.net>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2828 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dec_video.c')
-rw-r--r-- | dec_video.c | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/dec_video.c b/dec_video.c index 16d313b3e4..caef76dd90 100644 --- a/dec_video.c +++ b/dec_video.c @@ -86,6 +86,23 @@ int divx_quality=0; 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 @@ sh_video->our_out_buffer=NULL; 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 @@ switch(sh_video->codec->driver){ } } 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 @@ if(verbose>1){ 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 @@ case 2: return blit_frame; } + |