diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | codec-cfg.c | 1 | ||||
-rw-r--r-- | codec-cfg.h | 1 | ||||
-rw-r--r-- | dec_video.c | 18 | ||||
-rw-r--r-- | etc/codecs.conf | 8 | ||||
-rw-r--r-- | qtsmc.c | 21 |
6 files changed, 50 insertions, 1 deletions
@@ -27,7 +27,7 @@ MANDIR = ${prefix}/man # a BSD compatible 'install' program INSTALL = install -SRCS_COMMON = cyuv.c adpcm.c xacodec.c cpudetect.c mp_msg.c ac3-iec958.c dec_audio.c dec_video.c msvidc.c cinepak.c fli.c qtrle.c codec-cfg.c cfgparser.c my_profile.c RTjpegN.c minilzo.c nuppelvideo.c spudec.c playtree.c playtreeparser.c asxparser.c +SRCS_COMMON = cyuv.c adpcm.c xacodec.c cpudetect.c mp_msg.c ac3-iec958.c dec_audio.c dec_video.c msvidc.c cinepak.c fli.c qtrle.c codec-cfg.c cfgparser.c my_profile.c RTjpegN.c minilzo.c nuppelvideo.c spudec.c playtree.c playtreeparser.c asxparser.c qtsmc.c SRCS_MENCODER = mencoder.c $(SRCS_COMMON) libao2/afmt.c divx4_vbr.c libvo/aclib.c libvo/img_format.c libvo/osd.c SRCS_MPLAYER = mplayer.c $(SRCS_COMMON) find_sub.c subreader.c lirc_mp.c mixer.c vobsub.c diff --git a/codec-cfg.c b/codec-cfg.c index e44f7a1a70..1dffb4651c 100644 --- a/codec-cfg.c +++ b/codec-cfg.c @@ -241,6 +241,7 @@ static short get_driver(char *s,int audioflag) "qtrle", "nuv", "cyuv", + "qtsmc", NULL }; char **drv=audioflag?audiodrv:videodrv; diff --git a/codec-cfg.h b/codec-cfg.h index 83f6bf7927..bc027a152e 100644 --- a/codec-cfg.h +++ b/codec-cfg.h @@ -53,6 +53,7 @@ #define VFM_QTRLE 14 #define VFM_NUV 15 #define VFM_CYUV 16 +#define VFM_QTSMC 17 #ifndef GUID_TYPE #define GUID_TYPE diff --git a/dec_video.c b/dec_video.c index 1dc26dfc33..b961f2d0ec 100644 --- a/dec_video.c +++ b/dec_video.c @@ -157,6 +157,15 @@ void decode_cyuv( int height, int bit_per_pixel); +void qt_decode_smc( + unsigned char *encoded, + int encoded_size, + unsigned char *decoded, + int width, + int height, + int encoded_bpp, + int bytes_per_pixel); + //**************************************************************************// // The OpenDivX stuff: //**************************************************************************// @@ -593,6 +602,7 @@ 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; @@ -945,6 +955,14 @@ if(verbose>1){ ((out_fmt&255)+7)/8); blit_frame = 3; break; + case VFM_QTSMC: + qt_decode_smc( + start, in_size, sh_video->our_out_buffer, + sh_video->disp_w, sh_video->disp_h, + sh_video->bih->biBitCount, + ((out_fmt&255)+7)/8); + blit_frame = 3; + break; case VFM_CYUV: decode_cyuv(start, in_size, sh_video->our_out_buffer, sh_video->disp_w, sh_video->disp_h, (out_fmt==IMGFMT_YUY2)?16:(out_fmt&255)); diff --git a/etc/codecs.conf b/etc/codecs.conf index eb4f321c03..89d43e5183 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -328,6 +328,14 @@ videocodec cyuv driver cyuv out UYVY +videocodec qtsmc + info "Apple Graphics (SMC) codec" + status buggy +; codec fourcc = "smc " + format 0x20636d73 + driver qtsmc + out BGR32,BGR24 + audiocodec imaadpcm info "IMA ADPCM" status working diff --git a/qtsmc.c b/qtsmc.c new file mode 100644 index 0000000000..1ba20474f3 --- /dev/null +++ b/qtsmc.c @@ -0,0 +1,21 @@ +/* + Apple Graphics (SMC) Decoder for MPlayer + by Mike Melanson +*/ + +#include "config.h" +#include "bswap.h" + +#define BE_16(x) (be2me_16(*(unsigned short *)(x))) +#define BE_32(x) (be2me_32(*(unsigned int *)(x))) + +void qt_decode_smc( + unsigned char *encoded, + int encoded_size, + unsigned char *decoded, + int width, + int height, + int bytes_per_pixel) +{ + +} |