diff options
author | melanson <melanson@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-20 01:35:02 +0000 |
---|---|---|
committer | melanson <melanson@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-20 01:35:02 +0000 |
commit | ff84d71eec3950b774498c2e91eb9af165a15842 (patch) | |
tree | a491f3df2440991b67e669c7c063973af76a3e90 /dec_video.c | |
parent | 6743a5984e533e04b10b7b6a32bd5a101cf770ae (diff) | |
download | mpv-ff84d71eec3950b774498c2e91eb9af165a15842.tar.bz2 mpv-ff84d71eec3950b774498c2e91eb9af165a15842.tar.xz |
initial implementation of SMC codec; it almost works, too!
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4276 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dec_video.c')
-rw-r--r-- | dec_video.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/dec_video.c b/dec_video.c index b961f2d0ec..94e4982569 100644 --- a/dec_video.c +++ b/dec_video.c @@ -157,13 +157,15 @@ void decode_cyuv( int height, int bit_per_pixel); +int qt_init_decode_smc(void); + void qt_decode_smc( unsigned char *encoded, int encoded_size, unsigned char *decoded, int width, int height, - int encoded_bpp, + unsigned char *palette_map, int bytes_per_pixel); //**************************************************************************// @@ -602,7 +604,6 @@ switch(sh_video->codec->driver){ case VFM_MSVIDC: case VFM_FLI: case VFM_QTRLE: - case VFM_QTSMC: { #ifdef USE_MP_IMAGE sh_video->image->type=MP_IMGTYPE_STATIC; @@ -620,6 +621,19 @@ if ((sh_video->codec->driver == VFM_QTRLE) && (sh_video->bih->biBitCount != 24)) break; } + case VFM_QTSMC: + { + if (qt_init_decode_smc() != 0) + mp_msg(MSGT_DECVIDEO, MSGL_ERR, "SMC decoder could not allocate enough memory"); +#ifdef USE_MP_IMAGE + sh_video->image->type=MP_IMGTYPE_STATIC; +#else + 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!!! +#endif + break; + } case VFM_NUV: #ifdef USE_MP_IMAGE sh_video->image->type=MP_IMGTYPE_STATIC; @@ -959,7 +973,7 @@ if(verbose>1){ qt_decode_smc( start, in_size, sh_video->our_out_buffer, sh_video->disp_w, sh_video->disp_h, - sh_video->bih->biBitCount, + (unsigned char *)sh_video->bih+40, ((out_fmt&255)+7)/8); blit_frame = 3; break; |