aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile22
-rwxr-xr-xconfigure101
-rw-r--r--etc/codecs.conf2602
-rw-r--r--libmpcodecs/ad.c28
-rw-r--r--libmpcodecs/ad_alaw.c93
-rw-r--r--libmpcodecs/ad_dvdpcm.c162
-rw-r--r--libmpcodecs/ad_faad.c324
-rw-r--r--libmpcodecs/ad_hwac3.c577
-rw-r--r--libmpcodecs/ad_hwmpa.c166
-rw-r--r--libmpcodecs/ad_imaadpcm.c340
-rw-r--r--libmpcodecs/ad_liba52.c339
-rw-r--r--libmpcodecs/ad_libdca.c353
-rw-r--r--libmpcodecs/ad_libmad.c187
-rw-r--r--libmpcodecs/ad_msadpcm.c237
-rw-r--r--libmpcodecs/ad_pcm.c214
-rw-r--r--libmpcodecs/ad_sample.c145
-rw-r--r--libmpcodecs/native/alaw.h76
-rw-r--r--libmpcodecs/vd.c20
-rw-r--r--libmpcodecs/vd_hmblck.c151
-rw-r--r--libmpcodecs/vd_ijpg.c197
-rw-r--r--libmpcodecs/vd_lzo.c166
-rw-r--r--libmpcodecs/vd_mpng.c182
-rw-r--r--libmpcodecs/vd_mtga.c252
-rw-r--r--libmpcodecs/vd_raw.c142
-rw-r--r--libmpdemux/mp3_hdr.c122
-rw-r--r--libmpdemux/mp3_hdr.h36
-rw-r--r--libmpdemux/qtpalette.h589
27 files changed, 1 insertions, 7822 deletions
diff --git a/Makefile b/Makefile
index 7985d83c2d..9b73377020 100644
--- a/Makefile
+++ b/Makefile
@@ -34,8 +34,6 @@ SRCS_COMMON-$(DVBIN) += stream/dvb_tune.c \
SRCS_COMMON-$(DVDREAD) += stream/stream_dvd.c \
stream/stream_dvd_common.c
-SRCS_COMMON-$(FAAD) += libmpcodecs/ad_faad.c
-
# These filters use private headers and do not work with shared libavcodec.
SRCS_COMMON-$(FFMPEG_INTERNALS) += libmpcodecs/vf_mcdeint.c \
libmpcodecs/vf_spp.c \
@@ -44,18 +42,13 @@ SRCS_COMMON-$(FTP) += stream/stream_ftp.c
SRCS_COMMON-$(GIF) += libmpdemux/demux_gif.c
SRCS_COMMON-$(HAVE_POSIX_SELECT) += libmpcodecs/vf_bmovl.c
SRCS_COMMON-$(HAVE_SYS_MMAN_H) += libaf/af_export.c osdep/mmap_anon.c
-SRCS_COMMON-$(JPEG) += libmpcodecs/vd_ijpg.c
SRCS_COMMON-$(LADSPA) += libaf/af_ladspa.c
-SRCS_COMMON-$(LIBA52) += libmpcodecs/ad_liba52.c
SRCS_COMMON-$(LIBASS) += libmpcodecs/vf_ass.c \
sub/ass_mp.c \
sub/sd_ass.c \
SRCS_COMMON-$(LIBBLURAY) += stream/stream_bluray.c
SRCS_COMMON-$(LIBBS2B) += libaf/af_bs2b.c
-SRCS_COMMON-$(LIBDCA) += libmpcodecs/ad_libdca.c
-
-SRCS_COMMON-$(LIBMAD) += libmpcodecs/ad_libmad.c
SRCS_COMMON-$(LIBPOSTPROC) += libmpcodecs/vf_pp.c
SRCS_COMMON-$(LIBSMBCLIENT) += stream/stream_smb.c
@@ -83,7 +76,6 @@ SRCS_COMMON-$(NETWORKING) += stream/stream_netstream.c \
stream/tcp.c \
stream/stream_udp.c \
-SRCS_COMMON-$(PNG) += libmpcodecs/vd_mpng.c
SRCS_COMMON-$(PRIORITY) += osdep/priority.c
SRCS_COMMON-$(PVR) += stream/stream_pvr.c
SRCS_COMMON-$(RADIO) += stream/stream_radio.c
@@ -147,15 +139,8 @@ SRCS_COMMON = asxparser.c \
libaf/reorder_ch.c \
libaf/window.c \
libmpcodecs/ad.c \
- libmpcodecs/ad_alaw.c \
- libmpcodecs/ad_dvdpcm.c \
libmpcodecs/ad_ffmpeg.c \
libmpcodecs/ad_spdif.c \
- libmpcodecs/ad_hwac3.c \
- libmpcodecs/ad_hwmpa.c \
- libmpcodecs/ad_imaadpcm.c \
- libmpcodecs/ad_msadpcm.c \
- libmpcodecs/ad_pcm.c \
libmpcodecs/dec_audio.c \
libmpcodecs/dec_video.c \
libmpcodecs/img_format.c \
@@ -163,11 +148,6 @@ SRCS_COMMON = asxparser.c \
libmpcodecs/pullup.c \
libmpcodecs/vd.c \
libmpcodecs/vd_ffmpeg.c \
- libmpcodecs/vd_hmblck.c \
- libmpcodecs/vd_lzo.c \
- libmpcodecs/vd_mtga.c \
- libmpcodecs/vd_null.c \
- libmpcodecs/vd_raw.c \
libmpcodecs/vf.c \
libmpcodecs/vf_1bpp.c \
libmpcodecs/vf_2xsai.c \
@@ -257,7 +237,6 @@ SRCS_COMMON = asxparser.c \
libmpdemux/ebml.c \
libmpdemux/extension.c \
libmpdemux/mf.c \
- libmpdemux/mp3_hdr.c \
libmpdemux/mp_taglists.c \
libmpdemux/video.c \
libvo/osd.c \
@@ -359,7 +338,6 @@ DIRS = . \
libaf \
libao2 \
libmpcodecs \
- libmpcodecs/native \
libmpdemux \
libvo \
osdep \
diff --git a/configure b/configure
index 72e9a48093..d209b74550 100755
--- a/configure
+++ b/configure
@@ -347,13 +347,9 @@ Codecs:
--enable-jpeg enable JPEG input/output support [autodetect]
--enable-libcdio enable libcdio support [autodetect]
--enable-libav skip Libav autodetection [autodetect]
- --enable-faad enable FAAD2 (AAC) [autodetect]
--disable-ladspa disable LADSPA plugin support [autodetect]
--disable-libbs2b disable libbs2b audio filter support [autodetect]
--disable-mpg123 disable libmpg123 MP3 decoding support [autodetect]
- --disable-mad disable libmad (MPEG audio) support [autodetect]
- --enable-libdca enable libdca support [autodetect]
- --disable-liba52 disable liba52 [autodetect]
Video output:
--enable-gl enable OpenGL video output [autodetect]
@@ -461,11 +457,7 @@ _portaudio=auto
_jack=auto
_openal=no
_libcdio=auto
-_mad=auto
_mpg123=auto
-_liba52=auto
-_libdca=auto
-_faad=auto
_ladspa=auto
_libbs2b=auto
_vcd=auto
@@ -664,18 +656,10 @@ for ac_option do
--disable-jack) _jack=no ;;
--enable-openal) _openal=yes ;;
--disable-openal) _openal=no ;;
- --enable-mad) _mad=yes ;;
- --disable-mad) _mad=no ;;
--enable-libcdio) _libcdio=yes ;;
--disable-libcdio) _libcdio=no ;;
--enable-mpg123) _mpg123=yes ;;
--disable-mpg123) _mpg123=no ;;
- --enable-liba52) _liba52=yes ;;
- --disable-liba52) _liba52=no ;;
- --enable-libdca) _libdca=yes ;;
- --disable-libdca) _libdca=no ;;
- --enable-faad) _faad=yes ;;
- --disable-faad) _faad=no ;;
--enable-ladspa) _ladspa=yes ;;
--disable-ladspa) _ladspa=no ;;
--enable-libbs2b) _libbs2b=yes ;;
@@ -2856,22 +2840,6 @@ fi
echores "$_zlib"
-echocheck "mad support"
-if test "$_mad" = auto ; then
- _mad=no
- statement_check mad.h 'mad_synth_init(0)' -lmad && _mad=yes
-fi
-if test "$_mad" = yes ; then
- def_mad='#define CONFIG_LIBMAD 1'
- extra_ldflags="$extra_ldflags -lmad"
- codecmodules="libmad $codecmodules"
-else
- def_mad='#undef CONFIG_LIBMAD'
- nocodecmodules="libmad $nocodecmodules"
-fi
-echores "$_mad"
-
-
# Any version of libmpg123 that knows MPG123_RESYNC_LIMIT shall be fine.
# That is, 1.2.0 onwards. Recommened is 1.14 onwards, though.
echocheck "mpg123 support"
@@ -2888,67 +2856,6 @@ else
fi
echores "$_mpg123"
-echocheck "liba52 support"
-def_liba52='#undef CONFIG_LIBA52'
-if test "$_liba52" = auto ; then
- _liba52=no
- cat > $TMPC << EOF
-#include <inttypes.h>
-#include <a52dec/a52.h>
-int main(void) { a52_state_t *testHand; testHand=a52_init(0); return 0; }
-EOF
- cc_check -la52 && _liba52=yes && extra_ldflags="$extra_ldflags -la52"
-fi
-if test "$_liba52" = yes ; then
- def_liba52='#define CONFIG_LIBA52 1'
- codecmodules="liba52 $codecmodules"
-else
- nocodecmodules="liba52 $nocodecmodules"
-fi
-echores "$_liba52"
-
-echocheck "libdca support"
-if test "$_libdca" = auto ; then
- _libdca=no
- for _ld_dca in -ldca -ldts ; do
- statement_check_broken stdint.h dts.h 'dts_init(0)' $_ld_dca $_ld_lm &&
- extra_ldflags="$extra_ldflags $_ld_dca" && _libdca=yes && break
- done
-fi
-if test "$_libdca" = yes ; then
- def_libdca='#define CONFIG_LIBDCA 1'
- codecmodules="libdca $codecmodules"
-else
- def_libdca='#undef CONFIG_LIBDCA'
- nocodecmodules="libdca $nocodecmodules"
-fi
-echores "$_libdca"
-
-
-echocheck "FAAD2 support"
-if test "$_faad" = auto ; then
- _faad=no
- cat > $TMPC << EOF
-#include <neaacdec.h>
-#ifndef FAAD_MIN_STREAMSIZE
-#error Too old version
-#endif
-int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
- testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
-EOF
- cc_check -lfaad $_ld_lm && _faad=yes
-fi
-
-def_faad='#undef CONFIG_FAAD'
-if test "$_faad" = yes ; then
- def_faad='#define CONFIG_FAAD 1'
- extra_ldflags="$extra_ldflags -lfaad"
- codecmodules="faad2 $codecmodules"
-else
- nocodecmodules="faad2 $nocodecmodules"
-fi
-echores "$_faad"
-
echocheck "LADSPA plugin support"
if test "$_ladspa" = auto ; then
@@ -3426,7 +3333,6 @@ DIRECT3D = $_direct3d
DVBIN = $_dvbin
DVDREAD = $_dvdread
DXR3 = $_dxr3
-FAAD = $_faad
FTP = $_ftp
GIF = $_gif
GL = $_gl
@@ -3439,14 +3345,11 @@ JACK = $_jack
JOYSTICK = $_joystick
JPEG = $_jpeg
LADSPA = $_ladspa
-LIBA52 = $_liba52
LIBASS = $_ass
LIBASS_OSD = $_libass_osd
DUMMY_OSD = $_dummy_osd
LIBBLURAY = $_bluray
LIBBS2B = $_libbs2b
-LIBDCA = $_libdca
-LIBMAD = $_mad
LCMS2 = $_lcms2
LIBPOSTPROC = $libpostproc
LIBSMBCLIENT = $_smb
@@ -3616,10 +3519,6 @@ $def_vcd
/* codec libraries */
-$def_faad
-$def_liba52
-$def_libdca
-$def_mad
$def_mpg123
$def_zlib
diff --git a/etc/codecs.conf b/etc/codecs.conf
index 897ba1d29b..879389acbd 100644
--- a/etc/codecs.conf
+++ b/etc/codecs.conf
@@ -3,7 +3,7 @@
; Before editing this file, please read DOCS/tech/codecs.conf.txt !
;=============================================================================
-release 20120717
+release 20120812
;=============================================================================
; VIDEO CODECS
@@ -82,73 +82,6 @@ videocodec ffzmbv
driver ffmpeg
dll "zmbv"
-videocodec geov
- info "GeoCodec"
- comment "crashes without -nosound, hangs on exit"
- status buggy
- fourcc GEOV
- fourcc GEOX
- driver vfw
- dll "GeoCodec.dll"
- out BGR24 flip
-
-videocodec imm4
- info "infinity cctv codec"
- status working
- fourcc IMM4
- driver vfw
- dll "VCMIMM4.dll"
- out BGR15 flip
-
-videocodec amv2
- info "lossless video codec"
- status working
- fourcc AMV2
- driver vfw
- dll "amv2codec.dll"
- out BGR32 flip
-
-videocodec lzocodec
- info "lzo lossless"
- status working
- fourcc LZOC
- driver vfw
- dll "lzocodec.dll"
- out YV12,YUY2
-
-videocodec direccionalvfw
- info "direccional lossless codec"
- status working
- fourcc DIRC
- driver vfw
- dll "direccional.dll"
- out BGR24,BGR32 flip
-
-videocodec mhuffyuv
- info "mhuffyuv lossless codec"
- status working
- fourcc MHFY
- driver vfw
- dll "mhuffyuv.dll"
- out BGR24,BGR32 flip
-
-videocodec zmbv
- info "Zip Motion-Block Video"
- status working
- fourcc ZMBV
- driver vfw
- dll "zmbv.dll"
- out BGR24,BGR15,BGR8 query,flip
-
-videocodec yuv8
- info "YUV422 = Cb0 Y0 Cr0 Y1 Cb1 Y2 Cr1 Y3 (U Y V Y U Y V Y)"
- status working
- fourcc yuv8
- driver vfwex
- dll "kdvyuv8.dll" ; i wonder if this works with raw codecs?
- out YV12,I420,UYVY
- out BGR24,BGR15,BGR32
-
videocodec ffr210
info "FFmpeg R210 - 10-bit RGB"
status working
@@ -163,15 +96,6 @@ videocodec ffr10k
driver ffmpeg
dll "r10k"
-videocodec blackmagic
- info "Blackmagic 10-bit"
- status working
- comment "requires libguide40.dll"
- fourcc r210
- driver vfw
- dll "BMDCodecLib.dll"
- out BGR32,RGB32
-
; MPEG-1/2 decoding:
videocodec ffmpeg1
@@ -321,36 +245,6 @@ videocodec ffmpeg2crystalhd
driver ffmpeg
dll mpeg2_crystalhd
-videocodec mpegpes
- info "MPEG-PES output (.mpg or DXR3/IVTV/DVB/V4L2 card)"
- comment "for hardware decoding"
- status working
- format 0x10000001 ; mpeg 1
- format 0x10000002 ; mpeg 2
- fourcc mpg1,MPG1,mpg2,MPG2
- fourcc MPEG
- fourcc hdv1,hdv2,hdv3
- fourcc hdv4,hdv5,hdv6
- fourcc hdv7,hdv8,hdv9
- fourcc xdv1,xdv2,xdv3
- fourcc xdv4,xdv5,xdv6
- fourcc xdv7,xdv8,xdv9
- fourcc xdva,xdvb,xdvc
- fourcc xdvd,xdve,xdvf
- fourcc xd5a,xd5b,xd5c
- fourcc xd5d,xd5e,xd5f
- fourcc xd59,xd54,xd55
- fourcc mx5n,mx4n,mx4p
- fourcc mx3n,mx3p
- fourcc AVmp
- fourcc mp2v,mpgv
- fourcc m2v1,m1v1
- fourcc PIM1 ; Pinnacle hardware-MPEG-1
- fourcc PIM2 ; Pinnacle hardware-MPEG-2
- fourcc LMP2 ; Lead mpeg2 in avi
- driver mpegpes
- out MPES
-
; we have only native open source codecs for these:
videocodec ffnuv
@@ -546,73 +440,6 @@ videocodec ffroqvideo
driver ffmpeg
dll "roqvideo"
-videocodec lzo
- info "LZO compressed"
- status working
- fourcc LZO1
- driver lzo
- dll "liblzo"
- out YV12,I420
- out BGR24 flip
-
-; prefer native codecs over win32?
-; the win32 codecs probably are (better) optimized and support direct
-; rendering, so this may be not the best idea...
-
-;WIN32:
-
-videocodec nogatech
- status working
- fourcc NTN1,NTN2
- driver vfw
- dll "nuvision.ax"
- out BGR24 flip
-
-videocodec ylc
- info "YUY2 Lossless Codec"
- status working
- fourcc YLC0
- driver vfw
- dll "ylc.vcm"
- out BGR24 flip
-
-videocodec smartsight
- info "Verint Video Manager"
- status working
- fourcc SN40
- fourcc SN41,SJPG ; untested
- driver vfw
- dll "SN4Codec.dll"
- out BGR24 flip
-
-videocodec msuscls
- info "MSU Screen Capture Lossless Codec"
- status working
- fourcc SCLS
- driver vfw
- dll "SCLS.DLL"
- out BGR32,BGR24,BGR16 flip
-
-videocodec wincam
- info "wincam screen capture codec"
- comment "requires Zlib.dll"
- status working
- fourcc WCMV
- driver vfw
- dll "wcmv.dll" ; requires Zlib.dll
- out BGR15 flip
-
-videocodec cram
- info "Microsoft Video 1"
- comment "-vf palette required for 8bpp"
- status buggy
- fourcc cram,CRAM CRAM
- fourcc msvc,MSVC CRAM
- fourcc wham,WHAM CRAM
- driver vfw
- dll "msvidc32.dll"
- out BGR24,BGR15,BGR8 static,query
-
videocodec ffcvid
info "FFmpeg Cinepak Video"
status working
@@ -620,28 +447,6 @@ videocodec ffcvid
driver ffmpeg
dll "cinepak"
-videocodec cvidvfw
- info "Cinepak Video"
- status working
- fourcc cvid
- driver vfw
- dll "iccvid.dll"
-; out YUY2
-; out UYVY
- out BGR24,BGR15 static
-
-videocodec huffyuv
- info "HuffYUV"
- status buggy
- fourcc HFYU
- driver vfw
- dll "huffyuv.dll"
- out YUY2 flip,noflip,query
-; out UYVY flip
- out BGR32,BGR24 flip,query
-
-;NATIVE:
-
videocodec ffvideo1
info "FFmpeg Microsoft Video 1"
status working
@@ -665,19 +470,6 @@ videocodec ffzlib
driver ffmpeg
dll "zlib"
-;XAnim (slow):
-
-videocodec cvidxa
- info "XAnim's Radius Cinepak Video"
- status buggy
- fourcc cvid
- driver xanim
- dll "vid_cvid.xa"
- out YV12,IYUV,I420 static
-
-; time to decide what to do with the MPEG-4/DivX variants...
-; ff* is fastest...
-
videocodec ffhuffyuv
info "FFmpeg HuffYUV"
status working
@@ -940,24 +732,6 @@ videocodec ffh264crystalhd
driver ffmpeg
dll h264_crystalhd
-videocodec coreavcwindows
- info "CoreAVC H.264 for x86 - http://corecodec.org/"
- comment "this codec will only work after purchasing it"
- status working
- fourcc H264,h264
- fourcc X264,x264
- fourcc avc1 AVC1,AVC1
- fourcc davc,DAVC
- fourcc VSSH
- fourcc ai55,ai15 ; flip4mac avc intra
- fourcc ai1q,ai5q ; flip4mac avc intra
- format 0x10000005
- driver dshow
- dll "CoreAVCDecoder.ax"
- guid 0x09571a4b, 0xf1fe, 0x4c60, 0x97, 0x60, 0xde, 0x6d, 0x31, 0x0c, 0x7c, 0x31
- out YV12,IYUV,I420,YUY2
-
-
videocodec ffsvq3
info "FFmpeg Sorenson Video v3 (SVQ3)"
status working
@@ -1084,216 +858,6 @@ videocodec fflibdirac
driver ffmpeg
dll libdirac
-; is divx4vfw stable enough, working everywhere and faster than divxds?
-
-videocodec divx4vfw
- info "DivX4Windows-VFW"
- status buggy
- comment "sig11 with -framedrop"
- fourcc DIVX,divx ; opendivx / divx4
- fourcc DIV1,div1 divx
-; fourcc MP4S,mp4s ; ISO MPEG-4 Video V1
- fourcc MP43,mp43,DIV3,div3,DIV4,div4 DIV3 ; for DivX4Linux only!
- fourcc AP41 DIV3 ; AngelPotion stuff
- format 0x4
- driver vfw
- dll "divx.dll"
-; out YV12 ; buggy
- out YUY2
- out BGR32,BGR24,BGR15
-
-; the original ones... prefer DShow for postprocessing:
-
-videocodec divxds
- info "DivX ;-) (MSMPEG-4 v3)"
- comment "with postprocessing"
- status working
- fourcc MP43,mp43 div3 ; fourcc mapping to div3
- fourcc DIV5,div5 div3
- fourcc DIV6,div6 div4
- fourcc DIV3,div3,DIV4,div4
- fourcc AP41 div3 ; AngelPotion stuff
- driver dshow
- dll "divx_c32.ax"
- guid 0x82CCd3E0, 0xF71A, 0x11D0, 0x9f, 0xe5, 0x00, 0x60, 0x97, 0x78, 0xaa, 0xaa
- out YUY2,UYVY
- out BGR32,BGR24,BGR16,BGR15
-
-videocodec divx
- info "DivX ;-) (MSMPEG-4 v3)"
- status working
- fourcc MP43,mp43 div3 ; MSMPEG-4 v3 (fourcc mapping to div3)
- fourcc DIV5,div5 div3 ; DivX 3.20
- fourcc DIV6,div6 div4 ; -||-
- fourcc DIV3,div3,DIV4,div4
- fourcc AP41 div3 ; AngelPotion stuff
- driver vfw
- dll "divxc32.dll"
- out YUY2 yuvhack
- out BGR32,BGR24,BGR15
-
-; hmm. we should check, maybe these are/will be playable with libavcodec:
-
-videocodec mpeg4ds
- info "Microsoft MPEG-4 v1/v2"
- status working
- comment "with postprocessing"
- fourcc DIV2,div2 mp42
- fourcc MP4S,mp4s ; ISO MPEG-4 Video V1
- fourcc MPG4,mpg4
- fourcc MP42,mp42
- driver dshow
- dll "mpg4ds32.ax"
- guid 0x82CCD3E0, 0xF71A, 0x11D0, 0x9F, 0xE5, 0x00, 0x60, 0x97, 0x78, 0xEA, 0x66
- out YUY2
-; out BGR32,BGR24,BGR16,BGR15
-
-videocodec mpeg4
- info "Microsoft MPEG-4 v1/v2"
- status working
- fourcc MPG4,mpg4
- fourcc MP42,mp42
- fourcc DIV2 mp42
- driver vfw
- dll "mpg4c32.dll"
- out YUY2 yuvhack
- out BGR32,BGR24,BGR15
-
-videocodec wmv9dmo
- info "Windows Media Video 9 DMO"
- status working
- fourcc WMV3
- fourcc WMVP
- driver dmo
- dll "wmv9dmod.dll"
- guid 0x724bb6a4, 0xe526, 0x450f, 0xaf, 0xfa, 0xab, 0x9b, 0x45, 0x12, 0x91, 0x11
- out YV12 ;,I420,IYUV
- out YUY2,UYVY
-; out BGR32,BGR24,BGR16 ;,BGR15
-
-videocodec wmvdmo
- info "Windows Media Video DMO"
- status working
- fourcc WMV1
- fourcc WMV2
- fourcc WMV3
- fourcc WMVP
- driver dmo
- dll "wmvdmod.dll"
- guid 0x82d353df, 0x90bd, 0x4382, 0x8b, 0xc2, 0x3f, 0x61, 0x92, 0xb7, 0x6e, 0x34
- out YV12 ;,I420,IYUV
- out YUY2,UYVY
-; out BGR32,BGR24,BGR16 ;,BGR15
-
-videocodec wmv8
- info "Windows Media Video 8"
- status working
- fourcc WMV2
- driver dshow
- dll "wmv8ds32.ax"
- guid 0x521fb373, 0x7654, 0x49f2, 0xbd, 0xb1, 0x0c, 0x6e, 0x66, 0x60, 0x71, 0x4f
- out YV12,I420,IYUV
- out YUY2,UYVY
-; out BGR32,BGR24,BGR16,BGR15
-
-videocodec wmv7
- info "Windows Media Video 7"
- status working
- fourcc WMV1
- driver dshow
- dll "wmvds32.ax"
- guid 0x4facbba1, 0xffd8, 0x4cd7, 0x82, 0x28, 0x61, 0xe2, 0xf6, 0x5c, 0xb1, 0xae
- out YUY2,UYVY
-; out BGR32,BGR24,BGR16,BGR15
-
-videocodec wmvadmo
- info "Windows Media Video Adv DMO"
- status working
- fourcc WMVA
- fourcc WVP2
- driver dmo
- dll "wmvadvd.dll"
- guid 0x03be3ac4, 0x84b7, 0x4e0e, 0xa7, 0x8d, 0xd3, 0x52, 0x4e, 0x60, 0x39, 0x5a
- out YV12 ;,I420,IYUV
- out YUY2,UYVY
-; out BGR32,BGR24,BGR16 ;,BGR15
-
-videocodec wmvvc1dmo
- info "Windows Media Video (VC-1) Advanced Profile"
- status working
- fourcc WVC1
- driver dmo
- dll "wvc1dmod.dll"
- guid 0xc9bfbccf, 0xe60e, 0x4588, 0xa3, 0xdf, 0x5a, 0x03, 0xb1, 0xfd, 0x95, 0x85
- out YV12,YUY2
-
-videocodec wmsdmod
- info "Windows Media Screen Codec 2"
- status working
- fourcc MSS1
- fourcc MSS2
- driver dmo
- dll "wmsdmod.dll"
- guid 0x7bafb3b1, 0xd8f4, 0x4279, 0x92, 0x53, 0x27, 0xda, 0x42, 0x31, 0x08, 0xde
- out BGR32,BGR24,BGR16
-
-videocodec wms10dmod
- info "Windows Media Screen Codec 2 from WMP10"
- status working
- fourcc MSS1
- fourcc MSS2
- driver dmo
- dll "wms10dmod.dll"
- guid 0x7bafb3b1, 0xd8f4, 0x4279, 0x92, 0x53, 0x27, 0xda, 0x42, 0x31, 0x08, 0xde
- out BGR32,BGR24,BGR16
-
-videocodec msascreen
- info "MS ATC screen decoder 1"
- status working
- fourcc MSA1
- driver dmo
- dll "scdec.dll"
- guid 0xf1931d8e, 0x51d3, 0x496f, 0xbe, 0x8a, 0x3d, 0x08, 0xae, 0xe9, 0xc9, 0xdb
- out BGR24
-
-videocodec eescreen
- info "expression encoder"
- comment "requires xp or newer and msvcr100.dll"
- status working
- fourcc MTS2
- driver dmo
- dll "Microsoft.Expression.Encoder.EEScreen.Codec.dll"
- guid 0x9a6e798c, 0x00ba, 0x478c, 0x8d, 0x64, 0x88, 0xf2, 0xe5, 0xb2, 0x5c, 0x1a
- out BGR32,BGR24,BGR16 ;,BGR15
-
-videocodec gotomeeting
- info "GoToMeeting codec"
- status working
- fourcc G2M2,G2M3
- driver dmo
- dll "G2M.dll"
- guid 0x23F891A4, 0x572B, 0x474A, 0x86, 0xDA, 0x66, 0xCD, 0xD3, 0xD1, 0xAC, 0x2E
- out BGR24,RGB24 flip
-
-videocodec ubmp4
- info "UB Video MPEG-4"
- comment "black&white"
- status buggy
- fourcc mp4v UMP4 ; black&white, sometimes buggy too
- fourcc UMP4
- driver vfw
- dll "ubvmp4d.dll"
- out I420
- out UYVY
-
-videocodec geomp4
- info "GeoVision Advanced MPEG-4"
- status working
- fourcc GMP4,GM40
- driver vfw
- dll "GXAMP4.dll"
- out BGR24 flip
-
; MJPEG:
; Notes: m3jpeg+mjpeg are MMX optimized. avid is very stable but slow.
; ijpg only decodes JPEG images (no MJPEG), and slow.
@@ -1331,81 +895,6 @@ videocodec ffmjpegb
driver ffmpeg
dll mjpegb
-; slow. usable only for standalone JPEGs, like -mf, avid or Photo-JPEG:
-videocodec ijpg
- info "Independent JPEG Group's codec"
- status working
- fourcc ijpg,IJPG ; -mf type=jpeg
- fourcc jpeg ; MOV Photo-JPEG
- fourcc AVRn,AVDJ ; AVID
- fourcc CJPG
- driver ijpg
- dll libjpeg
- out RGB24,Y8
-
-; http://www.morgan-multimedia.com/dev/codec_spec.htm
-videocodec m3jpeg
- info "Morgan Motion JPEG Codec"
- status working
- fourcc MJPG
- fourcc mjpa,mjpb,mjpg MJPG ; MOV files
- fourcc dmb1 MJPG ; MJPEG by Matrox Rainbow Runner
- driver vfw
- dll "m3jpeg32.dll"
-; out YV12,I420
- out YUY2,UYVY
- out BGR32,BGR24,BGR15
-
-videocodec mjpeg
- info "MainConcept Motion JPEG"
- status working
- fourcc MJPG
- fourcc mjpa,mjpb,mjpg MJPG ; MOV files
-; fourcc AVRn,AVDJ MJPG ; AVID (sometimes buggy)
- driver vfw
- dll "mcmjpg32.dll"
- out YUY2,UYVY
- out BGR32,BGR24,BGR15
-
-videocodec avid
- info "AVID Motion JPEG"
- status working
- comment "slooooooooow but stable"
- fourcc AVRn
- fourcc AVDJ AVRn
- fourcc MJPG,mjpg AVRn
- driver vfw
- dll "AvidAVICodec.dll"
- out BGR24 flip
-
-videocodec LEAD
- info "LEAD (M)JPEG"
- status working
- comment "supports interlaced MJPEG"
- fourcc MJPG
- fourcc jpeg MJPG ; MOV Photo-JPEG
- fourcc LEAD
- fourcc MTSJ MJPG
- driver vfw
- dll "LCodcCMP.dll"
- out BGR24,BGR15
-
-videocodec acdsee
- info "ACDSee mjpeg"
- status working
- fourcc ACDV
- driver vfw
- dll "ACDV.dll"
- out BGR32,BGR24,BGR15 flip
-
-videocodec imagepower
- info "ImagePower MJPEG2000"
- status buggy
- fourcc IPJ2
- driver vfw
- dll "jp2avi.dll"
- out BGR32,BGR24,BGR15
-
videocodec fflibopenjpeg
info "OpenJPEG MJPEG2000"
status working
@@ -1415,57 +904,6 @@ videocodec fflibopenjpeg
driver ffmpeg
dll "libopenjpeg"
-videocodec m3jpeg2k
- info "Morgan MJPEG2000"
- status working
- fourcc MJ2C
- fourcc MJP2
- driver vfw
- dll "m3jp2k32.dll"
- out YV12,I420,IYUV
- out YUY2,UYVY
- out BGR32,BGR24,BGR15
-
-; http://www.morgan-multimedia.com/dev/directshow_dec_spec.htm
-videocodec m3jpegds
- info "Morgan MJPEG"
- status crashing
- fourcc MJPG mjpg
- fourcc mjpa,mjpb,mjpg mjpg ; MOV files
- fourcc dmb1 mjpg ; MJPEG by Matrox Rainbow Runner
- driver dshow
- dll "m3jpegdec.ax"
- guid 0x6988b440, 0x8352, 0x11d3, 0x9b, 0xda, 0xca, 0x86, 0x73, 0x7c, 0x71, 0x68
- out I420
- out YUY2,UYVY
- out BGR32,BGR24,BGR16,BGR15
-
-videocodec pegasusm
- info "Pegasus Motion JPEG"
- status crashing
- fourcc MJPG
- driver vfw
-; dll "pvmjpg20.dll" ; v2.0
- dll "pvmjpg21.dll" ; v2.1
- out BGR24 flip
-
-videocodec pegasusl
- info "Pegasus lossless JPEG"
- status crashing
- fourcc JPGL
- fourcc MJPG JPGL
- driver vfw
- dll "pvljpg20.dll"
- out BGR24 flip
-
-videocodec pegasusmwv
- info "Pegasus Motion Wavelet 2000"
- status crashing
- fourcc PVW2
- driver vfw
- dll "pvwv220.dll"
- out BGR24 flip
-
videocodec fffrwu
info "FFmpeg Forward Uncompressed Video Codec"
status working
@@ -1473,68 +911,6 @@ videocodec fffrwu
driver ffmpeg
dll "FRWU"
-videocodec frwuvfw
- info "Forward Uncompressed Video Codec"
- status working
- fourcc FRWU
- driver vfw
- dll "FRWU.dll"
- out BGR24 flip
-
-videocodec frwdvfw
- info "Forward JPEG Video Codec"
- status working
- fourcc FRWD
- driver vfw
- dll "FRWD.dll"
- out BGR24 flip
-
-videocodec frwtvfw
- info "Forward JPEG+Alpha Video"
- status working
- fourcc FRWT
- driver vfw
- dll "FRWT.dll"
- out BGR24 flip
-
-; h263: - I don't know. comments?
-
-videocodec vivo
- info "Vivo H.263"
- status working
- fourcc VIVO,vivo vivo
- fourcc viv1,viv2 vivo
- driver vfw
- dll "ivvideo.dll"
- out BGR32,BGR24,BGR15 flip
- in BGR24
-
-videocodec u263
- info "UB Video H.263/H.263+/H.263++"
- status working
- fourcc U263
- fourcc vivo,VIVO U263
- fourcc viv1 U263
- driver dshow
- dll "ubv263d+.ax"
- guid 0x00af1181, 0x6ebb, 0x11d4, 0x9d, 0x5a, 0x00, 0x50, 0x04, 0x79, 0x6c, 0xc0
-; out UYVY
-; BGR32,BGR16,BGR15 seems to work too
- out BGR24 flip
-
-videocodec i263
- info "I263"
- status working
- fourcc I263,i263
-; fourcc I420,i420
- fourcc vivo,VIVO I263
- fourcc viv1 I263
- driver vfw
- dll "i263_32.drv"
- out I420
- out YUY2
- out BGR32,BGR24,BGR15
-
videocodec ffi263
info "FFmpeg I263"
status working
@@ -1564,16 +940,6 @@ videocodec ffzygo
dll h263
out YV12,I420,IYUV flip
-videocodec h263xa
- info "XAnim's CCITT H.263"
- status crashing
- fourcc H263,h263
- fourcc viv1 H263
- fourcc VIVO,vivo H263
- driver xanim
- dll "vid_h263.xa"
- out YV12,IYUV,I420
-
videocodec ffh261
info "CCITT H.261"
status working
@@ -1581,102 +947,6 @@ videocodec ffh261
driver ffmpeg
dll h261
-videocodec qt261
- info "QuickTime H.261 video"
- status working
- fourcc H261,h261
- driver qtvideo
- dll "QuickTime.qts"
- out YUY2
-
-videocodec h261xa
- info "XAnim's CCITT H.261"
- status buggy
- fourcc H261,h261
- driver xanim
- dll "vid_h261.xa"
- out YV12,IYUV,I420
-
-videocodec m261
- info "M261"
- status untested
- fourcc m261,M261
- driver vfw
- dll "msh261.drv"
- out BGR32,BGR24,BGR15
-
-; Indeo:
-; Note: Indeo 3 is buggy, both XAnim (bad decoding) and VfW (fails with DR)
-; Prefer win32 ones, they are faster, and 4/5 can DR. For fallback, there are
-; Xanim codecs, they provide YV12, useful for YUV display or encoding.
-
-videocodec indeo5ds
- info "Intel Indeo 5"
- status working
- fourcc IV50,iv50
- driver dshow
- dll "ir50_32.dll"
- guid 0x30355649, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
- out YV12,IYUV,I420
- out YUY2,UYVY
- out BGR32,BGR24,BGR16,BGR15
-
-videocodec indeo5
- info "Intel Indeo 5"
- status working
- fourcc IV50,iv50
- driver vfwex
- dll "ir50_32.dll"
-; out YV12,I420 ; flickering
- out YUY2
- out BGR32,BGR24,BGR15
-
-videocodec indeo4
- info "Intel Indeo 4.1"
- status working
- fourcc IV41,iv41
- driver vfw
- dll "ir41_32.dll"
- out IF09
- out BGR24,BGR15
- in YVU9
-
-videocodec indeo3
- info "Intel Indeo 3.1/3.2"
- status working
- fourcc IV31,iv31
- fourcc IV32,iv32
- driver vfwex
- dll "ir32_32.dll"
- out IF09
- out BGR24,BGR15 flip,static
- in YVU9
-
-videocodec indeo5xa
- info "XAnim's Intel Indeo 5"
- status working
- fourcc IV50,iv50
- driver xanim
- dll "vid_iv50.xa"
- out YVU9
-
-videocodec indeo4xa
- info "XAnim's Intel Indeo 4.1"
- status working
- fourcc IV41,iv41
- driver xanim
- dll "vid_iv41.xa"
- out YVU9
-
-videocodec indeo3xa
- info "XAnim's Intel Indeo 3.1/3.2"
- status working
- fourcc IV31,iv31
- fourcc IV32,iv32
- driver xanim
- dll "vid_iv32.xa"
- out YVU9
-
videocodec ffindeo5
info "FFmpeg Indeo 5"
status working
@@ -1709,124 +979,6 @@ videocodec ffdv
driver ffmpeg
dll dvvideo
-videocodec qdv
- info "Sony Digital Video (DV)"
- status working
- fourcc dvsl,dvsd,dvhd ; ????
- fourcc DVSD dvsd ; pal .avi
- fourcc "dvcp" dvsd ; pal .mov
- fourcc "dvc " dvsd ; ntsc .mov
- driver dshow
- dll "qdv.dll"
- guid 0xB1B77C00, 0xC3E4, 0x11CF, 0xAF, 0x79, 0x00, 0xAA, 0x00, 0xB6, 0x7A, 0x42
- out YUY2
- out UYVY
- out BGR24,BGR16,BGR15 ; BGR32 is buggy, at least with one sample
-
-; note: it crashes with pond.dv :(
-videocodec mcdv
- info "MainConcept DV Codec"
- status working
- fourcc DVSD,dvsd ; PAL
- fourcc DVCS,dvcs ; NTSC ?
- fourcc CDVC,cdvc ; ???
- fourcc "dvcp" dvsd ; PAL DV in .mov
- fourcc "dvc " dvcs ; NTSC DV in .mov
- driver vfw
- dll "mcdvd_32.dll"
- out YUY2
- out UYVY
- out BGR32,BGR24,BGR15
-
-; 3ivx:
-
-videocodec 3ivXxa
- info "XAnim's 3ivx Delta 3.5 plugin"
- status working
- fourcc 3IV1
- driver xanim
- dll "vid_3ivX.xa"
- out YV12,IYUV,I420
-
-videocodec 3ivX
- info "3ivx Delta 4.5"
- status working
- fourcc 3IV1
- driver dshow
- dll "3ivxDSDecoder.ax" ; 3ivx.dll is also required
- guid 0x0E6772C0, 0xDD80, 0x11D4, 0xB5, 0x8f, 0xA8, 0x6B, 0x66, 0xd0, 0x61, 0x1c
- out YV12
- out YUY2
- out BGR32,BGR24,BGR16,BGR15
-
-; RealVideo variants
-
-videocodec rv3040
- info "Linux RealPlayer 10 RV30/40"
- status buggy ; tries to use multi-threaded decoding on SMP systems and crashes on exit
- fourcc RV30,rv30
- fourcc RV40,rv40
- driver realvid
- dll "drvc.so"
- out I420
-
-videocodec rv3040win
- info "Win32 RealPlayer 10 RV30/40"
- status working
- fourcc RV30,rv30
- fourcc RV40,rv40
- driver realvid
- dll "drvc.dll"
- out I420
-
-videocodec rv40
- info "Linux RealPlayer 9 RV40"
- status buggy
- fourcc RV40,rv40
- driver realvid
- dll "drv4.so.6.0"
- out I420
-
-videocodec rv40win
- info "Win32 RealPlayer 9 RV40"
- status working
- fourcc RV40,rv40
- driver realvid
- dll "drv43260.dll"
- out I420
-
-videocodec rv40mac
- info "Mac OS X RealPlayer 9 RV40"
- status working
- fourcc RV40,rv40
- driver realvid
- dll "drvc.bundle/Contents/MacOS/drvc"
- out I420
-
-videocodec rv30
- info "Linux RealPlayer 8 RV30"
- status buggy
- fourcc RV30,rv30
- driver realvid
- dll "drv3.so.6.0"
- out I420
-
-videocodec rv30win
- info "Win32 RealPlayer 8 RV30"
- status working
- fourcc RV30,rv30
- driver realvid
- dll "drv33260.dll"
- out I420
-
-videocodec rv30mac
- info "Mac OS X RealPlayer 9 RV30"
- status working
- fourcc RV30,rv30
- driver realvid
- dll "drvc.bundle/Contents/MacOS/drvc"
- out I420
-
videocodec ffrv20
info "FFmpeg RV20"
status working
@@ -1849,38 +1001,6 @@ videocodec ffrv40
driver ffmpeg
dll rv40
-videocodec rv20
- info "Linux RealPlayer 8 RV20"
- status buggy
- fourcc RV20,rv20
- driver realvid
- dll "drv2.so.6.0"
- out I420
-
-videocodec rv20winrp10
- info "Win32 RealPlayer 10 RV20"
- status working
- fourcc RV20,rv20
- driver realvid
- dll "drv2.dll"
- out I420
-
-videocodec rv20win
- info "Win32 RealPlayer 8 RV20"
- status working
- fourcc RV20,rv20
- driver realvid
- dll "drv23260.dll"
- out I420
-
-videocodec rv20mac
- info "Mac OS X RealPlayer 9 RV20"
- status working
- fourcc RV20,rv20
- driver realvid
- dll "drv2.bundle/Contents/MacOS/drv2"
- out I420
-
videocodec ffrv10
info "FFmpeg RV10"
status working
@@ -1889,43 +1009,6 @@ videocodec ffrv10
driver ffmpeg
dll rv10
-; others:
-
-videocodec alpary
- info "Alparysoft lossless codec dshow"
- status working
- fourcc ASLC
- driver dshow
- dll "aslcodec_dshow.dll"
- guid 0x7f9de066, 0xbf3d, 0x4c17, 0x86, 0xb7, 0x33, 0xe4, 0x3e, 0xbe, 0xae, 0xf0
- out BGR24 flip
-
-videocodec alpary2
- info "Alparysoft lossless codec vfw"
- status working
- fourcc ASLC
- driver vfw
- dll "aslcodec_vfw.dll"
- out BGR24 flip
-
-videocodec LEADMW20
- info "Lead CMW wavelet 2.0"
- status working
- fourcc LCW2
- driver dshow
- dll "LCODCCMW2E.dll"; eval also needs LCMW2.dll
- guid 0xe2b7dc56, 0x38c5, 0x11d5, 0x91, 0xf6, 0x00, 0x10, 0x4b, 0xdb, 0x8f, 0xf9
- out BGR24,BGR8 flip
-
-videocodec cineformhd
- info "CineForm HD"
- status working
- fourcc CFHD
- driver dshow
- dll "CFDecode2.ax"
- guid 0xAD83011E, 0x01d1, 0x4623, 0x91, 0xfd, 0x6b, 0x75, 0xf1, 0x83, 0xc5, 0xa9
- out UYVY
-
videocodec fflagarith
info "Lagarith Lossless Video Codec"
status buggy
@@ -1933,100 +1016,6 @@ videocodec fflagarith
driver ffmpeg
dll lagarith
-videocodec lagarith
- info "Lagarith Lossless Video Codec"
- comment "http://lags.leetcode.net/codec.html, requires an MMX2 CPU."
- status working
- fourcc LAGS
- driver vfw
- dll "lagarith.dll"
- out BGR32,BGR24 flip
-
-videocodec psiv
- info "Infinite Video PSI_V"
- status working
- fourcc PSIV
- driver vfw
- dll "psiv.dll"
- out BGR32,BGR24 query,flip
-
-videocodec midivid1
- info "http://www.midivid.com/codec/download.html"
- status working
- fourcc MVLZ
- driver vfw
- dll "MLZCodec.dll"
- out BGR24,BGR16 flip
-
-videocodec midivid2
- info "http://www.midivid.com/codec/download.html"
- status working
- fourcc MVDV
- driver vfw
- dll "MVCodec.dll"
- out BGR24 flip
-
-videocodec midivid3
- info "www.midivid.com/codec/mv3codec.html"
- status working
- fourcc MV30
- driver vfw
- dll "MV3.dll"
- out BGR24,BGR16
-
-videocodec moyea
- info "Moyea Flash to Video Converter"
- comment "requires zlib1.dll" ; c7d4d685a0af2a09cbc21cb474358595
- status working
- fourcc MFZ0
- driver vfw
- dll "MyFlashZip0.ax"
- out BGR24 flip
-
-videocodec nsvideo
- info "Power VideoWorks video"
- status working
- fourcc NSVI
- driver vfw
- dll "nsvideo.dll"
- out BGR24 flip
-
-videocodec smv2vfw
- info "DideoNET SMV2"
- status working
- fourcc SMV2
- driver vfw
- dll "smv2vfw.dll"
- out BGR32,BGR24,BGR8,RGB32,RGB24,RGB8 flip
-
-videocodec cfhdvfw
- status working
- info "CineForm HD"
- comment "windows only" ; set registry keys for half-res decoding
- status working
- fourcc CFHD
- driver vfw
- dll "cinevfw.dll"
- out BGR32
-
-videocodec canopushq
- status working
- info "Canopus HQ Codec"
- comment "requires csehqa.dll and cseuvec.dll"
- fourcc CUVC
- driver vfw
- dll "CUVCcodc.dll"
- out BGR24
-
-videocodec canopusll
- status working
- info "Canopus Lossless Codec"
- comment "requires csellc.dll"
- fourcc CLLC
- driver vfw
- dll "CLLCcodc.dll"
- out BGR24
-
videocodec ffvp3
info "FFmpeg VP3"
status untested
@@ -2044,28 +1033,6 @@ videocodec fftheora
driver ffmpeg
dll "theora"
-videocodec vp3
- info "On2 Open Source VP3 Codec"
- status working
- comment "For SSE-systems use fixed DLL from ftp://mplayerhq.hu/MPlayer/samples/drivers32/"
- fourcc VP30,vp30,VP31,vp31
- flags align16
- driver vfwex
- dll "vp31vfw.dll"
- out YUY2
- out BGR32,BGR24,BGR15
-
-videocodec vp4
- info "On2 VP4 Personal Codec"
- comment "Decodes also VP3"
- status working
- fourcc VP40
- fourcc VP31,VP30,vp31,vp30
- driver vfwex
- dll "vp4vfw.dll"
- out YUY2
- out BGR32,BGR24
-
videocodec ffvp5
info "FFmpeg VP5"
status working
@@ -2073,15 +1040,6 @@ videocodec ffvp5
driver ffmpeg
dll "vp5"
-videocodec vp5
- info "On2 VP5 Personal Codec"
- status working
- fourcc VP50
- driver vfwex
- dll "vp5vfw.dll"
- out YUY2
- out BGR32,BGR24
-
videocodec ffvp6
info "FFmpeg VP6"
status working
@@ -2104,32 +1062,6 @@ videocodec ffvp6f
driver ffmpeg
dll "vp6f"
-videocodec vp6
- info "On2 VP6 Personal Codec"
- status working
- fourcc VP60,VP61,VP62
- driver vfwex
- dll "vp6vfw.dll"
- out YUY2
- out BGR32,BGR24
-
-videocodec vp6f
- info "On2 VP6F Personal Codec"
- status working
- fourcc VP6F VP60
- driver vfwex
- dll "vp6vfw.dll"
- out YUY2,BGR32,BGR24 flip
-
-videocodec vp7
- info "On2 VP7 Personal Codec"
- status working
- fourcc VP70
- driver vfwex
- dll "vp7vfw.dll"
- out YUY2
- out BGR32,BGR24
-
videocodec ffvp8
info "FFmpeg VP8"
comment "not using direct rendering due to missing edge emulation"
@@ -2145,40 +1077,6 @@ videocodec fflibvpx
driver ffmpeg
dll "libvpx"
-videocodec mwv1
- info "Motion Wavelets"
- status working
- fourcc MWV1
- driver vfw
- dll "icmw_32.dll"
- out BGR24,BGR15 flip
-
-videocodec wavcvfw
- info "centre for wavelets, approximation and information processing"
- status working
- fourcc wavc
- driver vfw
- dll "WavCWAIP.dll"
- out BGR24 flip
-
-videocodec asv2
- info "ASUS V2"
- status working
- fourcc ASV2
- driver vfw
- dll "asusasv2.dll"
- out UYVY
- out BGR32,BGR24,BGR15 flip
-
-videocodec asv1
- info "ASUS V1"
- status working
- fourcc ASV1
- driver vfw
- dll "asusasvd.dll"
- out UYVY
- out BGR32,BGR24,BGR15 flip
-
videocodec ffultimotion
info "FFmpeg IBM Ultimotion"
status working
@@ -2186,87 +1084,6 @@ videocodec ffultimotion
driver ffmpeg
dll "ultimotion"
-videocodec ultimotion
- info "IBM Ultimotion"
- status working
- fourcc ULTI
- driver vfw
- dll "ultimo.dll"
- out YUY2,UYVY
- out BGR32,BGR24,BGR15 flip
-
-videocodec mss1
- info "Windows Screen Video"
- status working
- fourcc MSS1
- driver dshow
- dll "msscds32.ax"
- guid 0x3301a7c4, 0x0a8d, 0x11d4, 0x91, 0x4d, 0x00, 0xc0, 0x4f, 0x61, 0x0d, 0x24
- out BGR32,BGR24,BGR16,BGR15
-
-; CLRVIDDC.DLL needed too, with uppercase
-videocodec ucod
- info "UCOD-ClearVideo"
- status working
- fourcc UCOD
- driver vfw
- dll "clrviddd.dll"
- out BGR32,BGR24,BGR15 flip
-
-videocodec vcr2
- info "ATI VCR-2"
- status working
- fourcc VCR2
- driver vfw
- dll "ativcr2.dll"
- out YV12
- out BGR24
-
-videocodec slifvfw
- info "SoftLab-NSK Forward MPEG2 I-frames"
- status working
- fourcc slif
- driver vfw
- dll "slif.dll"
- out RGB32 flip
-
-videocodec blox
- info "Jan Jezabeks BLOX MPEG Codec"
- status working
- fourcc BLOX
- driver vfw
- dll "blox.dll"
- out YUY2
-
-videocodec cjpg
- info "Creative Labs Video Blaster Webcam"
- comment "sequential jpeg files?"
- status working
- fourcc CJPG
- driver vfw
- dll "CtWbJpg.DLL"
- out YUY2
- out UYVY
- out BGR24,BGR15
-
-videocodec kensington
- info "kensington webcam"
- status working
- fourcc AJPG,ABYR
- fourcc LBYR,JBYR ; untested, creative labs cam
- fourcc UV12 ; untested
- driver vfw
- dll "aoxdxipl.ax"
- out BGR24 flip
-
-videocodec xjpg
- info "xiricam Veo PC Camera"
- status working
- fourcc XJPG
- driver vfw
- dll "camfc.dll"
- out BGR24 flip
-
videocodec ffduck
info "Duck Truemotion1"
status working
@@ -2282,52 +1099,6 @@ videocodec fftm20
driver ffmpeg
dll truemotion2
-; our BGR15->BGR32 is bad or the DLL?
-videocodec tm20
- info "TrueMotion 2.0"
- status working
- comment "YUV faulting"
- fourcc TM20
- driver dshow
- dll "tm20dec.ax"
- guid 0x4cb63e61, 0xc611, 0x11D0, 0x83, 0xaa, 0x00, 0x00, 0x92, 0x90, 0x01, 0x84
- out BGR32,BGR24,BGR16 flip
-
-videocodec tm2xvfw
- info "TrueMotion 2.0"
- status working
- fourcc TM2X
- fourcc TM2A TM2X
- driver vfw
- dll "tm2X.dll"
- out BGR32,BGR24,BGR16 flip
-
-videocodec tr20
- info "TrueMotion RT"
- status working
- fourcc TR20
- driver vfw
- dll "tr2032.dll"
- out BGR15
-
-videocodec sif1vfw
- info "sif1 alpha4"
- status working
- fourcc SIF1
- driver vfw
- dll "Sif1_vfw.dll"
- out YV12,YUY2
-
-videocodec sif1ds
- info "sif1 alpha4"
- status buggy
- comment "one frame every 5 seconds?"
- fourcc SIF1
- driver dshow
- dll "Sif1Dec.ax"
- guid 0x31666973, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71
- out BGR32
-
videocodec ffamv
info "Modified MJPEG, used in AMV files"
status working
@@ -2342,80 +1113,6 @@ videocodec ffsp5x
driver ffmpeg
dll "sp5x"
-videocodec sp6x
- info "SP6x codec"
- status buggy
- fourcc SP60,SP61,SP62
- driver vfw
- dll "sp6x_32.dll"
- out BGR24 flip
-
-videocodec sp5x
- info "SP5x codec - used by Aiptek MegaCam"
- status working
- fourcc SP53,SP54,SP55,SP56,SP57,SP58
- driver vfw
- dll "sp5x_32.dll"
- out BGR24,BGR15 flip
-
-videocodec sp4x
- info "SP4x codec - used by Aiptek MegaCam"
- status working
- fourcc SP40,SP41,SP42,SP43,SP44,SP45
- fourcc SP46,SP47
- driver vfw
- dll "SP4X_32.DLL"
- out BGR24,BGR15 flip
-
-videocodec bt411
- info "Brooktree 411 codec"
- status working
- fourcc BT20,Y41P
- driver vfwex
- dll "btvvc32.drv"
- out BGR24
-
-videocodec bwmpeg
- info "Broadway MPEG Capture Codec"
- status working
- fourcc BW10
- driver vfwex
- dll "bw10.dll" ;requires vtaccess.dll
- out YV12,YUY2,I420
-
-videocodec csmscreen
- info "csmscreen AVI lossless video codec"
- comment "requires Esdll.dll"
- status working
- fourcc CSM0
- driver vfw
- dll "csmx.dll" ; b6cfb690fe5997da0f07506c8982334f *CSMX.dll
- out BGR32,BGR24,BGR16 flip
-
-videocodec matchware
- info "matchware screen capture codec"
- status working
- fourcc MWSC
- driver vfw
- dll "mwsc.dll"
- out BGR24 flip
-
-videocodec zdsoft
- info "zdsoft screen recorder"
- status working
- fourcc ZDSV
- driver vfwex
- dll "scrvid.dll"
- out BGR32
-
-videocodec webtrain
- info "WebTrain Communication lossless screen recorder"
- status working
- fourcc WTVC
- driver vfw
- dll "wtvc.dll"
- out BGR16 flip
-
videocodec ffkega
info "FFmpeg Kega Video"
status working
@@ -2423,113 +1120,6 @@ videocodec ffkega
driver ffmpeg
dll kgv1
-videocodec kegavideo
- info "Kega Video"
- comment "requires MSVCR80.DLL on windows"
- status working
- fourcc KGV1
- driver vfw
- dll "KGV1-VFW.dll"
- out BGR16 flip
-
-videocodec xfire
- info "xfire video"
- status working
- fourcc XFR1
- driver vfw
- dll "xfcodec.dll"
- out YV12,YUY2
-
-videocodec vfapi
- info "VFAPI rgb transcode codec"
- status untested
- fourcc vifp
- driver vfwex
- dll "VFCodec.dll"
- out BGR24 flip
-
-videocodec eyecon
- info "nokia eti camcorder eyecon"
- status working
- fourcc NUB0,NUB1,NUB2
- driver vfw
- dll "nub2.dll"
- out YV12,YUY2
-
-videocodec smsvvfw
- info "WorldConnect Wavelet Video"
- comment "found in visualmail videos"
- status working
- fourcc SMSV
- driver vfw
- dll "wv32vfw.dll"
- out BGR24 flip
-
-videocodec adv601
- info "Analog Devices Wavelet Codec"
- status working
- fourcc ADV1
- driver vfw
- dll "ADV601.dll"
- out BGR24 flip
-
-videocodec advwavelet
- info "waveletvideo.freeservers.com"
- status working
- fourcc ADV1
- driver vfw
- dll "wavelet.dll"
- out BGR24 flip
-
-videocodec loronixwavlet
- info "loronix wavelet"
- status untested
- fourcc ADV1
- driver vfw
- dll "wavlor.dll"
- out BGR24
-
-videocodec foxmotion
- info "fox motion video"
- status working
- fourcc FMVC
- driver vfw
- dll "fmcodec.dll"
- out BGR32,BGR24,BGR15 flip
-
-videocodec tridvfw
- status untested
- fourcc ty2c,TY2C,ty0n
- fourcc TY2N,TY0N,T565
- driver vfw
- dll "TRICDC32.DRV"
- out BGR24 flip
-
-videocodec vdtzvfw
- info "Telegeny VDTZ"
- status working
- fourcc VDTZ
- driver vfw
- dll "VTZ32.DLL"
- out BGR24 flip
-
-videocodec vivd2
- info "SoftMedia ViVD V2 codec VfW"
- status working
- fourcc GXVE,gxve
- driver vfw
- dll "ViVD2.dll"
- out YUY2,YV12,I420,YVU9
- out BGR32,BGR24,BGR15
-
-videocodec winx
- info "Winnov Videum winx codec"
- status working
- fourcc WINX
- driver vfwex
- dll "wnvwinx.dll"
- out BGR32,BGR24,BGR15
-
videocodec ffwnv1
info "FFmpeg wnv1 codec"
status working
@@ -2537,41 +1127,6 @@ videocodec ffwnv1
driver ffmpeg
dll wnv1
-videocodec wnv1
- info "Winnov Videum wnv1 codec"
- status working
- fourcc WNV1
- driver vfwex
- dll "wnvplay1.dll"
- out BGR32,BGR24,BGR15
-
-videocodec vdom
- info "VDOWave codec"
- status working
- fourcc VDOM,VDOW
- driver vfw
- dll "vdowave.drv" ; Need also VDODEC32.dll and DECVW_32.DLL
- out BGR24 flip
-
-videocodec vdowave3
- info "VDOWave 3 advanced codec"
- status working
- fourcc VDO3
- fourcc VDOM,VDOW
- driver vfw
- dll "vdo32_30.drv" ; Need also decvdo.dll
- out BGR24 flip
-
-videocodec lsv
- info "Vianet Lsvx Video"
- status working
- fourcc lsvx
- fourcc lsvm
- fourcc lsvc
- driver vfw
- dll "lsvxdec.dll"
- out BGR32,BGR24,BGR16 flip
-
videocodec ffvmnc
info "FFmpeg VMware video"
status working
@@ -2579,14 +1134,6 @@ videocodec ffvmnc
driver ffmpeg
dll "vmnc"
-videocodec vmnc
- info "VMware video"
- status working
- fourcc VMnc
- driver vfw
- dll "vmnc.dll"
- out BGR24,BGR15,BGR8 query,flip
-
videocodec ffsmkvid
info "FFmpeg Smacker Video"
status working
@@ -2604,15 +1151,6 @@ videocodec ffcavs
driver ffmpeg
dll "cavs"
-videocodec qtdnxhd
- info "QuickTime Avid DNxHD"
- comment "needed for decoding 10-bit DNxHD"
- status working
- fourcc AVdn
- driver qtvideo
- dll "AvidAVdnCodec.qtx"
- out UYVY,BGR24
-
videocodec ffdnxhd
info "FFmpeg DNxHD"
status working
@@ -2620,128 +1158,6 @@ videocodec ffdnxhd
driver ffmpeg
dll "dnxhd"
-; quicktime codecs:
-
-videocodec qt3ivx
- info "win32/quicktime 3IV1 (3ivx)"
- status working
- fourcc 3IV1
- driver qtvideo
- dll "3ivx Delta 3.5.qtx"
- out YUY2
-
-videocodec qtactl
- info "Win32/QuickTime Streambox ACT-L2"
- status working
- fourcc ACTL
- driver qtvideo
- dll ACTLComponent.qtx
- out YUY2
-
-videocodec qtavui
- info "Win32/QuickTime Avid Meridien Uncompressed"
- status working
- fourcc AVUI
- driver qtvideo
- dll "AvidQTAVUICodec.qtx"
- out YUY2
-
-videocodec qth263
- info "Win32/QuickTime H.263"
- status crashing
- fourcc h263
- driver qtvideo
- dll "QuickTime.qts"
- out YUY2
-
-videocodec qtrlerpza
- info "Win32/Quicktime RLE/RPZA"
- comment "no colorspace accepted"
- status crashing
- fourcc rpza
- format 0x20656C72 ; "rle "
- driver qtvideo
- dll "QuickTime.qts"
- out BGR32,BGR24,BGR15
-
-videocodec qtvp3
- info "Win32/QuickTime VP3"
- status crashing
- fourcc VP31
- driver qtvideo
- dll "On2_VP3.qtx"
- out YUY2
-
-videocodec qtzygo
- info "win32/quicktime ZyGo"
- status buggy
- comment "wrong colors"
- fourcc ZyGo,zygo,lsvx
- driver qtvideo
- dll "ZyGoVideo.qtx"
- out BGR32,RGB32
-
-videocodec qtbhiv
- info "Win32/QuickTime BeHereiVideo"
- comment "sample file wanted!"
- status untested
- fourcc bhiv
- driver qtvideo
- dll "BeHereiVideo.qtx"
- out YUY2
-
-videocodec qtcvid
- info "Win32/QuickTime Cinepak"
- status working
- fourcc cvid
- driver qtvideo
- dll "QuickTime.qts"
- out YUY2
-
-videocodec qtindeo
- info "Win32/QuickTime Indeo"
- status crashing
- fourcc IV31,iv31
- fourcc IV32,iv32
- fourcc IV41
- driver qtvideo
- dll "QuickTime.qts"
- out YUY2
-
-videocodec qtmjpeg
- info "Win32/QuickTime MJPEG"
- status crashing
- fourcc dmb1
- fourcc mjpa
- fourcc mjpb
- driver qtvideo
- dll "QuickTime.qts"
- out YUY2
-
-videocodec qtmpeg4
- info "Win32/QuickTime MPEG-4"
- status crashing
- fourcc mp4v
- driver qtvideo
- dll "QuickTime.qts"
- out YUY2
-
-videocodec qtsvq3
- info "Win32/QuickTime SVQ3"
- status working
- fourcc SVQ3
- driver qtvideo
- dll "QuickTimeEssentials.qtx"
- out YUY2
-
-videocodec qtsvq1
- info "Win32/QuickTime SVQ1"
- status buggy
- fourcc SVQ1
- driver qtvideo
- dll "QuickTime.qts"
- out YVU9
-
videocodec ffv210
info "FFmpeg V210 - 10-bit"
status untested
@@ -2749,25 +1165,6 @@ videocodec ffv210
driver ffmpeg
dll v210
-videocodec qtcine
- info "cinewave uncompressed 10-bit codec"
- status working
-; fourcc 2yuv,R210,r210,2Vu1,R10g,R10k,r11k ;untested
- fourcc v210
- driver qtvideo
- dll "CineWave.qtx"
- out BGR32,BGR24,BGR8,Y800,RGB32,RGB24,RGB8
- out YV12,YUY2
-
-videocodec qtaic
- info "QuickTime AIC video decoder"
- comment "Mac OS X only"
- status untested
- fourcc icod
- driver qtvideo
- dll "QuickTime.qts"
- out UYVY
-
videocodec ffprores
info "Libav ProRes"
status working
@@ -2779,126 +1176,6 @@ videocodec ffprores
driver ffmpeg
dll prores
-videocodec qtprores
- info "Apple ProRes 422 (HQ) decoder"
- status working
- fourcc apch
- fourcc apcn
- fourcc apcs
- fourcc apco
- fourcc ap4h
- driver qtvideo
- dll "AppleProResDecoder.qtx"
- out YUY2
-
-; VSS codecs (http://vsofts.com/solutions.html):
-
-videocodec vsslight
- info "VSS Codec Light"
- status working
- fourcc VSSV
- driver vfw
- dll "vsslight.dll"
- out BGR24 flip
-
-videocodec vssh264
- info "VSS H.264 New"
- status working
- fourcc VSSH
- driver dshow
- dll "vsshdsd.dll"
- guid 0x6931C7e7, 0x75b7, 0x4729, 0xa1, 0x53, 0xa8, 0xad, 0x99, 0xbd, 0xf7, 0x0b
- out YV12
-
-videocodec vssh264old
- info "VSS H.264 Old"
- status working
- fourcc VSSH
- driver vfw
- dll "vssh264.dll" ; need also vssh264core.dll, vssh264dec.dll
- out BGR24 flip
-
-videocodec vsswlt
- info "VSS Wavelet Video Codec"
- status working
- fourcc VSSW
- driver vfw
- dll "vsswlt.dll"
- out BGR24 flip
-
-; buggy codecs: (any volunteers for native rewrite?)
-
-videocodec zlib
- info "AVIzlib"
- status working
- comment "24bpp only"
- fourcc ZLIB
- driver vfw
- dll "avizlib.dll"
- out BGR24 flip
-
-videocodec mszh
- info "AVImszh"
- status working
- comment "24bpp only"
- fourcc MSZH
- driver vfw
- dll "avimszh.dll"
-; out YUY2
-; out BGR32,BGR24,BGR15
- out BGR24
-
-videocodec alaris
- info "Alaris VideoGramPiX"
- status working
- fourcc VGPX,VTLP VGPX
- driver vfwex
- dll "vgpix32d.dll"
- out UYVY
- out BGR24
-
-
-; non-working codecs:
-
-videocodec vcr1
- info "ATI VCR-1"
- status crashing
- fourcc VCR1
- driver vfw
- dll "ativcr1.dll"
- out RGB24 flip
-
-videocodec pim1
- info "Pinnacle Hardware MPEG-1"
- status crashing
- comment "no picture. use ffmpeg12!"
- fourcc PIM1
- driver vfw
- dll "pclepim1.dll"
- out BGR24 flip
-; out I420
-; out YUY2
-; out BGR32,BGR24,BGR16,BGR15
-
-videocodec qpeg
- info "Q-Team's QPEG (www.q-team.de)"
- status working
- comment "BGR8 only!"
- fourcc Q1.0,QPEG
- fourcc Q1.1,qpeq
- driver vfw
- dll "qpeg32.dll"
- out BGR8 flip
-
-videocodec rricm
- info "rricm"
- status crashing
- fourcc dmb1
- driver vfw
- dll "rricm.dll"
- out YUY2
- out BGR24 flip
-
videocodec ffcamtasia
info "FFmpeg TechSmith Camtasia Screen Codec"
status working
@@ -2906,15 +1183,6 @@ videocodec ffcamtasia
driver ffmpeg
dll "camtasia"
-; sample videos: http://www.techsmith.com/products/camtasia/examplevideos.asp
-videocodec camtasia
- info "TechSmith Camtasia Screen Codec"
- status working
- fourcc TSCC,tscc
- driver vfw
- dll "tsccvid.dll"
- out BGR32,BGR24,BGR15,BGR8 query,flip
-
videocodec ffcamstudio
info "CamStudio Screen Codec"
status working
@@ -2922,16 +1190,6 @@ videocodec ffcamstudio
driver ffmpeg
dll "camstudio"
-; Fraps - Realtime Video Capture - http://www.fraps.com/
-videocodec fraps
- info "FRAPS: Realtime Video Capture"
- comment "Requires a processor with SSE???"
- status working
- fourcc FPS1,fps1
- driver vfw
- dll "frapsvid.dll"
- out BGR32 flip
-
videocodec fffraps
info "FFmpeg Fraps"
status working
@@ -3010,14 +1268,6 @@ videocodec fftxd
driver ffmpeg
dll txd
-videocodec xan
- info "XAN Video"
- status working
- fourcc Xxan
- driver vfw
- dll "xanlib.dll"
- out BGR24,BGR15,BGR8 query,flip
-
videocodec ffwc4
info "FFmpeg XAN wc4"
status working
@@ -3067,254 +1317,6 @@ videocodec ffeatgv
driver ffmpeg
dll eatgv
-; raw formats: (now RGB formats are autodetected)
-
-; these raw codecs are used mostly by TV input
-; 0x20776172 is used by Quicktime ('raw ')
-; 0x0 is used by AVI
-; YV12,RGB|32,RGB|24.. is created by MPlayer
-
-videocodec rawrgb32
- info "RAW RGB32"
- status working
- driver raw
- format 0x0
- format 0x20776172 0x52474220
- format 0x52474220
- out RGB32
-
-videocodec rawrgb24
- info "RAW RGB24"
- status working
- driver raw
- format 0x0
- format 0x20776172 0x52474218
- format 0x52474218
- out RGB24
-
-videocodec rawrgb16
- info "RAW RGB16"
- status working
- driver raw
- format 0x0
- format 0x20776172 0x52474210
- format 0x52474210
- out RGB16
-
-videocodec rawbgr32flip
- info "RAW BGR32"
- status working
- driver raw
- format 0x0
- out BGR32 flip
-
-videocodec rawbgr32
- info "RAW BGR32"
- status working
- driver raw
- format 0x0
- format 0x42475220
- out BGR32
-
-videocodec rawbgr24flip
- info "RAW BGR24"
- status working
- driver raw
- format 0x0
- out BGR24 flip
-
-videocodec rawbgr24
- info "RAW BGR24"
- status working
- driver raw
- format 0x0
- format 0x20776172 0x42475218
- format 0x42475218
- out BGR24
-
-videocodec rawbgr16flip
- info "RAW BGR15"
- status working
- driver raw
- format 0x0
- format 0x10424752 0x0
- out BGR16 flip
-
-videocodec rawbgr16
- info "RAW BGR15"
- status working
- driver raw
- format 0x0
- format 0x20776172 0x42475210
- format 0x42475210
- out BGR16
-
-videocodec rawbgr15flip
- info "RAW BGR15"
- status working
- driver raw
- format 0x0
- out BGR15 flip
-
-videocodec rawbgr15
- info "RAW BGR15"
- status working
- driver raw
- format 0x0
- format 0x20776172 0x4247520F
- format 0x4247520F
- out BGR15
-
-videocodec rawbgr8flip
- info "RAW BGR8"
- status working
- driver raw
- format 0x0
- out BGR8 flip
-
-videocodec rawbgr8
- info "RAW BGR8"
- status working
- driver raw
- format 0x0
- format 0x20776172 0x42475208
- format 0x42475208
- out BGR8
-
-videocodec rawbgr1
- info "RAW BGR1"
- status working
- driver raw
- format 0x0
- format 0x20776172 0x42475201
- format 0x42475201
- out BGR1 flip
-
-videocodec rawyuy2
- info "RAW YUY2"
- status working
- driver raw
- format 0x0 0x32595559
- format 0x20776172 0x32595559
- fourcc yuy2,YUY2
- fourcc V422 YUY2
- fourcc YUNV YUY2
- fourcc VYUY YUY2
- fourcc yuvs YUY2
- fourcc DVOO YUY2
- out YUY2
-
-videocodec rawyuv2
- info "RAW YUV2"
- status working
- driver raw
- format 0x0 0x32565559
- format 0x20776172 0x32565559
- fourcc yuv2,YUV2
- out YUY2
-
-videocodec rawuyvy
- info "RAW UYVY"
- status working
- driver raw
- format 0x0 0x59565955
- format 0x79757632 0x59565955 # 2vuy as created by QuickTime captures
- format 0x20776172 0x59565955
- fourcc uyvy,UYVY
- fourcc HDYC UYVY
- fourcc UYNV UYVY
- fourcc UYNY UYVY
- fourcc uyv1 UYVY
- fourcc 2Vu1 UYVY
- fourcc VDTZ UYVY
- out UYVY
-
-videocodec raw444P
- info "RAW 444P"
- status working
- driver raw
- format 0x0 0x50343434
- format 0x20776172 0x50343434
- fourcc 444p,444P
- fourcc YV24 444P
- out 444P
-
-videocodec raw422P
- info "RAW 422P"
- status working
- driver raw
- format 0x0 0x50323234
- format 0x20776172 0x50323234
- fourcc 422p,422P
- fourcc P422 422P
- fourcc Y42B 422P
- fourcc YV16 422P
- out 422P
-
-videocodec rawyv12
- info "RAW YV12"
- status working
- driver raw
- format 0x0 0x32315659
- format 0x20776172 0x32315659
- fourcc yv12,YV12
- out YV12
-
-videocodec rawnv21
- info "RAW NV21"
- status working
- driver raw
- format 0x0 0x3132564E
- format 0x20776172 0x3132564E
- fourcc nv21,NV21
- out NV21
-
-videocodec rawnv12
- info "RAW NV12"
- status working
- driver raw
- format 0x0 0x3231564E
- format 0x20776172 0x3231564E
- fourcc nv12,NV12
- out NV12
-
-videocodec rawhm12
- info "RAW HM12"
- status working
- driver hmblck
- format 0x0 0x32314D48
- format 0x20776172 0x32314D48
- fourcc hm12,HM12
- out YV12
-
-videocodec rawi420
- info "RAW I420"
- status working
- driver raw
- format 0x0 0x30323449
- format 0x20776172 0x30323449
- fourcc i420,I420
- fourcc IYUV,iyuv
- out I420,IYUV
-
-videocodec rawyvu9
- info "RAW YVU9"
- status working
- driver raw
- format 0x0 0x39555659
- format 0x20776172 0x39555659
- fourcc yvu9,YVU9
- out YVU9
-
-videocodec rawy800
- info "RAW Y8/Y800"
- status working
- driver raw
- format 0x0
- format 0x20203859 ; "Y8 "
- fourcc y800,Y800
- out Y800,Y8
-
;lavc raw codecs
videocodec ffrawyuy2
@@ -3416,21 +1418,6 @@ videocodec ffrawy800
driver ffmpeg
dll rawvideo
-; NULL codec - for testing.
-
-videocodec null
- info "NULL codec (no decoding!)"
- status crashing
- comment "for unknown/unsupported codecs or testing"
- driver null
- anyinput
- out YV12
- out I420
- out YUY2
- out UYVY
- out YVU9
- out BGR32,BGR24,BGR16,BGR15
-
;=============================================================================
; AUDIO CODECS
;=============================================================================
@@ -3441,42 +1428,6 @@ audiocodec lavc
driver ffmpeg
anyinput
-audiocodec wma9dmo
- info "Windows Media Audio 9 DMO"
- status working
- format 0x162
- format 0x163
- driver dmo
- dll "wma9dmod.dll"
- guid 0x27ca0808, 0x01f5, 0x4e7a, 0x8b, 0x05, 0x87, 0xf8, 0x07, 0xa2, 0x33, 0xd1
-
-audiocodec wmadmo
- info "Windows Media Audio DMO"
- status working
- format 0x160
- format 0x161
- format 0x162
- format 0x163
- driver dmo
- dll "wmadmod.dll"
- guid 0x2eeb4adf, 0x4578, 0x4d10, 0xbc, 0xa7, 0xbb, 0x95, 0x5f, 0x56, 0x32, 0x0a
-
-audiocodec wma9spdmo
- info "Windows Media Audio 9 Speech DMO"
- status working
- format 0xa
- driver dmo
- dll "wmspdmod.dll"
- guid 0x874131cb, 0x4ecc, 0x443b, 0x89, 0x48, 0x74, 0x6b, 0x89, 0x59, 0x5d, 0x20
-
-audiocodec wma9spdshow
- info "Windows Media Audio 9 Speech DShow"
- status working
- format 0xa
- driver dshow
- dll "wmavds32.ax"
- guid 0x795b44c4, 0xf142, 0x493d, 0x8a, 0x02, 0x09, 0xbd, 0x41, 0x08, 0x95, 0xad
-
audiocodec ffqdm2
info "FFmpeg QDM2 audio"
status working
@@ -3484,14 +1435,6 @@ audiocodec ffqdm2
driver ffmpeg
dll "qdm2"
-audiocodec qdmc
- info "QuickTime QDMC/QDM2 audio"
- status working
- fourcc QDM2
- fourcc QDMC
- driver qtaudio
- dll "QuickTime.qts"
-
audiocodec ffqclp
info "FFmpeg QCLP audio"
status working
@@ -3501,34 +1444,6 @@ audiocodec ffqclp
driver ffmpeg
dll "qcelp"
-audiocodec qclp
- info "QuickTime QCLP audio"
- status working
- fourcc Qclp
- driver qtaudio
- dll "QuickTime.qts"
-
-audiocodec qtmace3
- info "QuickTime MACE3 audio"
- status working
- fourcc MAC3
- driver qtaudio
- dll "QuickTime.qts"
-
-audiocodec qtmace6
- info "QuickTime MACE6 audio"
- status working
- fourcc MAC6
- driver qtaudio
- dll "QuickTime.qts"
-
-audiocodec zygoaudio
- info "Zygo audio"
- status working
- fourcc SPXN
- driver qtaudio
- dll "ZyGoAudioS.qtx"
-
audiocodec ffra144
info "FFmpeg RealAudio 1.0"
status working
@@ -3567,155 +1482,6 @@ audiocodec ffsipr
driver ffmpeg
dll "sipr"
-audiocodec ra144
- info "RealAudio 1.0"
- status working
- fourcc 14_4
- driver realaud
- dll "14_4.so.6.0"
-
-audiocodec ra144win
- info "Win32 RealAudio 1.0"
- status working
- fourcc 14_4
- driver realaud
- dll "14_43260.dll"
-
-audiocodec ra144mac
- info "Mac OS X RealAudio 1.0"
- status working
- fourcc 14_4
- driver realaud
- dll "14_4.shlb"
-
-audiocodec ra288
- info "RealAudio 2.0"
- status working
- fourcc 28_8
- driver realaud
- dll "28_8.so.6.0"
-
-audiocodec ra288win
- info "Win32 RealAudio 2.0"
- status working
- fourcc 28_8
- driver realaud
- dll "28_83260.dll"
-
-audiocodec ra288mac
- info "Mac OS X RealAudio 2.0"
- status working
- fourcc 28_8
- driver realaud
- dll "28_8.shlb"
-
-audiocodec ra10cook
- info "RealPlayer 10 COOK audio"
- comment "supports cook 5.1"
- status working
- fourcc cook
- driver realaud
- dll "cook.so"
-
-audiocodec racook
- info "RealAudio COOK"
- status working
- fourcc cook
- driver realaud
- dll "cook.so.6.0"
-
-audiocodec ra10cookwin
- info "Win32 RealAudio 10 COOK"
- comment "supports cook 5.1"
- status working
- fourcc cook
- driver realaud
- dll "cook.dll"
-
-audiocodec racookwin
- info "Win32 RealAudio COOK"
- status working
- fourcc cook
- driver realaud
- dll "cook3260.dll"
-
-audiocodec racookmac
- info "Mac OS X RealAudio COOK"
- status working
- fourcc cook
- driver realaud
- dll "cook.bundle/Contents/MacOS/cook"
-
-audiocodec rasipr
- info "RealAudio Sipro"
- status working
- fourcc sipr
- driver realaud
- dll "sipr.so.6.0"
-
-audiocodec ra10sipr
- info "RealPlayer 10 RealAudio Sipro"
- status working
- fourcc sipr
- driver realaud
- dll "sipr.so"
-
-audiocodec ra10siprwin
- info "Win32 RealAudio 10 Sipro"
- status working
- fourcc sipr
- driver realaud
- dll "sipr.dll"
-
-audiocodec rasiprwin
- info "Win32 RealAudio Sipro"
- status working
- fourcc sipr
- driver realaud
- dll "sipr3260.dll"
-
-audiocodec rasiprmac
- info "Mac OS X RealAudio Sipro"
- status working
- fourcc sipr
- driver realaud
- dll "sipr.bundle/Contents/MacOS/sipr"
-
-audiocodec raatrc
- info "RealAudio ATRAC3"
- status working
- fourcc atrc
- driver realaud
- dll "atrc.so.6.0"
-
-audiocodec ra10atrc
- info "RealPlayer 10 RealAudio ATRAC3"
- status working
- fourcc atrc
- driver realaud
- dll "atrc.so"
-
-audiocodec ra10atrcwin
- info "Win32 RealAudio 10 ATRAC3"
- status working
- fourcc atrc
- driver realaud
- dll "atrc.dll"
-
-audiocodec raatrcwin
- info "Win32 RealAudio ATRAC3"
- status working
- fourcc atrc
- driver realaud
- dll "atrc3260.dll"
-
-audiocodec raatrcmac
- info "Mac OS X RealAudio ATRAC3"
- status working
- fourcc atrc
- driver realaud
- dll "atrc.bundle/Contents/MacOS/atrc"
-
audiocodec ffadpcmadx
info "FFmpeg SEGA CRI adx codec"
status working
@@ -3746,14 +1512,6 @@ audiocodec ffadpcmimawav
driver ffmpeg
dll adpcm_ima_wav
-audiocodec imaadpcm
- info "IMA ADPCM"
- status working
- format 0x11
- fourcc ima4 ; (MOV files)
- format 0x1100736d ; "ms\x00\x11" (MOV files)
- driver imaadpcm
-
audiocodec ffadpcmms
info "FFmpeg MS ADPCM audio"
status working
@@ -3762,13 +1520,6 @@ audiocodec ffadpcmms
driver ffmpeg
dll adpcm_ms
-audiocodec msadpcm
- info "MS ADPCM"
- status working
- format 0x2
- format 0x0200736d ; "ms\x00\x02" (MOV files)
- driver msadpcm
-
audiocodec ffadpcmimadk4
info "FFmpeg DK4 IMA ADPCM audio"
status working
@@ -3777,13 +1528,6 @@ audiocodec ffadpcmimadk4
driver ffmpeg
dll adpcm_ima_dk4
-audiocodec dk4adpcm
- info "Duck DK4 ADPCM (rogue format number)"
- status working
- format 0x61 ; This format number was used by Duck Corp. but not officially
- ; registered with Microsoft
- driver imaadpcm
-
audiocodec ffadpcmimadk3
info "FFmpeg DK3 IMA ADPCM audio"
status working
@@ -4009,74 +1753,6 @@ audiocodec ffnellymoser
driver ffmpeg
dll "nellymoser"
-audiocodec faad
- info "FAAD AAC (MPEG-2/MPEG-4 Audio)"
- status working
- fourcc mp4a,MP4A,MP4L
- fourcc "VLB " ; Used in NSV, not really working
- fourcc "AAC " ; Used in NSV
- fourcc "AACP" ; Used in NSV for AACPlus
- fourcc raac,racp
- format 0xff
- format 0x706D
- format 0x4143 ; aac in asf
- format 0xA106 ; aac in avi
- format 0xAAC0 ; Borgtech nonsense tag
- driver faad
- dll libfaad2
-
-audiocodec pcm
- info "Uncompressed PCM"
- status working
- format 0x0
- format 0x1
- format 0x3 ; IEEE float
- format 0xfffe ; Extended
- fourcc "raw " ; (MOV files)
- fourcc twos ; (MOV files)
- fourcc sowt ; (MOV files)
- fourcc fl32 ; (MOV files)
- fourcc 23lf ; (MOV files)
-; fourcc fl64 ; (MOV files)
-; fourcc 46lf ; (MOV files)
- fourcc NONE ; (MOV files from Kodak CX6320)
- fourcc in24 ; (MOV files)
- fourcc 42ni ; (MOV files)
- fourcc in32 ; (MOV files)
- fourcc 23ni ; (MOV files)
- fourcc lpcm ; (MOV files)
- fourcc FL32 ; (aiff files)
-;;;; these are for hardware support only: (alaw,ulaw,ima-adpcm,mpeg,ac3)
-; format 0x6
-; format 0x7
-; format 0x11
-; format 0x50
-; format 0x2000
-;;;;
- driver pcm
-
-audiocodec divx
- info "DivX audio (WMA)"
- status working
- format 0x160
- format 0x161
- driver acm
- dll "divxa32.acm"
-
-audiocodec vdowaveacm
- info "vdowave ACM"
- status working
- format 0xFFFC
- driver acm
- dll "vdowave.acm"
-
-audiocodec msadpcmacm
- info "MS ADPCM"
- status working
- format 0x2
- driver acm
- dll "msadp32.acm"
-
audiocodec ffpcmdaud
info "D-Cinema audio (FFmpeg)"
status untested
@@ -4232,33 +1908,6 @@ audiocodec ffmp2
driver ffmpeg
dll "mp2"
-audiocodec mad
- info "libMAD MPEG layer 1-2-3"
- status working
- format 0x50
- format 0x55
- format 0x5500736d ; "ms\0\x55" older mp3 fcc (MOV files)
- fourcc ".mp3" ; CBR/VBR MP3 (MOV files)
- fourcc "MP3 " ; used in .nsv files
- fourcc "LAME" ; used in mythtv .nuv files
- driver libmad
- dll "libmad"
-
-audiocodec mp3acm
- info "MPEG layer-3"
- status working
- comment "conflicts with security kernel patches"
- format 0x55
- driver acm
- dll "l3codeca.acm"
-
-audiocodec imaadpcmacm
- info "IMA ADPCM"
- status working
- format 0x11
- driver acm
- dll "imaadp32.acm"
-
audiocodec ffgsm
info "FFmpeg GSM 06.10"
status working
@@ -4292,43 +1941,6 @@ audiocodec libgsmms
driver ffmpeg
dll "libgsm_ms"
-audiocodec msgsmacm
- info "MS GSM"
- status working
- format 0x31
-; format 0x32
- driver acm
- dll "msgsm32.acm"
-
-audiocodec msnaudio
- info "MSN AUDIO"
- status working
-; format 0x31
- format 0x32
- driver acm
- dll "msnaudio.acm"
-
-audiocodec alaw
- info "aLaw"
- status working
- format 0x6
- fourcc alaw ; (MOV files)
- driver alaw
-
-audiocodec ulaw
- info "uLaw"
- status working
- format 0x7
- fourcc ulaw ; (MOV files)
- format 0x6c75
- driver alaw
-
-audiocodec dvdpcm
- info "Uncompressed DVD/VOB LPCM"
- status working
- format 0x10001
- driver dvdpcm
-
audiocodec fflpcm
info "Blu-ray LPCM"
status working
@@ -4373,18 +1985,6 @@ audiocodec ffeac3
driver ffmpeg
dll eac3
-audiocodec a52
- info "AC3-liba52"
- status working
- format 0x2000
- fourcc ac-3 ; ac-3 in mp4
- fourcc AC-3
- format 0x20736D ; "ms\20" older ac3 fcc (MOV files)
- fourcc dnet
- fourcc sac3
- driver liba52
- dll "liba52"
-
; add every new fourcc also to allocate_parser()
; in libmpdemux/demuxer.c
audiocodec ffdca
@@ -4395,13 +1995,6 @@ audiocodec ffdca
driver ffmpeg
dll "dca"
-audiocodec dts
- info "DTS-libdca"
- status working
- format 0x2001
- format 0x86
- driver libdca
-
audiocodec ffmusepack7
info "Musepack sv7 audio codec"
comment "only works with libavformat demuxer"
@@ -4450,32 +2043,6 @@ audiocodec ffadcpmswf
driver ffmpeg
dll "adpcm_swf"
-audiocodec voxvoice
- info "VoxWare MetaVoice"
- status working
- comment "windows users need msms001.vwp and mvoice.vwp in windows\\system32 folder"
- format 0x74
- driver dshow
- dll "voxmvdec.ax" ; need also msms001.vwp and mvoice.vwp
- guid 0x46e32b01, 0xa465, 0x11d1, 0xb5, 0x50, 0x00, 0x60, 0x97, 0x24, 0x2d, 0x8d
-
-audiocodec voxware
- info "VoxWare"
- status working
- comment "windows users need msms001.vwp in windows\\system32 folder"
- format 0x75
- driver dshow
- dll "voxmsdec.ax" ; need also msms001.vwp
- guid 0x73f7a062, 0x8829, 0x11d1, 0xb5, 0x50, 0x00, 0x60, 0x97, 0x24, 0x2d, 0x8d
-
-audiocodec acelp
- info "ACELP.net Sipro Lab Audio"
- status working
- format 0x130
- driver dshow
- dll "acelpdec.ax"
- guid 0x4009f700, 0xaeba, 0x11d1, 0x83, 0x44, 0x00, 0xc0, 0x4f, 0xb9, 0x2e, 0xb7
-
audiocodec ffimc
info "FFmpeg Intel Music Coder"
status working
@@ -4483,21 +2050,6 @@ audiocodec ffimc
driver ffmpeg
dll "imc"
-audiocodec imc
- info "Intel Music Coder"
- status working
- comment "driver at http://codeczone.virtualave.net/FXIMCAUD.zip"
- format 0x401
- driver acm
- dll "imc32.acm"
-
-audiocodec iac25
- info "Indeo audio"
- status working
- format 0x402
- driver acm
- dll "iac25_32.ax"
-
audiocodec ffctadp32
info "FFmpeg Creative ADPCM codec"
status working
@@ -4505,34 +2057,6 @@ audiocodec ffctadp32
driver ffmpeg
dll "adpcm_ct"
-audiocodec ctadp32
- info "Creative ADPCM codec"
- status working
- format 0x200
- driver acm
- dll "ctadp32.acm"
-
-audiocodec sc4
- info "SC4 : Micronas speech codec (ADPCM, MPman recording)"
- status working
- format 0x350
- driver acm
- dll "mi-sc4.acm"
-
-audiocodec hwac3
- info "AC3 through S/PDIF"
- status working
- format 0x2000
- format 0x332D6361 ; ac-3 in mp4
- fourcc dnet
- driver hwac3
-
-audiocodec hwdts
- info "DTS through S/PDIF"
- status working
- format 0x2001
- driver hwac3
-
audiocodec ffvorbis
info "FFmpeg Vorbis"
status working
@@ -4541,23 +2065,6 @@ audiocodec ffvorbis
driver ffmpeg
dll "vorbis"
-audiocodec vivoaudio
- info "Vivo G.723/Siren Audio Codec"
- status working
- format 0x111 ; vivo g.723
- format 0x112 ; siren
- driver acm
- dll "vivog723.acm"
-
-audiocodec g72x
- info "G.711/G.721/G.723"
- status crashing
- comment "does not work yet - just noise :("
- format 0x111 ; vivo g.723
- format 0x112 ; vivo siren
- driver g72x
- dll "g72x.c"
-
audiocodec ffg722
info "G.722 Audio"
status working
@@ -4572,30 +2079,6 @@ audiocodec ffg726
driver ffmpeg
dll "g726"
-audiocodec g726
- info "Sharp G.726 Audio"
- status untested
- format 0x45
- driver acm
- dll "scg726.acm"
-
-audiocodec atrac3
- info "Sony ATRAC3"
- status buggy
- comment "format not accepted"
- format 0x270
- driver acm
- dll "atrac3.acm"
-
-audiocodec ALF2
-; http://www.nctsoft.com/products/NCTALFCD/
-; jdp@mail.sonofon.dk
- info "ALF2"
- status working
- format 0x1FC4 ; ALF2
- driver acm
- dll "alf2cd.acm"
-
audiocodec fftruespeech
info "FFmpeg TrueSpeech"
status working
@@ -4604,62 +2087,6 @@ audiocodec fftruespeech
driver ffmpeg
dll "truespeech"
-audiocodec truespeech
- info "DSP Group TrueSpeech(TM)"
- status working
- format 0x22
- driver acm
- dll "tssoft32.acm" ; need also tsd32.dll
-
-audiocodec netspeakgsm
- info "NetSpeak GSM"
- status working
- format 0x1500
- driver acm
- dll "nsgsm32.acm"
-
-audiocodec netspeakts
- info "NetSpeak TrueSpeech"
- status working
- format 0x1501
- driver acm
- dll "nstsp32.acm"
-
-; rt32dcmp.dll needed too
-audiocodec voxwarert24
- info "VoxWare RT24 speech codec"
- status working
- format 0x181c
- driver acm
- dll "nsrt2432.acm"
-
-audiocodec lhacm
- info "Lernout & Hauspie CELP and SBC codecs"
- status working
- format 0x1101 ; CELP
- format 0x1102 ; SBC
- format 0x1103 ; SBC
- format 0x1104 ; SBC
- driver acm
- dll "lhacm.acm"
-
-audiocodec lhacm2
- info "Voxware AC aka Lernout & Hauspie CELP and CBS codecs"
- status working
- format 0x70
- format 0x71
- format 0x72
- format 0x73
- driver acm
- dll "lhacm2.acm" ; aka lhacm.acm md5sum 4585780a8eb71d86df64553b34ba8f79
-
-audiocodec pscelp
- info "Philips Speech Processing CELP"
- status working
- format 0x120
- driver acm
- dll "smcelp32.acm"
-
audiocodec fftwinvq
info "FFmpeg TwinVQ"
status working
@@ -4668,33 +2095,6 @@ audiocodec fftwinvq
driver ffmpeg
dll twinvq
-audiocodec hwmpa
- info "MPEG audio pass-through for hardware MPEG decoders"
- status working
- comment "for hardware MPEG audio decoders"
- format 0x50 ; layer-1 && layer-2
- format 0x55 ; layer-3
- format 0x5500736d ; "ms\0\x55" older MP3 fourcc (MOV files)
- fourcc ".mp3" ; CBR/VBR MP3 (MOV files)
- fourcc "MP3 " ; used in .nsv files
- fourcc "LAME" ; used in mythtv .nuv files
- driver hwmpa
-
-audiocodec msnsiren
- info "msn siren audio codec"
- status working
- format 0x28E
- driver acm
- dll "sirenacm.dll"
-
-audiocodec uleaddva
- info "Ulead DV ACM"
- status working
- format 0x215
- format 0x216
- driver acm
- dll "dvacm.acm"
-
audiocodec spdifaac
info "libavformat/spdifenc AAC pass-through decoder"
status working
diff --git a/libmpcodecs/ad.c b/libmpcodecs/ad.c
index 0c56f0d546..aea9badadf 100644
--- a/libmpcodecs/ad.c
+++ b/libmpcodecs/ad.c
@@ -33,42 +33,14 @@
extern const ad_functions_t mpcodecs_ad_mpg123;
extern const ad_functions_t mpcodecs_ad_ffmpeg;
-extern const ad_functions_t mpcodecs_ad_liba52;
-extern const ad_functions_t mpcodecs_ad_hwac3;
-extern const ad_functions_t mpcodecs_ad_hwmpa;
-extern const ad_functions_t mpcodecs_ad_pcm;
-extern const ad_functions_t mpcodecs_ad_dvdpcm;
-extern const ad_functions_t mpcodecs_ad_alaw;
-extern const ad_functions_t mpcodecs_ad_imaadpcm;
-extern const ad_functions_t mpcodecs_ad_faad;
-extern const ad_functions_t mpcodecs_ad_libmad;
extern const ad_functions_t mpcodecs_ad_spdif;
-extern const ad_functions_t mpcodecs_ad_libdca;
const ad_functions_t * const mpcodecs_ad_drivers[] =
{
#ifdef CONFIG_MPG123
&mpcodecs_ad_mpg123,
#endif
-#ifdef CONFIG_LIBA52
- &mpcodecs_ad_liba52,
-#endif
- &mpcodecs_ad_hwac3,
- &mpcodecs_ad_hwmpa,
&mpcodecs_ad_ffmpeg,
&mpcodecs_ad_spdif,
- &mpcodecs_ad_pcm,
- &mpcodecs_ad_dvdpcm,
- &mpcodecs_ad_alaw,
- &mpcodecs_ad_imaadpcm,
-#ifdef CONFIG_FAAD
- &mpcodecs_ad_faad,
-#endif
-#ifdef CONFIG_LIBMAD
- &mpcodecs_ad_libmad,
-#endif
-#ifdef CONFIG_LIBDCA
- &mpcodecs_ad_libdca,
-#endif
NULL
};
diff --git a/libmpcodecs/ad_alaw.c b/libmpcodecs/ad_alaw.c
deleted file mode 100644
index 4a8f3849cf..0000000000
--- a/libmpcodecs/ad_alaw.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include "config.h"
-#include "ad_internal.h"
-
-static const ad_info_t info =
-{
- "aLaw/uLaw audio decoder",
- "alaw",
- "Nick Kurshev",
- "A'rpi",
- ""
-};
-
-LIBAD_EXTERN(alaw)
-
-#include "native/alaw.h"
-
-static int init(sh_audio_t *sh_audio)
-{
- /* aLaw audio codec:*/
- if(!sh_audio->wf) return 0;
- sh_audio->channels=sh_audio->wf->nChannels;
- sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
- sh_audio->i_bps=sh_audio->channels*sh_audio->samplerate;
- sh_audio->samplesize=2;
- return 1;
-}
-
-static int preinit(sh_audio_t *sh)
-{
- sh->audio_out_minsize=2048;
- sh->ds->ss_div = 1; // 1 samples/packet
- sh->ds->ss_mul = sh->wf->nChannels; // bytes/packet
- return 1;
-}
-
-static void uninit(sh_audio_t *sh)
-{
-}
-
-static int control(sh_audio_t *sh,int cmd,void* arg, ...)
-{
- int skip;
- switch(cmd)
- {
- case ADCTRL_SKIP_FRAME:
- skip=sh->i_bps/16;
- skip=skip&(~3);
- demux_read_data(sh->ds,NULL,skip);
- return CONTROL_TRUE;
- default:
- return CONTROL_UNKNOWN;
- }
- return CONTROL_UNKNOWN;
-}
-
-static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
-{
- int len;
- int l=demux_read_data(sh_audio->ds,buf,minlen/2);
- unsigned short *d=(unsigned short *) buf;
- unsigned char *s=buf;
- len=2*l;
- if(sh_audio->format==6 || sh_audio->format==0x77616C61){
- /* aLaw */
- while(l>0){ --l; d[l]=alaw2short[s[l]]; }
- } else {
- /* uLaw */
- while(l>0){ --l; d[l]=ulaw2short[s[l]]; }
- }
- return len;
-}
diff --git a/libmpcodecs/ad_dvdpcm.c b/libmpcodecs/ad_dvdpcm.c
deleted file mode 100644
index 41f6a1426d..0000000000
--- a/libmpcodecs/ad_dvdpcm.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include "config.h"
-#include "mp_msg.h"
-#include "ad_internal.h"
-
-static const ad_info_t info =
-{
- "Uncompressed DVD/VOB LPCM audio decoder",
- "dvdpcm",
- "Nick Kurshev",
- "A'rpi",
- ""
-};
-
-LIBAD_EXTERN(dvdpcm)
-
-static int init(sh_audio_t *sh)
-{
-/* DVD PCM Audio:*/
- sh->i_bps = 0;
- if(sh->codecdata_len==3){
- // we have LPCM header:
- unsigned char h=sh->codecdata[1];
- sh->channels=1+(h&7);
- switch((h>>4)&3){
- case 0: sh->samplerate=48000;break;
- case 1: sh->samplerate=96000;break;
- case 2: sh->samplerate=44100;break;
- case 3: sh->samplerate=32000;break;
- }
- switch ((h >> 6) & 3) {
- case 0:
- sh->sample_format = AF_FORMAT_S16_BE;
- sh->samplesize = 2;
- break;
- case 1:
- mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, "Samples of this format are needed to improve support. Please contact the developers.\n");
- sh->i_bps = sh->channels * sh->samplerate * 5 / 2;
- case 2:
- sh->sample_format = AF_FORMAT_S24_BE;
- sh->samplesize = 3;
- break;
- default:
- sh->sample_format = AF_FORMAT_S16_BE;
- sh->samplesize = 2;
- }
- } else {
- // use defaults:
- sh->channels=2;
- sh->samplerate=48000;
- sh->sample_format = AF_FORMAT_S16_BE;
- sh->samplesize = 2;
- }
- if (!sh->i_bps)
- sh->i_bps = sh->samplesize * sh->channels * sh->samplerate;
- return 1;
-}
-
-static int preinit(sh_audio_t *sh)
-{
- sh->audio_out_minsize=2048;
- return 1;
-}
-
-static void uninit(sh_audio_t *sh)
-{
-}
-
-static int control(sh_audio_t *sh,int cmd,void* arg, ...)
-{
- int skip;
- switch(cmd)
- {
- case ADCTRL_SKIP_FRAME:
- skip=sh->i_bps/16;
- skip=skip&(~3);
- demux_read_data(sh->ds,NULL,skip);
- return CONTROL_TRUE;
- }
- return CONTROL_UNKNOWN;
-}
-
-static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
-{
- int j,len;
- if (sh_audio->samplesize == 3) {
- if (((sh_audio->codecdata[1] >> 6) & 3) == 1) {
- // 20 bit
- // not sure if the "& 0xf0" and "<< 4" are the right way around
- // can somebody clarify?
- for (j = 0; j < minlen; j += 12) {
- char tmp[10];
- len = demux_read_data(sh_audio->ds, tmp, 10);
- if (len < 10) break;
- // first sample
- buf[j + 0] = tmp[0];
- buf[j + 1] = tmp[1];
- buf[j + 2] = tmp[8] & 0xf0;
- // second sample
- buf[j + 3] = tmp[2];
- buf[j + 4] = tmp[3];
- buf[j + 5] = tmp[8] << 4;
- // third sample
- buf[j + 6] = tmp[4];
- buf[j + 7] = tmp[5];
- buf[j + 8] = tmp[9] & 0xf0;
- // fourth sample
- buf[j + 9] = tmp[6];
- buf[j + 10] = tmp[7];
- buf[j + 11] = tmp[9] << 4;
- }
- len = j;
- } else {
- // 24 bit
- for (j = 0; j < minlen; j += 12) {
- char tmp[12];
- len = demux_read_data(sh_audio->ds, tmp, 12);
- if (len < 12) break;
- // first sample
- buf[j + 0] = tmp[0];
- buf[j + 1] = tmp[1];
- buf[j + 2] = tmp[8];
- // second sample
- buf[j + 3] = tmp[2];
- buf[j + 4] = tmp[3];
- buf[j + 5] = tmp[9];
- // third sample
- buf[j + 6] = tmp[4];
- buf[j + 7] = tmp[5];
- buf[j + 8] = tmp[10];
- // fourth sample
- buf[j + 9] = tmp[6];
- buf[j + 10] = tmp[7];
- buf[j + 11] = tmp[11];
- }
- len = j;
- }
- } else
- len=demux_read_data(sh_audio->ds,buf,(minlen+3)&(~3));
- return len;
-}
diff --git a/libmpcodecs/ad_faad.c b/libmpcodecs/ad_faad.c
deleted file mode 100644
index d750f2ff30..0000000000
--- a/libmpcodecs/ad_faad.c
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * MPlayer AAC decoder using libfaad2
- *
- * Copyright (C) 2002 Felix Buenemann <atmosfear at users.sourceforge.net>
- *
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <neaacdec.h>
-
-#include "config.h"
-#include "options.h"
-#include "ad_internal.h"
-#include "libaf/reorder_ch.h"
-
-static const ad_info_t info =
-{
- "AAC (MPEG2/4 Advanced Audio Coding)",
- "faad",
- "Felix Buenemann",
- "faad2",
- "uses libfaad2"
-};
-
-LIBAD_EXTERN(faad)
-
-/* configure maximum supported channels, *
- * this is theoretically max. 64 chans */
-#define FAAD_MAX_CHANNELS 8
-#define FAAD_BUFFLEN (FAAD_MIN_STREAMSIZE*FAAD_MAX_CHANNELS)
-
-//#define AAC_DUMP_COMPRESSED
-
-static faacDecHandle faac_hdec;
-static faacDecFrameInfo faac_finfo;
-
-static int preinit(sh_audio_t *sh)
-{
- sh->audio_out_minsize=8192*FAAD_MAX_CHANNELS;
- sh->audio_in_minsize=FAAD_BUFFLEN;
- return 1;
-}
-
-static int aac_probe(unsigned char *buffer, int len)
-{
- int i = 0, pos = 0;
- mp_msg(MSGT_DECAUDIO,MSGL_V, "\nAAC_PROBE: %d bytes\n", len);
- while(i <= len-4) {
- if(
- ((buffer[i] == 0xff) && ((buffer[i+1] & 0xf6) == 0xf0)) ||
- (buffer[i] == 'A' && buffer[i+1] == 'D' && buffer[i+2] == 'I' && buffer[i+3] == 'F')
- ) {
- pos = i;
- break;
- }
- mp_msg(MSGT_DECAUDIO,MSGL_V, "AUDIO PAYLOAD: %x %x %x %x\n", buffer[i], buffer[i+1], buffer[i+2], buffer[i+3]);
- i++;
- }
- mp_msg(MSGT_DECAUDIO,MSGL_V, "\nAAC_PROBE: ret %d\n", pos);
- return pos;
-}
-
-static int init(sh_audio_t *sh)
-{
- struct MPOpts *opts = sh->opts;
- unsigned long faac_samplerate;
- unsigned char faac_channels;
- int faac_init, pos = 0;
- faac_hdec = faacDecOpen();
-
- // If we don't get the ES descriptor, try manual config
- if(!sh->codecdata_len && sh->wf) {
- sh->codecdata_len = sh->wf->cbSize;
- sh->codecdata = malloc(sh->codecdata_len);
- memcpy(sh->codecdata, sh->wf+1, sh->codecdata_len);
- mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: codecdata extracted from WAVEFORMATEX\n");
- }
- if(!sh->codecdata_len || sh->format == mmioFOURCC('M', 'P', '4', 'L')) {
- faacDecConfigurationPtr faac_conf;
- /* Set the default object type and samplerate */
- /* This is useful for RAW AAC files */
- faac_conf = faacDecGetCurrentConfiguration(faac_hdec);
- if(sh->samplerate)
- faac_conf->defSampleRate = sh->samplerate;
- /* XXX: FAAD support FLOAT output, how do we handle
- * that (FAAD_FMT_FLOAT)? ::atmos
- */
- if (opts->audio_output_channels <= 2)
- faac_conf->downMatrix = 1;
- switch(sh->samplesize){
- case 1: // 8Bit
- mp_msg(MSGT_DECAUDIO,MSGL_WARN,"FAAD: 8Bit samplesize not supported by FAAD, assuming 16Bit!\n");
- default:
- sh->samplesize=2;
- case 2: // 16Bit
- faac_conf->outputFormat = FAAD_FMT_16BIT;
- break;
- case 3: // 24Bit
- faac_conf->outputFormat = FAAD_FMT_24BIT;
- break;
- case 4: // 32Bit
- faac_conf->outputFormat = FAAD_FMT_32BIT;
- break;
- }
- //faac_conf->defObjectType = LTP; // => MAIN, LC, SSR, LTP available.
-
- faacDecSetConfiguration(faac_hdec, faac_conf);
-
- sh->a_in_buffer_len = demux_read_data(sh->ds, sh->a_in_buffer, sh->a_in_buffer_size);
- if (!sh->a_in_buffer_len) {
- // faad init will crash with 0 buffer length
- mp_msg(MSGT_DECAUDIO, MSGL_FATAL, "Could not get audio data!\n");
- return 0;
- }
- /* external faad does not have latm lookup support */
- faac_init = faacDecInit(faac_hdec, sh->a_in_buffer,
- sh->a_in_buffer_len, &faac_samplerate, &faac_channels);
-
- if (faac_init < 0) {
- pos = aac_probe(sh->a_in_buffer, sh->a_in_buffer_len);
- if(pos) {
- sh->a_in_buffer_len -= pos;
- memmove(sh->a_in_buffer, &(sh->a_in_buffer[pos]), sh->a_in_buffer_len);
- sh->a_in_buffer_len +=
- demux_read_data(sh->ds,&(sh->a_in_buffer[sh->a_in_buffer_len]),
- sh->a_in_buffer_size - sh->a_in_buffer_len);
- pos = 0;
- }
-
- /* init the codec */
- faac_init = faacDecInit(faac_hdec, sh->a_in_buffer,
- sh->a_in_buffer_len, &faac_samplerate, &faac_channels);
- }
-
- sh->a_in_buffer_len -= (faac_init > 0)?faac_init:0; // how many bytes init consumed
- // XXX FIXME: shouldn't we memcpy() here in a_in_buffer ?? --A'rpi
-
- } else { // We have ES DS in codecdata
- faacDecConfigurationPtr faac_conf = faacDecGetCurrentConfiguration(faac_hdec);
- if (opts->audio_output_channels <= 2) {
- faac_conf->downMatrix = 1;
- faacDecSetConfiguration(faac_hdec, faac_conf);
- }
-
- /*int i;
- for(i = 0; i < sh_audio->codecdata_len; i++)
- printf("codecdata_dump %d: 0x%02X\n", i, sh_audio->codecdata[i]);*/
-
- faac_init = faacDecInit2(faac_hdec, sh->codecdata,
- sh->codecdata_len, &faac_samplerate, &faac_channels);
- }
- if(faac_init < 0) {
- mp_msg(MSGT_DECAUDIO,MSGL_WARN,"FAAD: Failed to initialize the decoder!\n"); // XXX: deal with cleanup!
- faacDecClose(faac_hdec);
- // XXX: free a_in_buffer here or in uninit?
- return 0;
- } else {
- mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Decoder init done (%dBytes)!\n", sh->a_in_buffer_len); // XXX: remove or move to debug!
- mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Negotiated samplerate: %ldHz channels: %d\n", faac_samplerate, faac_channels);
- // 8 channels is aac channel order #7.
- sh->channels = faac_channels == 7 ? 8 : faac_channels;
- if (opts->audio_output_channels <= 2)
- sh->channels = faac_channels > 1 ? 2 : 1;
- sh->samplerate = faac_samplerate;
- sh->samplesize=2;
- //sh->o_bps = sh->samplesize*faac_channels*faac_samplerate;
- if(!sh->i_bps) {
- mp_msg(MSGT_DECAUDIO, MSGL_V, "FAAD: compressed input bitrate missing, assuming 128kbit/s!\n");
- sh->i_bps = 128*1000/8; // XXX: HACK!!! ::atmos
- } else
- mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: got %dkbit/s bitrate from MP4 header!\n",sh->i_bps*8/1000);
- }
- return 1;
-}
-
-static void uninit(sh_audio_t *sh)
-{
- mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Closing decoder!\n");
- faacDecClose(faac_hdec);
-}
-
-static int aac_sync(sh_audio_t *sh)
-{
- int pos = 0;
- // do not probe LATM, faad does that
- if(!sh->codecdata_len && sh->format != mmioFOURCC('M', 'P', '4', 'L')) {
- if(sh->a_in_buffer_len < sh->a_in_buffer_size){
- sh->a_in_buffer_len +=
- demux_read_data(sh->ds,&sh->a_in_buffer[sh->a_in_buffer_len],
- sh->a_in_buffer_size - sh->a_in_buffer_len);
- }
- pos = aac_probe(sh->a_in_buffer, sh->a_in_buffer_len);
- if(pos) {
- sh->a_in_buffer_len -= pos;
- memmove(sh->a_in_buffer, &(sh->a_in_buffer[pos]), sh->a_in_buffer_len);
- mp_msg(MSGT_DECAUDIO,MSGL_V, "\nAAC SYNC AFTER %d bytes\n", pos);
- }
- }
- return pos;
-}
-
-static int control(sh_audio_t *sh,int cmd,void* arg, ...)
-{
- switch(cmd)
- {
- case ADCTRL_RESYNC_STREAM:
- aac_sync(sh);
- return CONTROL_TRUE;
-#if 0
- case ADCTRL_SKIP_FRAME:
- return CONTROL_TRUE;
-#endif
- }
- return CONTROL_UNKNOWN;
-}
-
-#define MAX_FAAD_ERRORS 10
-static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
-{
- int len = 0, last_dec_len = 1, errors = 0;
- // int j = 0;
- void *faac_sample_buffer;
-
- while(len < minlen && last_dec_len > 0 && errors < MAX_FAAD_ERRORS) {
-
- /* update buffer for raw aac streams: */
- if(!sh->codecdata_len)
- if(sh->a_in_buffer_len < sh->a_in_buffer_size){
- sh->a_in_buffer_len +=
- demux_read_data(sh->ds,&sh->a_in_buffer[sh->a_in_buffer_len],
- sh->a_in_buffer_size - sh->a_in_buffer_len);
- }
-
-#ifdef DUMP_AAC_COMPRESSED
- {int i;
- for (i = 0; i < 16; i++)
- printf ("%02X ", sh->a_in_buffer[i]);
- printf ("\n");}
-#endif
-
- if(!sh->codecdata_len){
- // raw aac stream:
- do {
- faac_sample_buffer = faacDecDecode(faac_hdec, &faac_finfo, sh->a_in_buffer, sh->a_in_buffer_len);
-
- /* update buffer index after faacDecDecode */
- if(faac_finfo.bytesconsumed >= sh->a_in_buffer_len) {
- sh->a_in_buffer_len=0;
- } else {
- sh->a_in_buffer_len-=faac_finfo.bytesconsumed;
- memmove(sh->a_in_buffer,&sh->a_in_buffer[faac_finfo.bytesconsumed],sh->a_in_buffer_len);
- }
-
- if(faac_finfo.error > 0) {
- mp_msg(MSGT_DECAUDIO,MSGL_WARN,"FAAD: error: %s, trying to resync!\n",
- faacDecGetErrorMessage(faac_finfo.error));
- if (sh->a_in_buffer_len <= 0) {
- errors = MAX_FAAD_ERRORS;
- break;
- }
- sh->a_in_buffer_len--;
- memmove(sh->a_in_buffer,&sh->a_in_buffer[1],sh->a_in_buffer_len);
- aac_sync(sh);
- errors++;
- } else
- break;
- } while(errors < MAX_FAAD_ERRORS);
- } else {
- // packetized (.mp4) aac stream:
- unsigned char* bufptr=NULL;
- double pts;
- int buflen=ds_get_packet_pts(sh->ds, &bufptr, &pts);
- if(buflen<=0) break;
- if (pts != MP_NOPTS_VALUE) {
- sh->pts = pts;
- sh->pts_bytes = 0;
- }
- faac_sample_buffer = faacDecDecode(faac_hdec, &faac_finfo, bufptr, buflen);
- }
- //for (j=0;j<faac_finfo.channels;j++) printf("%d:%d\n", j, faac_finfo.channel_position[j]);
-
- if(faac_finfo.error > 0) {
- mp_msg(MSGT_DECAUDIO,MSGL_WARN,"FAAD: Failed to decode frame: %s \n",
- faacDecGetErrorMessage(faac_finfo.error));
- } else if (faac_finfo.samples == 0) {
- mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: Decoded zero samples!\n");
- } else {
- /* XXX: samples already multiplied by channels! */
- mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: Successfully decoded frame (%ld Bytes)!\n",
- sh->samplesize*faac_finfo.samples);
-
- if (sh->channels >= 5)
- reorder_channel_copy_nch(faac_sample_buffer,
- AF_CHANNEL_LAYOUT_AAC_DEFAULT,
- buf+len, AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT,
- sh->channels,
- faac_finfo.samples, sh->samplesize);
- else
- memcpy(buf+len,faac_sample_buffer, sh->samplesize*faac_finfo.samples);
- last_dec_len = sh->samplesize*faac_finfo.samples;
- len += last_dec_len;
- sh->pts_bytes += last_dec_len;
- //printf("FAAD: buffer: %d bytes consumed: %d \n", k, faac_finfo.bytesconsumed);
- }
- }
- return len;
-}
diff --git a/libmpcodecs/ad_hwac3.c b/libmpcodecs/ad_hwac3.c
deleted file mode 100644
index 44e7657107..0000000000
--- a/libmpcodecs/ad_hwac3.c
+++ /dev/null
@@ -1,577 +0,0 @@
-/*
- * DTS code based on "ac3/decode_dts.c" and "ac3/conversion.c" from "ogle 0.9"
- * (see http://www.dtek.chalmers.se/~dvd/)
- * Reference: DOCS/tech/hwac3.txt !!!!!
- *
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#define _GNU_SOURCE
-#define _XOPEN_SOURCE 600
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/types.h>
-
-#include <libavutil/intreadwrite.h>
-#include <libavutil/common.h>
-
-#include "config.h"
-#include "mp_msg.h"
-#include "mpbswap.h"
-
-#include "ad_internal.h"
-
-
-static int isdts = -1;
-
-static const ad_info_t info =
-{
- "AC3/DTS pass-through S/PDIF",
- "hwac3",
- "Nick Kurshev/Peter Schüller",
- "???",
- ""
-};
-
-LIBAD_EXTERN(hwac3)
-
-
-static int dts_syncinfo(uint8_t *indata_ptr, int *flags, int *sample_rate, int *bit_rate);
-static int decode_audio_dts(unsigned char *indata_ptr, int len, unsigned char *buf);
-
-
-static int a52_syncinfo (uint8_t *buf, int *sample_rate, int *bit_rate)
-{
- static const uint16_t rate[] = { 32, 40, 48, 56, 64, 80, 96, 112,
- 128, 160, 192, 224, 256, 320, 384, 448,
- 512, 576, 640};
- int frmsizecod;
- int bitrate;
- int half;
-
- if (buf[0] != 0x0b || buf[1] != 0x77) /* syncword */
- return 0;
-
- if (buf[5] >= 0x60) /* bsid >= 12 */
- return 0;
- half = buf[5] >> 3;
- half = FFMAX(half - 8, 0);
-
- frmsizecod = buf[4] & 63;
- if (frmsizecod >= 38)
- return 0;
- bitrate = rate[frmsizecod >> 1];
- *bit_rate = (bitrate * 1000) >> half;
-
- switch (buf[4] & 0xc0) {
- case 0:
- *sample_rate = 48000 >> half;
- return 4 * bitrate;
- case 0x40:
- *sample_rate = 44100 >> half;
- return 2 * (320 * bitrate / 147 + (frmsizecod & 1));
- case 0x80:
- *sample_rate = 32000 >> half;
- return 6 * bitrate;
- default:
- return 0;
- }
-}
-
-static int ac3dts_fillbuff(sh_audio_t *sh_audio)
-{
- int length = 0;
- int flags = 0;
- int sample_rate = 0;
- int bit_rate = 0;
-
- sh_audio->a_in_buffer_len = 0;
- /* sync frame:*/
- while(1)
- {
- // Original code DTS has a 10 bytes header.
- // Now max 12 bytes for 14 bits DTS header.
- while(sh_audio->a_in_buffer_len < 12)
- {
- int c = demux_getc(sh_audio->ds);
- if(c<0)
- return -1; /* EOF*/
- sh_audio->a_in_buffer[sh_audio->a_in_buffer_len++] = c;
- }
-
- if (sh_audio->format == 0x2001)
- {
- length = dts_syncinfo(sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate);
- if(length >= 12)
- {
- if(isdts != 1)
- {
- mp_msg(MSGT_DECAUDIO, MSGL_STATUS, "hwac3: switched to DTS, %d bps, %d Hz\n", bit_rate, sample_rate);
- isdts = 1;
- }
- break;
- }
- }
- else
- {
- length = a52_syncinfo(sh_audio->a_in_buffer, &sample_rate, &bit_rate);
- if(length >= 7 && length <= 3840)
- {
- if(isdts != 0)
- {
- mp_msg(MSGT_DECAUDIO, MSGL_STATUS, "hwac3: switched to AC3, %d bps, %d Hz\n", bit_rate, sample_rate);
- isdts = 0;
- }
- break; /* we're done.*/
- }
- }
- /* bad file => resync*/
- memcpy(sh_audio->a_in_buffer, sh_audio->a_in_buffer + 1, 11);
- --sh_audio->a_in_buffer_len;
- }
- mp_msg(MSGT_DECAUDIO, MSGL_DBG2, "ac3dts: %s len=%d flags=0x%X %d Hz %d bit/s\n", isdts == 1 ? "DTS" : isdts == 0 ? "AC3" : "unknown", length, flags, sample_rate, bit_rate);
-
- sh_audio->samplerate = sample_rate;
- sh_audio->i_bps = bit_rate / 8;
- demux_read_data(sh_audio->ds, sh_audio->a_in_buffer + 12, length - 12);
- sh_audio->a_in_buffer_len = length;
-
- return length;
-}
-
-
-static int preinit(sh_audio_t *sh)
-{
- /* Dolby AC3 audio: */
- sh->audio_out_minsize = 128 * 32 * 2 * 2; // DTS seems to need more than AC3
- sh->audio_in_minsize = 8192;
- sh->channels = 2;
- sh->samplesize = 2;
- sh->sample_format = AF_FORMAT_AC3_BE;
- // HACK for DTS where useless swapping can't easily be removed
- if (sh->format == 0x2001)
- sh->sample_format = AF_FORMAT_AC3_NE;
- return 1;
-}
-
-static int init(sh_audio_t *sh_audio)
-{
- /* Dolby AC3 passthrough:*/
- if(ac3dts_fillbuff(sh_audio) < 0)
- {
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "AC3/DTS sync failed\n");
- return 0;
- }
- return 1;
-}
-
-static void uninit(sh_audio_t *sh)
-{
-}
-
-static int control(sh_audio_t *sh,int cmd,void* arg, ...)
-{
- switch(cmd)
- {
- case ADCTRL_RESYNC_STREAM:
- case ADCTRL_SKIP_FRAME:
- ac3dts_fillbuff(sh);
- return CONTROL_TRUE;
- }
- return CONTROL_UNKNOWN;
-}
-
-
-static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
-{
- int len = sh_audio->a_in_buffer_len;
-
- if(len <= 0)
- if((len = ac3dts_fillbuff(sh_audio)) <= 0)
- return len; /*EOF*/
- sh_audio->a_in_buffer_len = 0;
-
- if(isdts == 1)
- {
- return decode_audio_dts(sh_audio->a_in_buffer, len, buf);
- }
- else if(isdts == 0)
- {
- AV_WB16(buf, 0xF872); // iec 61937 syncword 1
- AV_WB16(buf + 2, 0x4E1F); // iec 61937 syncword 2
- buf[4] = sh_audio->a_in_buffer[5] & 0x7; // bsmod
- buf[5] = 0x01; // data-type ac3
- AV_WB16(buf + 6, len << 3); // number of bits in payload
- memcpy(buf + 8, sh_audio->a_in_buffer, len);
- memset(buf + 8 + len, 0, 6144 - 8 - len);
-
- return 6144;
- }
- else
- return -1;
-}
-
-
-static const int DTS_SAMPLEFREQS[16] =
-{
- 0,
- 8000,
- 16000,
- 32000,
- 64000,
- 128000,
- 11025,
- 22050,
- 44100,
- 88200,
- 176400,
- 12000,
- 24000,
- 48000,
- 96000,
- 192000
-};
-
-static const int DTS_BITRATES[30] =
-{
- 32000,
- 56000,
- 64000,
- 96000,
- 112000,
- 128000,
- 192000,
- 224000,
- 256000,
- 320000,
- 384000,
- 448000,
- 512000,
- 576000,
- 640000,
- 768000,
- 896000,
- 1024000,
- 1152000,
- 1280000,
- 1344000,
- 1408000,
- 1411200,
- 1472000,
- 1536000,
- 1920000,
- 2048000,
- 3072000,
- 3840000,
- 4096000
-};
-
-static int dts_decode_header(uint8_t *indata_ptr, int *rate, int *nblks, int *sfreq)
-{
- int ftype;
- int surp;
- int unknown_bit av_unused;
- int fsize;
- int amode av_unused;
-
- int word_mode;
- int le_mode;
-
- unsigned int first4bytes = indata_ptr[0] << 24 | indata_ptr[1] << 16
- | indata_ptr[2] << 8 | indata_ptr[3];
-
- switch(first4bytes)
- {
- /* 14 bits LE */
- case 0xff1f00e8:
- /* Also make sure frame type is 1. */
- if ((indata_ptr[4]&0xf0) != 0xf0 || indata_ptr[5] != 0x07)
- return -1;
- word_mode = 0;
- le_mode = 1;
- break;
- /* 14 bits BE */
- case 0x1fffe800:
- /* Also make sure frame type is 1. */
- if (indata_ptr[4] != 0x07 || (indata_ptr[5]&0xf0) != 0xf0)
- return -1;
- word_mode = 0;
- le_mode = 0;
- break;
- /* 16 bits LE */
- case 0xfe7f0180:
- word_mode = 1;
- le_mode = 1;
- break;
- /* 16 bits BE */
- case 0x7ffe8001:
- word_mode = 1;
- le_mode = 0;
- break;
- default:
- return -1;
- }
-
- if(word_mode)
- {
- /* First bit after first 32 bits:
- Frame type ( 1: Normal frame; 0: Termination frame ) */
- ftype = indata_ptr[4+le_mode] >> 7;
-
- if(ftype != 1)
- {
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "DTS: Termination frames not handled, REPORT BUG\n");
- return -1;
- }
- /* Next 5 bits: Surplus Sample Count V SURP 5 bits */
- surp = indata_ptr[4+le_mode] >> 2 & 0x1f;
- /* Number of surplus samples */
- surp = (surp + 1) % 32;
-
- /* One unknown bit, crc? */
- unknown_bit = indata_ptr[4+le_mode] >> 1 & 0x01;
-
- /* NBLKS 7 bits: Valid Range=5-127, Invalid Range=0-4 */
- *nblks = (indata_ptr[4+le_mode] & 0x01) << 6 | indata_ptr[5-le_mode] >> 2;
- /* NBLKS+1 indicates the number of 32 sample PCM audio blocks per channel
- encoded in the current frame per channel. */
- ++(*nblks);
-
- /* Frame Byte Size V FSIZE 14 bits: 0-94=Invalid, 95-8191=Valid range-1
- (ie. 96 bytes to 8192 bytes), 8192-16383=Invalid
- FSIZE defines the byte size of the current audio frame. */
- fsize = (indata_ptr[5-le_mode] & 0x03) << 12 | indata_ptr[6+le_mode] << 4
- | indata_ptr[7-le_mode] >> 4;
- ++fsize;
-
- /* Audio Channel Arrangement ACC AMODE 6 bits */
- amode = (indata_ptr[7-le_mode] & 0x0f) << 2 | indata_ptr[8+le_mode] >> 6;
-
- /* Source Sampling rate ACC SFREQ 4 bits */
- *sfreq = indata_ptr[8+le_mode] >> 2 & 0x0f;
- /* Transmission Bit Rate ACC RATE 5 bits */
- *rate = (indata_ptr[8+le_mode] & 0x03) << 3
- | (indata_ptr[9-le_mode] >> 5 & 0x07);
- }
- else
- {
- /* in the case judgement, we assure this */
- ftype = 1;
- surp = 0;
- /* 14 bits support, every 2 bytes, & 0x3fff, got used 14 bits */
- /* Bits usage:
- 32 bits: Sync code (28 + 4) 1th and 2th word, 4 bits in 3th word
- 1 bits: Frame type 1 bits in 3th word
- 5 bits: SURP 5 bits in 3th word
- 1 bits: crc? 1 bits in 3th word
- 7 bits: NBLKS 3 bits in 3th word, 4 bits in 4th word
- 14 bits: FSIZE 10 bits in 4th word, 4 bits in 5th word
- in 14 bits mode, FSIZE = FSIZE*8/14*2
- 6 bits: AMODE 6 bits in 5th word
- 4 bits: SFREQ 4 bits in 5th word
- 5 bits: RATE 5 bits in 6th word
- total bits: 75 bits */
-
- /* NBLKS 7 bits: Valid Range=5-127, Invalid Range=0-4 */
- *nblks = (indata_ptr[5-le_mode] & 0x07) << 4
- | (indata_ptr[6+le_mode] & 0x3f) >> 2;
- /* NBLKS+1 indicates the number of 32 sample PCM audio blocks per channel
- encoded in the current frame per channel. */
- ++(*nblks);
-
- /* Frame Byte Size V FSIZE 14 bits: 0-94=Invalid, 95-8191=Valid range-1
- (ie. 96 bytes to 8192 bytes), 8192-16383=Invalid
- FSIZE defines the byte size of the current audio frame. */
- fsize = (indata_ptr[6+le_mode] & 0x03) << 12 | indata_ptr[7-le_mode] << 4
- | (indata_ptr[8+le_mode] & 0x3f) >> 2;
- ++fsize;
- fsize = fsize * 8 / 14 * 2;
-
- /* Audio Channel Arrangement ACC AMODE 6 bits */
- amode = (indata_ptr[8+le_mode] & 0x03) << 4
- | (indata_ptr[9-le_mode] & 0xf0) >> 4;
-
- /* Source Sampling rate ACC SFREQ 4 bits */
- *sfreq = indata_ptr[9-le_mode] & 0x0f;
- /* Transmission Bit Rate ACC RATE 5 bits */
- *rate = (indata_ptr[10+le_mode] & 0x3f) >> 1;
- }
-#if 0
- if(*sfreq != 13)
- {
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "DTS: Only 48kHz supported, REPORT BUG\n");
- return -1;
- }
-#endif
- if((fsize > 8192) || (fsize < 96))
- {
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "DTS: fsize: %d invalid, REPORT BUG\n", fsize);
- return -1;
- }
-
- if(*nblks != 8 &&
- *nblks != 16 &&
- *nblks != 32 &&
- *nblks != 64 &&
- *nblks != 128 &&
- ftype == 1)
- {
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "DTS: nblks %d not valid for normal frame, REPORT BUG\n", *nblks);
- return -1;
- }
-
- return fsize;
-}
-
-static int dts_syncinfo(uint8_t *indata_ptr, int *flags, int *sample_rate, int *bit_rate)
-{
- int nblks;
- int fsize;
- int rate;
- int sfreq;
-
- fsize = dts_decode_header(indata_ptr, &rate, &nblks, &sfreq);
- if(fsize >= 0)
- {
- if(rate >= 0 && rate <= 29)
- *bit_rate = DTS_BITRATES[rate];
- else
- *bit_rate = 0;
- if(sfreq >= 1 && sfreq <= 15)
- *sample_rate = DTS_SAMPLEFREQS[sfreq];
- else
- *sample_rate = 0;
- }
- return fsize;
-}
-
-static int convert_14bits_to_16bits(const unsigned char *src,
- unsigned char *dest,
- int len,
- int is_le)
-{
- uint16_t *p = (uint16_t *)dest;
- uint16_t buf = 0;
- int spacebits = 16;
- if (len <= 0) return 0;
- while (len > 0) {
- uint16_t v;
- if (len == 1)
- v = is_le ? src[0] : src[0] << 8;
- else
- v = is_le ? src[1] << 8 | src[0] : src[0] << 8 | src[1];
- v <<= 2;
- src += 2;
- len -= 2;
- buf |= v >> (16 - spacebits);
- spacebits -= 14;
- if (spacebits < 0) {
- *p++ = buf;
- spacebits += 16;
- buf = v << (spacebits - 2);
- }
- }
- *p++ = buf;
- return (unsigned char *)p - dest;
-}
-
-static int decode_audio_dts(unsigned char *indata_ptr, int len, unsigned char *buf)
-{
- int nblks;
- int fsize;
- int rate;
- int sfreq;
- int nr_samples;
- int convert_16bits = 0;
- uint16_t *buf16 = (uint16_t *)buf;
-
- fsize = dts_decode_header(indata_ptr, &rate, &nblks, &sfreq);
- if(fsize < 0)
- return -1;
- nr_samples = nblks * 32;
-
- buf16[0] = 0xf872; /* iec 61937 */
- buf16[1] = 0x4e1f; /* syncword */
- switch(nr_samples)
- {
- case 512:
- buf16[2] = 0x000b; /* DTS-1 (512-sample bursts) */
- break;
- case 1024:
- buf16[2] = 0x000c; /* DTS-2 (1024-sample bursts) */
- break;
- case 2048:
- buf16[2] = 0x000d; /* DTS-3 (2048-sample bursts) */
- break;
- default:
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "DTS: %d-sample bursts not supported\n", nr_samples);
- buf16[2] = 0x0000;
- break;
- }
-
- if(fsize + 8 > nr_samples * 2 * 2)
- {
- // dts wav (14bits LE) match this condition, one way to passthrough
- // is not add iec 61937 header, decoders will notice the dts header
- // and identify the dts stream. Another way here is convert
- // the stream from 14 bits to 16 bits.
- if ((indata_ptr[0] == 0xff || indata_ptr[0] == 0x1f)
- && fsize * 14 / 16 + 8 <= nr_samples * 2 * 2) {
- // The input stream is 14 bits, we can shrink it to 16 bits
- // to save space for add the 61937 header
- fsize = convert_14bits_to_16bits(indata_ptr,
- &buf[8],
- fsize,
- indata_ptr[0] == 0xff /* is LE */
- );
- mp_msg(MSGT_DECAUDIO, MSGL_DBG3, "DTS: shrink 14 bits stream to "
- "16 bits %02x%02x%02x%02x => %02x%02x%02x%02x, new size %d.\n",
- indata_ptr[0], indata_ptr[1], indata_ptr[2], indata_ptr[3],
- buf[8], buf[9], buf[10], buf[11], fsize);
- convert_16bits = 1;
- }
- else
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "DTS: more data than fits\n");
- }
-
- buf16[3] = fsize << 3;
-
- if (!convert_16bits) {
-#ifdef BIG_ENDIAN
- /* BE stream */
- if (indata_ptr[0] == 0x1f || indata_ptr[0] == 0x7f)
-#else
- /* LE stream */
- if (indata_ptr[0] == 0xff || indata_ptr[0] == 0xfe)
-#endif
- memcpy(&buf[8], indata_ptr, fsize);
- else
- {
- swab(indata_ptr, &buf[8], fsize);
- if (fsize & 1) {
- buf[8+fsize-1] = 0;
- buf[8+fsize] = indata_ptr[fsize-1];
- fsize++;
- }
- }
- }
- memset(&buf[fsize + 8], 0, nr_samples * 2 * 2 - (fsize + 8));
-
- return nr_samples * 2 * 2;
-}
diff --git a/libmpcodecs/ad_hwmpa.c b/libmpcodecs/ad_hwmpa.c
deleted file mode 100644
index 87c00b6f42..0000000000
--- a/libmpcodecs/ad_hwmpa.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "config.h"
-
-#include "mp_msg.h"
-
-#include "libaf/af_format.h"
-#include "ad_internal.h"
-
-#include "libmpdemux/mp3_hdr.h"
-
-//based on ad_hwac3.c and ad_libmad.c
-
-static const ad_info_t info =
-{
- "MPEG audio pass-through (fake decoder)",
- "hwmpa",
- "NicoDVB",
- "NicoDVB",
- "For hardware decoders"
-};
-
-LIBAD_EXTERN(hwmpa)
-
-static int mpa_sync(sh_audio_t *sh, int no_frames, int *n, int *chans, int *srate, int *spf, int *mpa_layer, int *br)
-{
- int cnt = 0, x = 0, len, frames_count;
-
- frames_count = 0;
- do
- {
- while(cnt + 4 < sh->a_in_buffer_len)
- {
- x = mp_get_mp3_header(&(sh->a_in_buffer[cnt]), chans, srate, spf, mpa_layer, br);
- if(x > 0)
- {
- frames_count++;
- if(frames_count == no_frames)
- {
- *n = x;
- return cnt;
- }
- }
- cnt++;
- }
- len = demux_read_data(sh->ds,&sh->a_in_buffer[sh->a_in_buffer_len],sh->a_in_buffer_size-sh->a_in_buffer_len);
- if(len > 0)
- sh->a_in_buffer_len += len;
- } while(len > 0);
- mp_msg(MSGT_DECAUDIO,MSGL_INFO,"Cannot sync MPA frame: %d\r\n", len);
- return -1;
-}
-
-static int preinit(sh_audio_t *sh)
-{
- sh->audio_out_minsize = 4608;//check
- sh->audio_in_minsize = 4608;//check
- sh->sample_format = AF_FORMAT_MPEG2;
- return 1;
-}
-
-static int init(sh_audio_t *sh)
-{
- int cnt, chans, srate, spf, mpa_layer, br, len;
-
- if((cnt = mpa_sync(sh, 1, &len, &chans, &srate, &spf, &mpa_layer, &br)) < 0)
- return 0;
-
- sh->channels = chans;
- sh->samplerate = srate;
- sh->i_bps = br * 125;
- sh->samplesize = 2;
-
- mp_msg(MSGT_DECAUDIO,MSGL_V,"AC_HWMPA initialized, bitrate: %d kb/s\r\n", len);
- return 1;
-}
-
-static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
-{
- int len, start, tot;
- int chans, srate, spf, mpa_layer, br;
- int tot2;
-
- tot = tot2 = 0;
-
- while(tot2 < maxlen)
- {
- start = mpa_sync(sh, 1, &len, &chans, &srate, &spf, &mpa_layer, &br);
- if(start < 0 || tot2 + spf * 2 * chans > maxlen)
- break;
-
- if(start + len > sh->a_in_buffer_len)
- {
- int l;
- l = FFMIN(sh->a_in_buffer_size - sh->a_in_buffer_len, start + len);
- l = demux_read_data(sh->ds,&sh->a_in_buffer[sh->a_in_buffer_len], l);
- if(! l)
- break;
- sh->a_in_buffer_len += l;
- continue;
- }
-
- memcpy(&buf[tot], &(sh->a_in_buffer[start]), len);
- tot += len;
-
- sh->a_in_buffer_len -= start + len;
- memmove(sh->a_in_buffer, &(sh->a_in_buffer[start + len]), sh->a_in_buffer_len);
- tot2 += spf * 2 * chans;
-
- /* HACK: seems to fix most A/V sync issues */
- break;
- }
-
- memset(&buf[tot], 0, tot2-tot);
- return tot2;
-}
-
-
-static int control(sh_audio_t *sh,int cmd,void* arg, ...)
-{
- int start, len;
-
- switch(cmd)
- {
- case ADCTRL_RESYNC_STREAM:
- if(mpa_sync(sh, 1, &len, NULL, NULL, NULL, NULL, NULL) >= 0)
- return CONTROL_TRUE;
- else
- return CONTROL_FALSE;
- case ADCTRL_SKIP_FRAME:
- start = mpa_sync(sh, 2, &len, NULL, NULL, NULL, NULL, NULL);
- if(start < 0)
- return CONTROL_FALSE;
-
- sh->a_in_buffer_len -= start;
- memmove(sh->a_in_buffer, &(sh->a_in_buffer[start]), sh->a_in_buffer_len);
- return CONTROL_TRUE;
- }
- return CONTROL_UNKNOWN;
-}
-
-
-static void uninit(sh_audio_t *sh)
-{
-}
diff --git a/libmpcodecs/ad_imaadpcm.c b/libmpcodecs/ad_imaadpcm.c
deleted file mode 100644
index 84f667ecd6..0000000000
--- a/libmpcodecs/ad_imaadpcm.c
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * IMA ADPCM decoder
- *
- * This file is in charge of decoding all of the various IMA ADPCM data
- * formats that various entities have created. Details about the data
- * formats can be found here:
- * http://www.pcisys.net/~melanson/codecs/
- *
- * So far, this file handles these formats:
- * 'ima4': IMA ADPCM found in QT files
- * 0x11: IMA ADPCM found in MS AVI/ASF/WAV files
- * 0x61: DK4 ADPCM found in certain AVI files on Sega Saturn CD-ROMs;
- * note that this is a 'rogue' format number in that it was
- * never officially registered with Microsoft
- * 0x1100736d: IMA ADPCM coded like in MS AVI/ASF/WAV found in QT files
- *
- * Copyright (c) 2002 Mike Melanson
- *
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <inttypes.h>
-
-#include <libavutil/intreadwrite.h>
-
-#include "config.h"
-#include "mpbswap.h"
-#include "ad_internal.h"
-
-#define MS_IMA_ADPCM_PREAMBLE_SIZE 4
-
-#define QT_IMA_ADPCM_PREAMBLE_SIZE 2
-#define QT_IMA_ADPCM_BLOCK_SIZE 0x22
-#define QT_IMA_ADPCM_SAMPLES_PER_BLOCK 64
-
-// pertinent tables for IMA ADPCM
-static const int16_t adpcm_step[89] =
-{
- 7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
- 19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
- 50, 55, 60, 66, 73, 80, 88, 97, 107, 118,
- 130, 143, 157, 173, 190, 209, 230, 253, 279, 307,
- 337, 371, 408, 449, 494, 544, 598, 658, 724, 796,
- 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066,
- 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358,
- 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899,
- 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
-};
-
-static const int8_t adpcm_index[8] =
-{
- -1, -1, -1, -1, 2, 4, 6, 8,
-};
-
-// useful macros
-// clamp a number between 0 and 88
-#define CLAMP_0_TO_88(x) x = av_clip(x, 0, 88);
-// clamp a number within a signed 16-bit range
-#define CLAMP_S16(x) x = av_clip_int16(x);
-// clamp a number above 16
-#define CLAMP_ABOVE_16(x) if (x < 16) x = 16;
-
-static const ad_info_t info =
-{
- "IMA ADPCM audio decoder",
- "imaadpcm",
- "Nick Kurshev",
- "Mike Melanson",
- ""
-};
-
-LIBAD_EXTERN(imaadpcm)
-
-static int preinit(sh_audio_t *sh_audio)
-{
- // not exactly sure what this field is for
- sh_audio->audio_out_minsize = 8192;
-
- // if format is "ima4", assume the audio is coming from a QT file which
- // indicates constant block size, whereas an AVI/ASF/WAV file will fill
- // in this field with 0x11
- if ((sh_audio->format == 0x11) || (sh_audio->format == 0x61) ||
- (sh_audio->format == 0x1100736d))
- {
- sh_audio->ds->ss_div = (sh_audio->wf->nBlockAlign -
- (MS_IMA_ADPCM_PREAMBLE_SIZE * sh_audio->wf->nChannels)) * 2;
- sh_audio->ds->ss_mul = sh_audio->wf->nBlockAlign;
- }
- else
- {
- sh_audio->ds->ss_div = QT_IMA_ADPCM_SAMPLES_PER_BLOCK;
- sh_audio->ds->ss_mul = QT_IMA_ADPCM_BLOCK_SIZE * sh_audio->wf->nChannels;
- }
- sh_audio->audio_in_minsize=sh_audio->ds->ss_mul;
- return 1;
-}
-
-static int init(sh_audio_t *sh_audio)
-{
- /* IMA-ADPCM 4:1 audio codec:*/
- sh_audio->channels=sh_audio->wf->nChannels;
- sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
- /* decodes 34 byte -> 64 short*/
- sh_audio->i_bps =
- (sh_audio->ds->ss_mul * sh_audio->samplerate) / sh_audio->ds->ss_div;
- sh_audio->samplesize=2;
-
- return 1;
-}
-
-static void uninit(sh_audio_t *sh_audio)
-{
-}
-
-static int control(sh_audio_t *sh_audio,int cmd,void* arg, ...)
-{
- if(cmd==ADCTRL_SKIP_FRAME){
- demux_read_data(sh_audio->ds, sh_audio->a_in_buffer,sh_audio->ds->ss_mul);
- return CONTROL_TRUE;
- }
- return CONTROL_UNKNOWN;
-}
-
-static void decode_nibbles(unsigned short *output,
- int output_size, int channels,
- int predictor[2], int index[2])
-{
- int step[2];
- int i;
- int sign;
- int delta;
- int channel_number = 0;
-
- step[0] = adpcm_step[index[0]];
- step[1] = adpcm_step[index[1]];
-
- for (i = 0; i < output_size; i++)
- {
- delta = output[i];
- sign = delta & 8;
- delta = delta & 7;
-
- index[channel_number] += adpcm_index[delta];
- CLAMP_0_TO_88(index[channel_number]);
-
- delta = 2 * delta + 1;
- if (sign) delta = -delta;
-
- predictor[channel_number] += (delta * step[channel_number]) >> 3;
-
- CLAMP_S16(predictor[channel_number]);
- output[i] = predictor[channel_number];
- step[channel_number] = adpcm_step[index[channel_number]];
-
- // toggle channel
- channel_number ^= channels - 1;
-
- }
-}
-
-static int qt_ima_adpcm_decode_block(unsigned short *output,
- unsigned char *input, int channels, int block_size)
-{
- int initial_predictor[2] = {0};
- int initial_index[2] = {0};
- int i;
-
- if (channels != 1) channels = 2;
- if (block_size < channels * QT_IMA_ADPCM_BLOCK_SIZE)
- return -1;
-
- for (i = 0; i < channels; i++) {
- initial_index[i] = initial_predictor[i] = (int16_t)AV_RB16(&input[i * QT_IMA_ADPCM_BLOCK_SIZE]);
-
- // mask, sign-extend, and clamp the predictor portion
- initial_predictor[i] &= ~0x7F;
- CLAMP_S16(initial_predictor[i]);
-
- // mask and clamp the index portion
- initial_index[i] &= 0x7F;
- CLAMP_0_TO_88(initial_index[i]);
- }
-
- // break apart all of the nibbles in the block
- if (channels == 1)
- for (i = 0; i < QT_IMA_ADPCM_SAMPLES_PER_BLOCK / 2; i++)
- {
- output[i * 2 + 0] = input[2 + i] & 0x0F;
- output[i * 2 + 1] = input[2 + i] >> 4;
- }
- else
- for (i = 0; i < QT_IMA_ADPCM_SAMPLES_PER_BLOCK / 2; i++)
- {
- output[i * 4 + 0] = input[2 + i] & 0x0F;
- output[i * 4 + 1] = input[2 + QT_IMA_ADPCM_BLOCK_SIZE + i] & 0x0F;
- output[i * 4 + 2] = input[2 + i] >> 4;
- output[i * 4 + 3] = input[2 + QT_IMA_ADPCM_BLOCK_SIZE + i] >> 4;
- }
-
- decode_nibbles(output,
- QT_IMA_ADPCM_SAMPLES_PER_BLOCK * channels, channels,
- initial_predictor, initial_index);
-
- return QT_IMA_ADPCM_SAMPLES_PER_BLOCK * channels;
-}
-
-static int ms_ima_adpcm_decode_block(unsigned short *output,
- unsigned char *input, int channels, int block_size)
-{
- int predictor[2];
- int index[2];
- int i;
- int channel_counter;
- int channel_index;
- int channel_index_l;
- int channel_index_r;
-
- if (channels != 1) channels = 2;
- if (block_size < MS_IMA_ADPCM_PREAMBLE_SIZE * channels)
- return -1;
-
- for (i = 0; i < channels; i++) {
- predictor[i] = (int16_t)AV_RL16(&input[i * 4]);
- index[i] = input[i * 4 + 2];
- }
-
- if (channels == 1)
- for (i = 0;
- i < (block_size - MS_IMA_ADPCM_PREAMBLE_SIZE * channels); i++)
- {
- output[i * 2 + 0] = input[MS_IMA_ADPCM_PREAMBLE_SIZE + i] & 0x0F;
- output[i * 2 + 1] = input[MS_IMA_ADPCM_PREAMBLE_SIZE + i] >> 4;
- }
- else
- {
- // encoded as 8 nibbles (4 bytes) per channel; switch channel every
- // 4th byte
- channel_counter = 0;
- channel_index_l = 0;
- channel_index_r = 1;
- channel_index = channel_index_l;
- for (i = 0;
- i < (block_size - MS_IMA_ADPCM_PREAMBLE_SIZE * channels); i++)
- {
- output[channel_index + 0] =
- input[MS_IMA_ADPCM_PREAMBLE_SIZE * 2 + i] & 0x0F;
- output[channel_index + 2] =
- input[MS_IMA_ADPCM_PREAMBLE_SIZE * 2 + i] >> 4;
- channel_index += 4;
- channel_counter++;
- if (channel_counter == 4)
- {
- channel_index_l = channel_index;
- channel_index = channel_index_r;
- }
- else if (channel_counter == 8)
- {
- channel_index_r = channel_index;
- channel_index = channel_index_l;
- channel_counter = 0;
- }
- }
- }
-
- decode_nibbles(output,
- (block_size - MS_IMA_ADPCM_PREAMBLE_SIZE * channels) * 2,
- channels,
- predictor, index);
-
- return (block_size - MS_IMA_ADPCM_PREAMBLE_SIZE * channels) * 2;
-}
-
-static int dk4_ima_adpcm_decode_block(unsigned short *output,
- unsigned char *input, int channels, int block_size)
-{
- int i;
- int output_ptr;
- int predictor[2];
- int index[2];
-
- if (channels != 1) channels = 2;
- if (block_size < MS_IMA_ADPCM_PREAMBLE_SIZE * channels)
- return -1;
-
- for (i = 0; i < channels; i++) {
- // the first predictor value goes straight to the output
- predictor[i] = output[i] = (int16_t)AV_RL16(&input[i * 4]);
- index[i] = input[i * 4 + 2];
- }
-
- output_ptr = channels;
- for (i = MS_IMA_ADPCM_PREAMBLE_SIZE * channels; i < block_size; i++)
- {
- output[output_ptr++] = input[i] >> 4;
- output[output_ptr++] = input[i] & 0x0F;
- }
-
- decode_nibbles(&output[channels],
- (block_size - MS_IMA_ADPCM_PREAMBLE_SIZE * channels) * 2 - channels,
- channels,
- predictor, index);
-
- return (block_size - MS_IMA_ADPCM_PREAMBLE_SIZE * channels) * 2 - channels;
-}
-
-static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
-{
- int res = -1;
- int (*decode_func)(unsigned short *output, unsigned char *input, int channels, int block_size) = qt_ima_adpcm_decode_block;
- if (demux_read_data(sh_audio->ds, sh_audio->a_in_buffer,
- sh_audio->ds->ss_mul) !=
- sh_audio->ds->ss_mul)
- return -1;
-
- if ((sh_audio->format == 0x11) || (sh_audio->format == 0x1100736d))
- decode_func = ms_ima_adpcm_decode_block;
- else if (sh_audio->format == 0x61)
- decode_func = dk4_ima_adpcm_decode_block;
-
- res = decode_func((unsigned short*)buf, sh_audio->a_in_buffer,
- sh_audio->wf->nChannels, sh_audio->ds->ss_mul);
- return res < 0 ? res : 2 * res;
-}
diff --git a/libmpcodecs/ad_liba52.c b/libmpcodecs/ad_liba52.c
deleted file mode 100644
index 505532af6b..0000000000
--- a/libmpcodecs/ad_liba52.c
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#define _GNU_SOURCE
-#define _XOPEN_SOURCE 600
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <math.h>
-#include <assert.h>
-
-#include "config.h"
-#include "options.h"
-#include "mp_msg.h"
-#include "mpbswap.h"
-
-#include "ad_internal.h"
-
-#include "cpudetect.h"
-
-#include "libaf/af_format.h"
-
-#include <a52dec/a52.h>
-#include <a52dec/mm_accel.h>
-int (* a52_resample) (float * _f, int16_t * s16);
-
-static a52_state_t *a52_state;
-static uint32_t a52_flags=0;
-/** Used by a52_resample_float, it defines the mapping between liba52
- * channels and output channels. The ith nibble from the right in the
- * hex representation of channel_map is the index of the source
- * channel corresponding to the ith output channel. Source channels are
- * indexed 1-6. Silent output channels are marked by 0xf. */
-static uint32_t channel_map;
-
-#define DRC_NO_ACTION 0
-#define DRC_NO_COMPRESSION 1
-#define DRC_CALLBACK 2
-
-/** The output is multiplied by this var. Used for volume control */
-static sample_t a52_level = 1;
-static int a52_drc_action = DRC_NO_ACTION;
-
-static const ad_info_t info =
-{
- "AC3 decoding with liba52",
- "liba52",
- "Nick Kurshev",
- "Michel LESPINASSE",
- ""
-};
-
-LIBAD_EXTERN(liba52)
-
-static int a52_fillbuff(sh_audio_t *sh_audio)
-{
-int length=0;
-int flags=0;
-int sample_rate=0;
-int bit_rate=0;
-
- sh_audio->a_in_buffer_len=0;
- /* sync frame:*/
-while(1){
- while(sh_audio->a_in_buffer_len<8){
- int c=demux_getc(sh_audio->ds);
- if(c<0) return -1; /* EOF*/
- sh_audio->a_in_buffer[sh_audio->a_in_buffer_len++]=c;
- }
- if(sh_audio->format==MKTAG('d','n','e','t')) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8);
- length = a52_syncinfo (sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate);
- if(length>=7 && length<=3840) break; /* we're done.*/
- /* bad file => resync*/
- if(sh_audio->format==MKTAG('d','n','e','t')) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8);
- memmove(sh_audio->a_in_buffer,sh_audio->a_in_buffer+1,7);
- --sh_audio->a_in_buffer_len;
-}
- mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"a52: len=%d flags=0x%X %d Hz %d bit/s\n",length,flags,sample_rate,bit_rate);
- sh_audio->samplerate=sample_rate;
- sh_audio->i_bps=bit_rate/8;
- sh_audio->samplesize=sh_audio->sample_format==AF_FORMAT_FLOAT_NE ? 4 : 2;
- demux_read_data(sh_audio->ds,sh_audio->a_in_buffer+8,length-8);
- if(sh_audio->format==MKTAG('d','n','e','t'))
- swab(sh_audio->a_in_buffer+8,sh_audio->a_in_buffer+8,length-8);
-
-#ifdef CONFIG_LIBA52_INTERNAL
- if(crc16_block(sh_audio->a_in_buffer+2,length-2)!=0)
- mp_msg(MSGT_DECAUDIO,MSGL_STATUS,"a52: CRC check failed! \n");
-#endif
-
- return length;
-}
-
-/* returns: number of available channels*/
-static int a52_printinfo(sh_audio_t *sh_audio){
-int flags, sample_rate, bit_rate;
-char* mode="unknown";
-int channels=0;
- a52_syncinfo (sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate);
- switch(flags&A52_CHANNEL_MASK){
- case A52_CHANNEL: mode="channel"; channels=2; break;
- case A52_MONO: mode="mono"; channels=1; break;
- case A52_STEREO: mode="stereo"; channels=2; break;
- case A52_3F: mode="3f";channels=3;break;
- case A52_2F1R: mode="2f+1r";channels=3;break;
- case A52_3F1R: mode="3f+1r";channels=4;break;
- case A52_2F2R: mode="2f+2r";channels=4;break;
- case A52_3F2R: mode="3f+2r";channels=5;break;
- case A52_CHANNEL1: mode="channel1"; channels=2; break;
- case A52_CHANNEL2: mode="channel2"; channels=2; break;
- case A52_DOLBY: mode="dolby"; channels=2; break;
- }
- mp_msg(MSGT_DECAUDIO,MSGL_V,"AC3: %d.%d (%s%s) %d Hz %3.1f kbit/s\n",
- channels, (flags&A52_LFE)?1:0,
- mode, (flags&A52_LFE)?"+lfe":"",
- sample_rate, bit_rate*0.001f);
- return (flags&A52_LFE) ? (channels+1) : channels;
-}
-
-static sample_t dynrng_call (sample_t c, void *data)
-{
- struct MPOpts *opts = data;
- //fprintf(stderr, "(%f, %f): %f\n", (double)c, (double)drc_level, (double)pow((double)c, drc_level));
- //fprintf(stderr, "(%lf, %lf): %lf\n", (double)c, opts->drc_level, pow(c, opts->drc_level));
- return pow(c, opts->drc_level);
-}
-
-
-static int preinit(sh_audio_t *sh)
-{
- struct MPOpts *opts = sh->opts;
- /* Dolby AC3 audio: */
- /* however many channels, 2 bytes in a word, 256 samples in a block, 6 blocks in a frame */
- if (sh->samplesize < 4) sh->samplesize = 4;
- sh->audio_out_minsize=opts->audio_output_channels*sh->samplesize*256*6;
- sh->audio_in_minsize=3840;
- a52_level = 1.0;
- return 1;
-}
-
-/**
- * \brief Function to convert the "planar" float format used by liba52
- * into the interleaved float format used by libaf/libao2.
- * \param in the input buffer containing the planar samples.
- * \param out the output buffer where the interleaved result is stored.
- */
-static int a52_resample_float(float *in, int16_t *out)
-{
- unsigned long i;
- float *p = (float*) out;
- for (i = 0; i != 256; i++) {
- unsigned long map = channel_map;
- do {
- unsigned long ch = map & 15;
- if (ch == 15)
- *p = 0;
- else
- *p = in[i + ((ch-1)<<8)];
- p++;
- } while ((map >>= 4));
- }
- return (int16_t*) p - out;
-}
-
-static int init(sh_audio_t *sh_audio)
-{
- struct MPOpts *opts = sh_audio->opts;
- uint32_t a52_accel=0;
- sample_t level=a52_level, bias=384;
- int flags=0;
- /* Dolby AC3 audio:*/
-#ifdef MM_ACCEL_X86_SSE
- if(gCpuCaps.hasSSE) a52_accel|=MM_ACCEL_X86_SSE;
-#endif
- if(gCpuCaps.hasMMX) a52_accel|=MM_ACCEL_X86_MMX;
- if(gCpuCaps.hasMMX2) a52_accel|=MM_ACCEL_X86_MMXEXT;
- a52_state=a52_init (a52_accel);
- if (a52_state == NULL) {
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,"A52 init failed\n");
- return 0;
- }
- sh_audio->sample_format = AF_FORMAT_FLOAT_NE;
- if(a52_fillbuff(sh_audio)<0){
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,"A52 sync failed\n");
- return 0;
- }
-
- /* Init a52 dynrng */
- if (opts->drc_level < 0.001) {
- /* level == 0 --> no compression, init library without callback */
- a52_drc_action = DRC_NO_COMPRESSION;
- } else if (opts->drc_level > 0.999 && opts->drc_level < 1.001) {
- /* level == 1 --> full compression, do nothing at all (library default = full compression) */
- a52_drc_action = DRC_NO_ACTION;
- } else {
- a52_drc_action = DRC_CALLBACK;
- }
- /* Library init for dynrng has to be done for each frame, see decode_audio() */
-
-
- /* 'a52 cannot upmix' hotfix:*/
- a52_printinfo(sh_audio);
- sh_audio->channels=opts->audio_output_channels;
-while(sh_audio->channels>0){
- switch(sh_audio->channels){
- case 1: a52_flags=A52_MONO; break;
-/* case 2: a52_flags=A52_STEREO; break;*/
- case 2: a52_flags=A52_DOLBY; break;
-/* case 3: a52_flags=A52_3F; break;*/
- case 3: a52_flags=A52_2F1R; break;
- case 4: a52_flags=A52_2F2R; break; /* 2+2*/
- case 5: a52_flags=A52_3F2R; break;
- case 6: a52_flags=A52_3F2R|A52_LFE; break; /* 5.1*/
- }
- /* test:*/
- flags=a52_flags|A52_ADJUST_LEVEL;
- mp_msg(MSGT_DECAUDIO,MSGL_V,"A52 flags before a52_frame: 0x%X\n",flags);
- if (a52_frame (a52_state, sh_audio->a_in_buffer, &flags, &level, bias)){
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,"a52: error decoding frame -> nosound\n");
- return 0;
- }
- mp_msg(MSGT_DECAUDIO,MSGL_V,"A52 flags after a52_frame: 0x%X\n",flags);
- /* frame decoded, let's init resampler:*/
- channel_map = 0;
- if (sh_audio->sample_format == AF_FORMAT_FLOAT_NE) {
- if (!(flags & A52_LFE)) {
- switch ((flags<<3) | sh_audio->channels) {
- case (A52_MONO << 3) | 1: channel_map = 0x1; break;
- case (A52_CHANNEL << 3) | 2:
- case (A52_STEREO << 3) | 2:
- case (A52_DOLBY << 3) | 2: channel_map = 0x21; break;
- case (A52_2F1R << 3) | 3: channel_map = 0x321; break;
- case (A52_2F2R << 3) | 4: channel_map = 0x4321; break;
- case (A52_3F << 3) | 5: channel_map = 0x2ff31; break;
- case (A52_3F2R << 3) | 5: channel_map = 0x25431; break;
- }
- } else if (sh_audio->channels == 6) {
- switch (flags & ~A52_LFE) {
- case A52_MONO : channel_map = 0x12ffff; break;
- case A52_CHANNEL:
- case A52_STEREO :
- case A52_DOLBY : channel_map = 0x1fff32; break;
- case A52_3F : channel_map = 0x13ff42; break;
- case A52_2F1R : channel_map = 0x1f4432; break;
- case A52_2F2R : channel_map = 0x1f5432; break;
- case A52_3F2R : channel_map = 0x136542; break;
- }
- }
- if (channel_map) {
- a52_resample = a52_resample_float;
- break;
- }
- } else
- break;
-}
- if(sh_audio->channels<=0){
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,"a52: no resampler. try different channel setup!\n");
- return 0;
- }
- return 1;
-}
-
-static void uninit(sh_audio_t *sh)
-{
- a52_free(a52_state);
-}
-
-static int control(sh_audio_t *sh,int cmd,void* arg, ...)
-{
- switch(cmd)
- {
- case ADCTRL_RESYNC_STREAM:
- case ADCTRL_SKIP_FRAME:
- a52_fillbuff(sh);
- return CONTROL_TRUE;
- case ADCTRL_SET_VOLUME: {
- float vol = *(float*)arg;
- if (vol > 60.0) vol = 60.0;
- a52_level = vol <= -200.0 ? 0 : pow(10.0,vol/20.0);
- return CONTROL_TRUE;
- }
- case ADCTRL_QUERY_FORMAT:
- if (*(int*)arg == AF_FORMAT_S16_NE ||
- *(int*)arg == AF_FORMAT_FLOAT_NE)
- return CONTROL_TRUE;
- return CONTROL_FALSE;
- }
- return CONTROL_UNKNOWN;
-}
-
-static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
-{
- sample_t level=a52_level, bias=384;
- int flags=a52_flags|A52_ADJUST_LEVEL;
- int i,len=-1;
- if (sh_audio->sample_format == AF_FORMAT_FLOAT_NE)
- bias = 0;
- if(!sh_audio->a_in_buffer_len)
- if(a52_fillbuff(sh_audio)<0) return len; /* EOF */
- sh_audio->a_in_buffer_len=0;
- if (a52_frame (a52_state, sh_audio->a_in_buffer, &flags, &level, bias)){
- mp_msg(MSGT_DECAUDIO,MSGL_WARN,"a52: error decoding frame\n");
- return len;
- }
-
- /* handle dynrng */
- if (a52_drc_action != DRC_NO_ACTION) {
- if (a52_drc_action == DRC_NO_COMPRESSION)
- a52_dynrng(a52_state, NULL, NULL);
- else
- a52_dynrng(a52_state, dynrng_call, sh_audio->opts);
- }
-
- len=0;
- for (i = 0; i < 6; i++) {
- if (a52_block (a52_state)){
- mp_msg(MSGT_DECAUDIO,MSGL_WARN,"a52: error at resampling\n");
- break;
- }
- len+=2*a52_resample(a52_samples(a52_state),(int16_t *)&buf[len]);
- }
- assert(len <= maxlen);
- return len;
-}
diff --git a/libmpcodecs/ad_libdca.c b/libmpcodecs/ad_libdca.c
deleted file mode 100644
index fcb4535126..0000000000
--- a/libmpcodecs/ad_libdca.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * DTS Coherent Acoustics stream decoder using libdca
- * This file is partially based on dtsdec.c r9036 from FFmpeg and ad_liba52.c
- *
- * Copyright (C) 2007 Roberto Togni
- *
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <assert.h>
-
-#include "config.h"
-#include "options.h"
-#include "mp_msg.h"
-#include "ad_internal.h"
-
-#include <dts.h>
-
-static const ad_info_t info =
-{
- "DTS decoding with libdca",
- "libdca",
- "Roberto Togni",
- "",
- ""
-};
-
-LIBAD_EXTERN(libdca)
-
-#define DTSBUFFER_SIZE 18726
-#define HEADER_SIZE 14
-
-#define CONVERT_LEVEL 1
-#define CONVERT_BIAS 0
-
-static const char ch2flags[6] = {
- DTS_MONO,
- DTS_STEREO,
- DTS_3F,
- DTS_2F2R,
- DTS_3F2R,
- DTS_3F2R | DTS_LFE
-};
-
-static inline int16_t convert(sample_t s)
-{
- int i = s * 0x7fff;
-
- return (i > 32767) ? 32767 : ((i < -32768) ? -32768 : i);
-}
-
-static void convert2s16_multi(sample_t *f, int16_t *s16, int flags, int ch_out)
-{
- int i;
-
- switch(flags & (DTS_CHANNEL_MASK | DTS_LFE)){
- case DTS_MONO:
- if (ch_out == 1)
- for(i = 0; i < 256; i++)
- s16[i] = convert(f[i]);
- else
- for(i = 0; i < 256; i++){
- s16[5*i] = s16[5*i+1] = s16[5*i+2] = s16[5*i+3] = 0;
- s16[5*i+4] = convert(f[i]);
- }
- break;
- case DTS_CHANNEL:
- case DTS_STEREO:
- case DTS_DOLBY:
- for(i = 0; i < 256; i++){
- s16[2*i] = convert(f[i]);
- s16[2*i+1] = convert(f[i+256]);
- }
- break;
- case DTS_3F:
- for(i = 0; i < 256; i++){
- s16[3*i] = convert(f[i+256]);
- s16[3*i+1] = convert(f[i+512]);
- s16[3*i+2] = convert(f[i]);
- }
- break;
- case DTS_2F2R:
- for(i = 0; i < 256; i++){
- s16[4*i] = convert(f[i]);
- s16[4*i+1] = convert(f[i+256]);
- s16[4*i+2] = convert(f[i+512]);
- s16[4*i+3] = convert(f[i+768]);
- }
- break;
- case DTS_3F2R:
- for(i = 0; i < 256; i++){
- s16[5*i] = convert(f[i+256]);
- s16[5*i+1] = convert(f[i+512]);
- s16[5*i+2] = convert(f[i+768]);
- s16[5*i+3] = convert(f[i+1024]);
- s16[5*i+4] = convert(f[i]);
- }
- break;
- case DTS_MONO | DTS_LFE:
- for(i = 0; i < 256; i++){
- s16[6*i] = s16[6*i+1] = s16[6*i+2] = s16[6*i+3] = 0;
- s16[6*i+4] = convert(f[i]);
- s16[6*i+5] = convert(f[i+256]);
- }
- break;
- case DTS_CHANNEL | DTS_LFE:
- case DTS_STEREO | DTS_LFE:
- case DTS_DOLBY | DTS_LFE:
- for(i = 0; i < 256; i++){
- s16[6*i] = convert(f[i]);
- s16[6*i+1] = convert(f[i+256]);
- s16[6*i+2] = s16[6*i+3] = s16[6*i+4] = 0;
- s16[6*i+5] = convert(f[i+512]);
- }
- break;
- case DTS_3F | DTS_LFE:
- for(i = 0; i < 256; i++){
- s16[6*i] = convert(f[i+256]);
- s16[6*i+1] = convert(f[i+512]);
- s16[6*i+2] = s16[6*i+3] = 0;
- s16[6*i+4] = convert(f[i]);
- s16[6*i+5] = convert(f[i+768]);
- }
- break;
- case DTS_2F2R | DTS_LFE:
- for(i = 0; i < 256; i++){
- s16[6*i] = convert(f[i]);
- s16[6*i+1] = convert(f[i+256]);
- s16[6*i+2] = convert(f[i+512]);
- s16[6*i+3] = convert(f[i+768]);
- s16[6*i+4] = 0;
- s16[6*i+5] = convert(f[1024]);
- }
- break;
- case DTS_3F2R | DTS_LFE:
- for(i = 0; i < 256; i++){
- s16[6*i] = convert(f[i+256]);
- s16[6*i+1] = convert(f[i+512]);
- s16[6*i+2] = convert(f[i+768]);
- s16[6*i+3] = convert(f[i+1024]);
- s16[6*i+4] = convert(f[i]);
- s16[6*i+5] = convert(f[i+1280]);
- }
- break;
- }
-}
-
-static void channels_info(int flags)
-{
- int lfe = 0;
- char lfestr[5] = "";
-
- if (flags & DTS_LFE) {
- lfe = 1;
- strcpy(lfestr, "+lfe");
- }
- mp_msg(MSGT_DECAUDIO, MSGL_V, "DTS: ");
- switch(flags & DTS_CHANNEL_MASK){
- case DTS_MONO:
- mp_msg(MSGT_DECAUDIO, MSGL_V, "1.%d (mono%s)", lfe, lfestr);
- break;
- case DTS_CHANNEL:
- mp_msg(MSGT_DECAUDIO, MSGL_V, "2.%d (channel%s)", lfe, lfestr);
- break;
- case DTS_STEREO:
- mp_msg(MSGT_DECAUDIO, MSGL_V, "2.%d (stereo%s)", lfe, lfestr);
- break;
- case DTS_3F:
- mp_msg(MSGT_DECAUDIO, MSGL_V, "3.%d (3f%s)", lfe, lfestr);
- break;
- case DTS_2F2R:
- mp_msg(MSGT_DECAUDIO, MSGL_V, "4.%d (2f+2r%s)", lfe, lfestr);
- break;
- case DTS_3F2R:
- mp_msg(MSGT_DECAUDIO, MSGL_V, "5.%d (3f+2r%s)", lfe, lfestr);
- break;
- default:
- mp_msg(MSGT_DECAUDIO, MSGL_V, "x.%d (unknown%s)", lfe, lfestr);
- }
- mp_msg(MSGT_DECAUDIO, MSGL_V, "\n");
-}
-
-static int dts_sync(sh_audio_t *sh, int *flags)
-{
- dts_state_t *s = sh->context;
- int length;
- int sample_rate;
- int frame_length;
- int bit_rate;
-
- sh->a_in_buffer_len=0;
-
- while(1) {
- while(sh->a_in_buffer_len < HEADER_SIZE) {
- int c = demux_getc(sh->ds);
-
- if(c < 0)
- return -1;
- sh->a_in_buffer[sh->a_in_buffer_len++] = c;
- }
-
- length = dts_syncinfo(s, sh->a_in_buffer, flags, &sample_rate,
- &bit_rate, &frame_length);
-
- if(length >= HEADER_SIZE)
- break;
-
-// mp_msg(MSGT_DECAUDIO, MSGL_V, "skip\n");
- memmove(sh->a_in_buffer, sh->a_in_buffer+1, HEADER_SIZE-1);
- --sh->a_in_buffer_len;
- }
-
- demux_read_data(sh->ds, sh->a_in_buffer + HEADER_SIZE, length - HEADER_SIZE);
-
- sh->samplerate = sample_rate;
- sh->i_bps = bit_rate/8;
-
- return length;
-}
-
-static int decode_audio(sh_audio_t *sh, unsigned char *buf, int minlen, int maxlen)
-{
- dts_state_t *s = sh->context;
- int16_t *out_samples = (int16_t*)buf;
- int flags;
- level_t level;
- sample_t bias;
- int nblocks;
- int i;
- int data_size = 0;
-
- if(!sh->a_in_buffer_len)
- if(dts_sync(sh, &flags) < 0) return -1; /* EOF */
- sh->a_in_buffer_len=0;
-
- flags &= ~(DTS_CHANNEL_MASK | DTS_LFE);
- flags |= ch2flags[sh->channels - 1];
-
- level = CONVERT_LEVEL;
- bias = CONVERT_BIAS;
- flags |= DTS_ADJUST_LEVEL;
- if(dts_frame(s, sh->a_in_buffer, &flags, &level, bias)) {
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "dts_frame() failed\n");
- goto end;
- }
-
- nblocks = dts_blocks_num(s);
-
- for(i = 0; i < nblocks; i++) {
- if(dts_block(s)) {
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "dts_block() failed\n");
- goto end;
- }
-
- convert2s16_multi(dts_samples(s), out_samples, flags, sh->channels);
-
- out_samples += 256 * sh->channels;
- data_size += 256 * sizeof(int16_t) * sh->channels;
- }
-
-end:
- return data_size;
-}
-
-static int preinit(sh_audio_t *sh)
-{
- struct MPOpts *opts = sh->opts;
-
- /* 256 = samples per block, 16 = max number of blocks */
- int channels = opts->audio_output_channels;
- if (channels > 6)
- channels = 6;
- sh->audio_out_minsize = channels * sizeof(int16_t) * 256 * 16;
- sh->audio_in_minsize = DTSBUFFER_SIZE;
- sh->samplesize=2;
-
- return 1;
-}
-
-static int init(sh_audio_t *sh)
-{
- struct MPOpts *opts = sh->opts;
- dts_state_t *s;
- int flags;
- int decoded_bytes;
-
- s = dts_init(0);
- if(s == NULL) {
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "dts_init() failed\n");
- return 0;
- }
- sh->context = s;
-
- if(dts_sync(sh, &flags) < 0) {
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "dts sync failed\n");
- dts_free(s);
- return 0;
- }
- channels_info(flags);
-
- int channels = opts->audio_output_channels;
- if (channels > 6)
- channels = 6;
- assert(channels >= 1 && channels <= 6);
- sh->channels = channels;
-
- decoded_bytes = decode_audio(sh, sh->a_buffer, 1, sh->a_buffer_size);
- if(decoded_bytes > 0)
- sh->a_buffer_len = decoded_bytes;
- else {
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "dts decode failed on first frame (up/downmix problem?)\n");
- dts_free(s);
- return 0;
- }
-
- return 1;
-}
-
-static void uninit(sh_audio_t *sh)
-{
- dts_state_t *s = sh->context;
-
- dts_free(s);
-}
-
-static int control(sh_audio_t *sh,int cmd,void* arg, ...)
-{
- int flags;
-
- switch(cmd){
- case ADCTRL_RESYNC_STREAM:
- dts_sync(sh, &flags);
- return CONTROL_TRUE;
- }
- return CONTROL_UNKNOWN;
-}
diff --git a/libmpcodecs/ad_libmad.c b/libmpcodecs/ad_libmad.c
deleted file mode 100644
index 81475374e1..0000000000
--- a/libmpcodecs/ad_libmad.c
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include "config.h"
-
-#include "ad_internal.h"
-
-static const ad_info_t info = {
- "libmad mpeg audio decoder",
- "libmad",
- "A'rpi",
- "libmad...",
- "based on Xine's libmad/xine_decoder.c"
-};
-
-LIBAD_EXTERN(libmad)
-
-#include <mad.h>
-
-typedef struct mad_decoder_s {
-
- struct mad_synth synth;
- struct mad_stream stream;
- struct mad_frame frame;
-
- int have_frame;
-
- int output_sampling_rate;
- int output_open;
- int output_mode;
-
-} mad_decoder_t;
-
-static int preinit(sh_audio_t *sh){
-
- mad_decoder_t *this = calloc(1, sizeof(mad_decoder_t));
- sh->context = this;
-
- mad_synth_init (&this->synth);
- mad_stream_init (&this->stream);
- mad_frame_init (&this->frame);
-
- sh->audio_out_minsize=2*4608;
- sh->audio_in_minsize=4096;
-
- return 1;
-}
-
-static int read_frame(sh_audio_t *sh){
- mad_decoder_t *this = sh->context;
- int len;
-
-while((len=demux_read_data(sh->ds,&sh->a_in_buffer[sh->a_in_buffer_len],
- sh->a_in_buffer_size-sh->a_in_buffer_len))>0){
- sh->a_in_buffer_len+=len;
- while(1){
- int ret;
- mad_stream_buffer (&this->stream, sh->a_in_buffer, sh->a_in_buffer_len);
- ret=mad_frame_decode (&this->frame, &this->stream);
- if (this->stream.next_frame) {
- int num_bytes =
- (char*)sh->a_in_buffer+sh->a_in_buffer_len - (char*)this->stream.next_frame;
- memmove(sh->a_in_buffer, this->stream.next_frame, num_bytes);
- mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"libmad: %d bytes processed\n",sh->a_in_buffer_len-num_bytes);
- sh->a_in_buffer_len = num_bytes;
- }
- if (ret == 0) return 1; // OK!!!
- // error! try to resync!
- if(this->stream.error==MAD_ERROR_BUFLEN) break;
- }
-}
-mp_msg(MSGT_DECAUDIO,MSGL_INFO,"Cannot sync MAD frame\n");
-return 0;
-}
-
-static int init(sh_audio_t *sh){
- mad_decoder_t *this = sh->context;
-
- this->have_frame=read_frame(sh);
- if(!this->have_frame) return 0; // failed to sync...
-
- sh->channels=(this->frame.header.mode == MAD_MODE_SINGLE_CHANNEL) ? 1 : 2;
- sh->samplerate=this->frame.header.samplerate;
- if (sh->i_bps < 1)
- sh->i_bps=this->frame.header.bitrate/8;
- sh->samplesize=2;
-
- return 1;
-}
-
-static void uninit(sh_audio_t *sh){
- mad_decoder_t *this = sh->context;
- mad_synth_finish (&this->synth);
- mad_frame_finish (&this->frame);
- mad_stream_finish(&this->stream);
- free(sh->context);
-}
-
-/* utility to scale and round samples to 16 bits */
-static inline signed int scale(mad_fixed_t sample) {
- /* round */
- sample += (1L << (MAD_F_FRACBITS - 16));
-
- /* clip */
- if (sample >= MAD_F_ONE)
- sample = MAD_F_ONE - 1;
- else if (sample < -MAD_F_ONE)
- sample = -MAD_F_ONE;
-
- /* quantize */
- return sample >> (MAD_F_FRACBITS + 1 - 16);
-}
-
-static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen){
- mad_decoder_t *this = sh->context;
- int len=0;
-
- while(len<minlen && len+4608<=maxlen){
- if(!this->have_frame) this->have_frame=read_frame(sh);
- if(!this->have_frame) break; // failed to sync... or EOF
- this->have_frame=0;
-
- mad_synth_frame (&this->synth, &this->frame);
-
- { unsigned int nchannels, nsamples;
- mad_fixed_t const *left_ch, *right_ch;
- struct mad_pcm *pcm = &this->synth.pcm;
- uint16_t *output = (uint16_t*) buf;
-
- nchannels = pcm->channels;
- nsamples = pcm->length;
- left_ch = pcm->samples[0];
- right_ch = pcm->samples[1];
-
- len+=2*nchannels*nsamples;
- buf+=2*nchannels*nsamples;
-
- while (nsamples--) {
- /* output sample(s) in 16-bit signed little-endian PCM */
-
- *output++ = scale(*left_ch++);
-
- if (nchannels == 2)
- *output++ = scale(*right_ch++);
-
- }
- }
- }
-
- return len?len:-1;
-}
-
-static int control(sh_audio_t *sh,int cmd,void* arg, ...){
- mad_decoder_t *this = sh->context;
- // various optional functions you MAY implement:
- switch(cmd){
- case ADCTRL_RESYNC_STREAM:
- this->have_frame=0;
- mad_synth_init (&this->synth);
- mad_stream_init (&this->stream);
- mad_frame_init (&this->frame);
- return CONTROL_TRUE;
- case ADCTRL_SKIP_FRAME:
- this->have_frame=read_frame(sh);
- return CONTROL_TRUE;
- }
- return CONTROL_UNKNOWN;
-}
diff --git a/libmpcodecs/ad_msadpcm.c b/libmpcodecs/ad_msadpcm.c
deleted file mode 100644
index eee89de2ea..0000000000
--- a/libmpcodecs/ad_msadpcm.c
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * MS ADPCM decoder
- *
- * This file is responsible for decoding Microsoft ADPCM data.
- * Details about the data format can be found here:
- * http://www.pcisys.net/~melanson/codecs/
- *
- * Copyright (c) 2002 Mike Melanson
- *
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <libavutil/common.h>
-#include <libavutil/intreadwrite.h>
-
-#include "config.h"
-#include "mpbswap.h"
-#include "ad_internal.h"
-
-static const ad_info_t info =
-{
- "MS ADPCM audio decoder",
- "msadpcm",
- "Nick Kurshev",
- "Mike Melanson",
- ""
-};
-
-LIBAD_EXTERN(msadpcm)
-
-static const int ms_adapt_table[] =
-{
- 230, 230, 230, 230, 307, 409, 512, 614,
- 768, 614, 512, 409, 307, 230, 230, 230
-};
-
-static const uint8_t ms_adapt_coeff1[] =
-{
- 64, 128, 0, 48, 60, 115, 98
-};
-
-static const int8_t ms_adapt_coeff2[] =
-{
- 0, -64, 0, 16, 0, -52, -58
-};
-
-#define MS_ADPCM_PREAMBLE_SIZE 6
-
-#define LE_16(x) ((int16_t)AV_RL16(x))
-
-// clamp a number between 0 and 88
-#define CLAMP_0_TO_88(x) x = av_clip(x, 0, 88);
-// clamp a number within a signed 16-bit range
-#define CLAMP_S16(x) x = av_clip_int16(x);
-// clamp a number above 16
-#define CLAMP_ABOVE_16(x) if (x < 16) x = 16;
-// sign extend a 4-bit value
-#define SE_4BIT(x) if (x & 0x8) x -= 0x10;
-
-static int preinit(sh_audio_t *sh_audio)
-{
- sh_audio->audio_out_minsize = sh_audio->wf->nBlockAlign * 4;
- sh_audio->ds->ss_div =
- (sh_audio->wf->nBlockAlign - MS_ADPCM_PREAMBLE_SIZE) * 2;
- sh_audio->audio_in_minsize =
- sh_audio->ds->ss_mul = sh_audio->wf->nBlockAlign;
- return 1;
-}
-
-static int init(sh_audio_t *sh_audio)
-{
- sh_audio->channels=sh_audio->wf->nChannels;
- sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
- sh_audio->i_bps = sh_audio->wf->nBlockAlign *
- (sh_audio->channels*sh_audio->samplerate) / sh_audio->ds->ss_div;
- sh_audio->samplesize=2;
-
- return 1;
-}
-
-static void uninit(sh_audio_t *sh_audio)
-{
-}
-
-static int control(sh_audio_t *sh_audio,int cmd,void* arg, ...)
-{
- if(cmd==ADCTRL_SKIP_FRAME){
- demux_read_data(sh_audio->ds, sh_audio->a_in_buffer,sh_audio->ds->ss_mul);
- return CONTROL_TRUE;
- }
- return CONTROL_UNKNOWN;
-}
-
-static inline int check_coeff(uint8_t c) {
- if (c > 6) {
- mp_msg(MSGT_DECAUDIO, MSGL_WARN,
- "MS ADPCM: coefficient (%d) out of range (should be [0..6])\n",
- c);
- c = 6;
- }
- return c;
-}
-
-static int ms_adpcm_decode_block(unsigned short *output, unsigned char *input,
- int channels, int block_size)
-{
- int current_channel = 0;
- int coeff_idx;
- int idelta[2];
- int sample1[2];
- int sample2[2];
- int coeff1[2];
- int coeff2[2];
- int stream_ptr = 0;
- int out_ptr = 0;
- int upper_nibble = 1;
- int nibble;
- int snibble; // signed nibble
- int predictor;
-
- if (channels != 1) channels = 2;
- if (block_size < 7 * channels)
- return -1;
-
- // fetch the header information, in stereo if both channels are present
- coeff_idx = check_coeff(input[stream_ptr]);
- coeff1[0] = ms_adapt_coeff1[coeff_idx];
- coeff2[0] = ms_adapt_coeff2[coeff_idx];
- stream_ptr++;
- if (channels == 2)
- {
- coeff_idx = check_coeff(input[stream_ptr]);
- coeff1[1] = ms_adapt_coeff1[coeff_idx];
- coeff2[1] = ms_adapt_coeff2[coeff_idx];
- stream_ptr++;
- }
-
- idelta[0] = LE_16(&input[stream_ptr]);
- stream_ptr += 2;
- if (channels == 2)
- {
- idelta[1] = LE_16(&input[stream_ptr]);
- stream_ptr += 2;
- }
-
- sample1[0] = LE_16(&input[stream_ptr]);
- stream_ptr += 2;
- if (channels == 2)
- {
- sample1[1] = LE_16(&input[stream_ptr]);
- stream_ptr += 2;
- }
-
- sample2[0] = LE_16(&input[stream_ptr]);
- stream_ptr += 2;
- if (channels == 2)
- {
- sample2[1] = LE_16(&input[stream_ptr]);
- stream_ptr += 2;
- }
-
- if (channels == 1)
- {
- output[out_ptr++] = sample2[0];
- output[out_ptr++] = sample1[0];
- } else {
- output[out_ptr++] = sample2[0];
- output[out_ptr++] = sample2[1];
- output[out_ptr++] = sample1[0];
- output[out_ptr++] = sample1[1];
- }
-
- while (stream_ptr < block_size)
- {
- // get the next nibble
- if (upper_nibble)
- nibble = snibble = input[stream_ptr] >> 4;
- else
- nibble = snibble = input[stream_ptr++] & 0x0F;
- upper_nibble ^= 1;
- SE_4BIT(snibble);
-
- // should this really be a division and not a shift?
- // coefficients were originally scaled by for, which might have
- // been an optimization for 8-bit CPUs _if_ a shift is correct
- predictor = (
- ((sample1[current_channel] * coeff1[current_channel]) +
- (sample2[current_channel] * coeff2[current_channel])) / 64) +
- (snibble * idelta[current_channel]);
- CLAMP_S16(predictor);
- sample2[current_channel] = sample1[current_channel];
- sample1[current_channel] = predictor;
- output[out_ptr++] = predictor;
-
- // compute the next adaptive scale factor (a.k.a. the variable idelta)
- idelta[current_channel] =
- (ms_adapt_table[nibble] * idelta[current_channel]) / 256;
- CLAMP_ABOVE_16(idelta[current_channel]);
-
- // toggle the channel
- current_channel ^= channels - 1;
- }
-
- return (block_size - (MS_ADPCM_PREAMBLE_SIZE * channels)) * 2;
-}
-
-static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
-{
- int res;
- if (demux_read_data(sh_audio->ds, sh_audio->a_in_buffer,
- sh_audio->ds->ss_mul) !=
- sh_audio->ds->ss_mul)
- return -1; /* EOF */
-
- res = ms_adpcm_decode_block(
- (unsigned short*)buf, sh_audio->a_in_buffer,
- sh_audio->wf->nChannels, sh_audio->wf->nBlockAlign);
- return res < 0 ? res : 2 * res;
-}
diff --git a/libmpcodecs/ad_pcm.c b/libmpcodecs/ad_pcm.c
deleted file mode 100644
index 9ff4d6a90c..0000000000
--- a/libmpcodecs/ad_pcm.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdbool.h>
-
-#include "talloc.h"
-#include "config.h"
-#include "ad_internal.h"
-#include "libaf/af_format.h"
-#include "libaf/reorder_ch.h"
-
-static const ad_info_t info = {
- "Uncompressed PCM audio decoder",
- "pcm",
- "Nick Kurshev",
- "A'rpi",
- ""
-};
-
-struct ad_pcm_context {
- unsigned char *buffer;
- int buffer_pos;
- int buffer_len;
- int buffer_size;
-};
-
-LIBAD_EXTERN(pcm)
-
-static int init(sh_audio_t * sh_audio)
-{
- WAVEFORMATEX *h = sh_audio->wf;
- if (!h)
- return 0;
- sh_audio->i_bps = h->nAvgBytesPerSec;
- sh_audio->channels = h->nChannels;
- sh_audio->samplerate = h->nSamplesPerSec;
- sh_audio->samplesize = (h->wBitsPerSample + 7) / 8;
- sh_audio->sample_format = AF_FORMAT_S16_LE; // default
- switch (sh_audio->format) { /* hardware formats: */
- case 0x0:
- case 0x1: // Microsoft PCM
- case 0xfffe: // Extended
- switch (sh_audio->samplesize) {
- case 1: sh_audio->sample_format = AF_FORMAT_U8; break;
- case 2: sh_audio->sample_format = AF_FORMAT_S16_LE; break;
- case 3: sh_audio->sample_format = AF_FORMAT_S24_LE; break;
- case 4: sh_audio->sample_format = AF_FORMAT_S32_LE; break;
- }
- break;
- case 0x3: // IEEE float
- sh_audio->sample_format = AF_FORMAT_FLOAT_LE;
- break;
- case 0x6: sh_audio->sample_format = AF_FORMAT_A_LAW; break;
- case 0x7: sh_audio->sample_format = AF_FORMAT_MU_LAW; break;
- case 0x11: sh_audio->sample_format = AF_FORMAT_IMA_ADPCM; break;
- case 0x50: sh_audio->sample_format = AF_FORMAT_MPEG2; break;
-/* case 0x2000: sh_audio->sample_format=AFMT_AC3; */
- case 0x20776172: // 'raw '
- sh_audio->sample_format = AF_FORMAT_S16_BE;
- if (sh_audio->samplesize == 1)
- sh_audio->sample_format = AF_FORMAT_U8;
- break;
- case 0x736F7774: // 'twos'
- sh_audio->sample_format = AF_FORMAT_S16_BE;
- // intended fall-through
- case 0x74776F73: // 'sowt'
- if (sh_audio->samplesize == 1)
- sh_audio->sample_format = AF_FORMAT_S8;
- break;
- case 0x32336c66: // 'fl32', bigendian float32
- case 0x32334C46: // 'FL32', bigendian float32 in aiff
- sh_audio->sample_format = AF_FORMAT_FLOAT_BE;
- sh_audio->samplesize = 4;
- break;
- case 0x666c3332: // '23lf', little endian float32, MPlayer internal fourCC
- case 0x6D63706C: // 'lpcm'
- sh_audio->sample_format = AF_FORMAT_FLOAT_LE;
- sh_audio->samplesize = 4;
- break;
-/* case 0x34366c66: // 'fl64', bigendian float64
- sh_audio->sample_format=AF_FORMAT_FLOAT_BE;
- sh_audio->samplesize=8;
- break;
- case 0x666c3634: // '46lf', little endian float64, MPlayer internal fourCC
- sh_audio->sample_format=AF_FORMAT_FLOAT_LE;
- sh_audio->samplesize=8;
- break;*/
- case 0x34326e69: // 'in24', bigendian int24
- sh_audio->sample_format = AF_FORMAT_S24_BE;
- sh_audio->samplesize = 3;
- break;
- case 0x696e3234: // '42ni', little endian int24, MPlayer internal fourCC
- sh_audio->sample_format = AF_FORMAT_S24_LE;
- sh_audio->samplesize = 3;
- break;
- case 0x32336e69: // 'in32', bigendian int32
- sh_audio->sample_format = AF_FORMAT_S32_BE;
- sh_audio->samplesize = 4;
- break;
- case 0x696e3332: // '23ni', little endian int32, MPlayer internal fourCC
- sh_audio->sample_format = AF_FORMAT_S32_LE;
- sh_audio->samplesize = 4;
- break;
- default:
- if (sh_audio->samplesize != 2)
- sh_audio->sample_format = AF_FORMAT_U8;
- }
- if (!sh_audio->samplesize) // this would cause MPlayer to hang later
- sh_audio->samplesize = 2;
- sh_audio->context = talloc_zero(NULL, struct ad_pcm_context);
- return 1;
-}
-
-static int preinit(sh_audio_t *sh)
-{
- sh->audio_out_minsize = 2048;
- return 1;
-}
-
-static void uninit(sh_audio_t *sh)
-{
- talloc_free(sh->context);
-}
-
-static int control(sh_audio_t *sh, int cmd, void *arg, ...)
-{
- struct ad_pcm_context *ctx = sh->context;
- int skip;
- switch (cmd) {
- case ADCTRL_RESYNC_STREAM:
- ctx->buffer_len = 0;
- return true;
- case ADCTRL_SKIP_FRAME:
- skip = sh->i_bps / 16;
- skip = skip & (~3);
- demux_read_data(sh->ds, NULL, skip);
- return CONTROL_TRUE;
- }
- return CONTROL_UNKNOWN;
-}
-
-static int decode_audio(sh_audio_t *sh_audio, unsigned char *buf, int minlen,
- int maxlen)
-{
- int unitsize = sh_audio->channels * sh_audio->samplesize;
- minlen = (minlen + unitsize - 1) / unitsize * unitsize;
- if (minlen > maxlen)
- // if someone needs hundreds of channels adjust audio_out_minsize
- // based on channels in preinit()
- return -1;
-
- int len = 0;
- struct ad_pcm_context *ctx = sh_audio->context;
- while (len < minlen) {
- if (ctx->buffer_len - ctx->buffer_pos <= 0) {
- double pts;
- unsigned char *ptr;
- int plen = ds_get_packet_pts(sh_audio->ds, &ptr, &pts);
- if (plen < 0)
- break;
- if (ctx->buffer_size < plen) {
- talloc_free(ctx->buffer);
- ctx->buffer = talloc_size(ctx, plen);
- ctx->buffer_size = plen;
- }
- memcpy(ctx->buffer, ptr, plen);
- ctx->buffer_len = plen;
- ctx->buffer_pos = 0;
- if (pts != MP_NOPTS_VALUE) {
- sh_audio->pts = pts;
- sh_audio->pts_bytes = 0;
- }
- }
- int from_stored = ctx->buffer_len - ctx->buffer_pos;
- if (from_stored > minlen - len)
- from_stored = minlen - len;
- memcpy(buf + len, ctx->buffer + ctx->buffer_pos, from_stored);
- ctx->buffer_pos += from_stored;
- sh_audio->pts_bytes += from_stored;
- len += from_stored;
- }
- if (len % unitsize) {
- mp_msg(MSGT_DECAUDIO, MSGL_WARN, "[ad_pcm] discarding partial sample "
- "at end\n");
- len -= len % unitsize;
- }
- if (len == 0)
- len = -1; // The loop above only exits at error/EOF
- if (len > 0 && sh_audio->channels >= 5) {
- reorder_channel_nch(buf, AF_CHANNEL_LAYOUT_WAVEEX_DEFAULT,
- AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT,
- sh_audio->channels, len / sh_audio->samplesize,
- sh_audio->samplesize);
- }
- return len;
-}
diff --git a/libmpcodecs/ad_sample.c b/libmpcodecs/ad_sample.c
deleted file mode 100644
index 69f4b20dfc..0000000000
--- a/libmpcodecs/ad_sample.c
+++ /dev/null
@@ -1,145 +0,0 @@
-// SAMPLE audio decoder - you can use this file as template when creating new codec!
-
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include "config.h"
-#include "ad_internal.h"
-
-static const ad_info_t info = {
- "Sample audio decoder", // name of the driver
- "sample", // driver name. should be the same as filename without ad_
- "A'rpi", // writer/maintainer of _this_ file
- "", // writer/maintainer/site of the _codec_
- "" // comments
-};
-
-LIBAD_EXTERN(sample)
-
-#include "libsample/sample.h" // include your codec's .h files here
-
-static int preinit(sh_audio_t *sh){
- // let's check if the driver is available, return 0 if not.
- // (you should do that if you use external lib(s) which is optional)
- ...
-
- // there are default values set for buffering, but you can override them:
-
- // minimum output buffer size (should be the uncompressed max. frame size)
- sh->audio_out_minsize=4*2*1024; // in this sample, we assume max 4 channels,
- // 2 bytes/sample and 1024 samples/frame
- // Default: 8192
-
- // minimum input buffer size (set only if you need input buffering)
- // (should be the max compressed frame size)
- sh->audio_in_minsize=2048; // Default: 0 (no input buffer)
-
- // if you set audio_in_minsize non-zero, the buffer will be allocated
- // before the init() call by the core, and you can access it via
- // pointer: sh->audio_in_buffer
- // it will free'd after uninit(), so you don't have to use malloc/free here!
-
- // the next few parameters define the audio format (channels, sample type,
- // in/out bitrate etc.). it's OK to move these to init() if you can set
- // them only after some initialization:
-
- sh->samplesize=2; // bytes (not bits!) per sample per channel
- sh->channels=2; // number of channels
- sh->samplerate=44100; // samplerate
- sh->sample_format=AF_FORMAT_S16_LE; // sample format, see libao2/afmt.h
-
- sh->i_bps=64000/8; // input data rate (compressed bytes per second)
- // Note: if you have VBR or unknown input rate, set it to some common or
- // average value, instead of zero. it's used to predict time delay of
- // buffered compressed bytes, so it must be more-or-less real!
-
-//sh->o_bps=... // output data rate (uncompressed bytes per second)
- // Note: you DON'T need to set o_bps in most cases, as it defaults to:
- // sh->samplesize*sh->channels*sh->samplerate;
-
- // for constant rate compressed QuickTime (.mov files) codecs you MUST
- // set the compressed and uncompressed packet size (used by the demuxer):
- sh->ds->ss_mul = 34; // compressed packet size
- sh->ds->ss_div = 64; // samples per packet
-
- return 1; // return values: 1=OK 0=ERROR
-}
-
-static int init(sh_audio_t *sh_audio){
- // initialize the decoder, set tables etc...
-
- // you can store HANDLE or private struct pointer at sh->context
- // you can access WAVEFORMATEX header at sh->wf
-
- // set sample format/rate parameters if you didn't do it in preinit() yet.
-
- return 1; // return values: 1=OK 0=ERROR
-}
-
-static void uninit(sh_audio_t *sh){
- // uninit the decoder etc...
- // again: you don't have to free() a_in_buffer here! it's done by the core.
-}
-
-static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen){
-
- // audio decoding. the most important thing :)
- // parameters you get:
- // buf = pointer to the output buffer, you have to store uncompressed
- // samples there
- // minlen = requested minimum size (in bytes!) of output. it's just a
- // _recommendation_, you can decode more or less, it just tell you that
- // the caller process needs 'minlen' bytes. if it gets less, it will
- // call decode_audio() again.
- // maxlen = maximum size (bytes) of output. you MUST NOT write more to the
- // buffer, it's the upper-most limit!
- // note: maxlen will be always greater or equal to sh->audio_out_minsize
-
- // now, let's decode...
-
- // you can read the compressed stream using the demux stream functions:
- // demux_read_data(sh->ds, buffer, length) - read 'length' bytes to 'buffer'
- // ds_get_packet(sh->ds, &buffer) - set ptr buffer to next data packet
- // (both func return number of bytes or 0 for error)
-
- return len; // return value: number of _bytes_ written to output buffer,
- // or -1 for EOF (or uncorrectable error)
-}
-
-static int control(sh_audio_t *sh,int cmd,void* arg, ...){
- // various optional functions you MAY implement:
- switch(cmd){
- case ADCTRL_RESYNC_STREAM:
- // it is called once after seeking, to resync.
- // Note: sh_audio->a_in_buffer_len=0; is done _before_ this call!
- ...
- return CONTROL_TRUE;
- case ADCTRL_SKIP_FRAME:
- // it is called to skip (jump over) small amount (1/10 sec or 1 frame)
- // of audio data - used to sync audio to video after seeking
- // if you don't return CONTROL_TRUE, it will defaults to:
- // ds_fill_buffer(sh_audio->ds); // skip 1 demux packet
- ...
- return CONTROL_TRUE;
- }
- return CONTROL_UNKNOWN;
-}
diff --git a/libmpcodecs/native/alaw.h b/libmpcodecs/native/alaw.h
deleted file mode 100644
index e086e1d151..0000000000
--- a/libmpcodecs/native/alaw.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Generated by TOOLS/alaw-gen.c
-
-#ifndef MPLAYER_ALAW_H
-#define MPLAYER_ALAW_H
-
-const short alaw2short[]={
- -5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736,
- -7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784,
- -2752, -2624, -3008, -2880, -2240, -2112, -2496, -2368,
- -3776, -3648, -4032, -3904, -3264, -3136, -3520, -3392,
- -22016, -20992, -24064, -23040, -17920, -16896, -19968, -18944,
- -30208, -29184, -32256, -31232, -26112, -25088, -28160, -27136,
- -11008, -10496, -12032, -11520, -8960, -8448, -9984, -9472,
- -15104, -14592, -16128, -15616, -13056, -12544, -14080, -13568,
- -344, -328, -376, -360, -280, -264, -312, -296,
- -472, -456, -504, -488, -408, -392, -440, -424,
- -88, -72, -120, -104, -24, -8, -56, -40,
- -216, -200, -248, -232, -152, -136, -184, -168,
- -1376, -1312, -1504, -1440, -1120, -1056, -1248, -1184,
- -1888, -1824, -2016, -1952, -1632, -1568, -1760, -1696,
- -688, -656, -752, -720, -560, -528, -624, -592,
- -944, -912, -1008, -976, -816, -784, -880, -848,
- 5504, 5248, 6016, 5760, 4480, 4224, 4992, 4736,
- 7552, 7296, 8064, 7808, 6528, 6272, 7040, 6784,
- 2752, 2624, 3008, 2880, 2240, 2112, 2496, 2368,
- 3776, 3648, 4032, 3904, 3264, 3136, 3520, 3392,
- 22016, 20992, 24064, 23040, 17920, 16896, 19968, 18944,
- 30208, 29184, 32256, 31232, 26112, 25088, 28160, 27136,
- 11008, 10496, 12032, 11520, 8960, 8448, 9984, 9472,
- 15104, 14592, 16128, 15616, 13056, 12544, 14080, 13568,
- 344, 328, 376, 360, 280, 264, 312, 296,
- 472, 456, 504, 488, 408, 392, 440, 424,
- 88, 72, 120, 104, 24, 8, 56, 40,
- 216, 200, 248, 232, 152, 136, 184, 168,
- 1376, 1312, 1504, 1440, 1120, 1056, 1248, 1184,
- 1888, 1824, 2016, 1952, 1632, 1568, 1760, 1696,
- 688, 656, 752, 720, 560, 528, 624, 592,
- 944, 912, 1008, 976, 816, 784, 880, 848
-};
-
-const short ulaw2short[]={
- -32124, -31100, -30076, -29052, -28028, -27004, -25980, -24956,
- -23932, -22908, -21884, -20860, -19836, -18812, -17788, -16764,
- -15996, -15484, -14972, -14460, -13948, -13436, -12924, -12412,
- -11900, -11388, -10876, -10364, -9852, -9340, -8828, -8316,
- -7932, -7676, -7420, -7164, -6908, -6652, -6396, -6140,
- -5884, -5628, -5372, -5116, -4860, -4604, -4348, -4092,
- -3900, -3772, -3644, -3516, -3388, -3260, -3132, -3004,
- -2876, -2748, -2620, -2492, -2364, -2236, -2108, -1980,
- -1884, -1820, -1756, -1692, -1628, -1564, -1500, -1436,
- -1372, -1308, -1244, -1180, -1116, -1052, -988, -924,
- -876, -844, -812, -780, -748, -716, -684, -652,
- -620, -588, -556, -524, -492, -460, -428, -396,
- -372, -356, -340, -324, -308, -292, -276, -260,
- -244, -228, -212, -196, -180, -164, -148, -132,
- -120, -112, -104, -96, -88, -80, -72, -64,
- -56, -48, -40, -32, -24, -16, -8, 0,
- 32124, 31100, 30076, 29052, 28028, 27004, 25980, 24956,
- 23932, 22908, 21884, 20860, 19836, 18812, 17788, 16764,
- 15996, 15484, 14972, 14460, 13948, 13436, 12924, 12412,
- 11900, 11388, 10876, 10364, 9852, 9340, 8828, 8316,
- 7932, 7676, 7420, 7164, 6908, 6652, 6396, 6140,
- 5884, 5628, 5372, 5116, 4860, 4604, 4348, 4092,
- 3900, 3772, 3644, 3516, 3388, 3260, 3132, 3004,
- 2876, 2748, 2620, 2492, 2364, 2236, 2108, 1980,
- 1884, 1820, 1756, 1692, 1628, 1564, 1500, 1436,
- 1372, 1308, 1244, 1180, 1116, 1052, 988, 924,
- 876, 844, 812, 780, 748, 716, 684, 652,
- 620, 588, 556, 524, 492, 460, 428, 396,
- 372, 356, 340, 324, 308, 292, 276, 260,
- 244, 228, 212, 196, 180, 164, 148, 132,
- 120, 112, 104, 96, 88, 80, 72, 64,
- 56, 48, 40, 32, 24, 16, 8, 0
-};
-
-#endif /* MPLAYER_ALAW_H */
diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c
index 1d35566cc3..48e2b0627e 100644
--- a/libmpcodecs/vd.c
+++ b/libmpcodecs/vd.c
@@ -37,34 +37,14 @@
#include "vf.h"
#include "libvo/video_out.h"
-extern const vd_functions_t mpcodecs_vd_null;
extern const vd_functions_t mpcodecs_vd_ffmpeg;
-extern const vd_functions_t mpcodecs_vd_raw;
-extern const vd_functions_t mpcodecs_vd_hmblck;
-extern const vd_functions_t mpcodecs_vd_mpng;
-extern const vd_functions_t mpcodecs_vd_ijpg;
-extern const vd_functions_t mpcodecs_vd_mtga;
-extern const vd_functions_t mpcodecs_vd_realvid;
-extern const vd_functions_t mpcodecs_vd_lzo;
-extern const vd_functions_t mpcodecs_vd_qtvideo;
/* Please do not add any new decoders here. If you want to implement a new
* decoder, add it to libavcodec, except for wrappers around external
* libraries and decoders requiring binary support. */
const vd_functions_t * const mpcodecs_vd_drivers[] = {
- &mpcodecs_vd_null,
&mpcodecs_vd_ffmpeg,
- &mpcodecs_vd_lzo,
- &mpcodecs_vd_raw,
- &mpcodecs_vd_hmblck,
-#ifdef CONFIG_PNG
- &mpcodecs_vd_mpng,
-#endif
-#ifdef CONFIG_JPEG
- &mpcodecs_vd_ijpg,
-#endif
- &mpcodecs_vd_mtga,
/* Please do not add any new decoders here. If you want to implement a new
* decoder, add it to libavcodec, except for wrappers around external
* libraries and decoders requiring binary support. */
diff --git a/libmpcodecs/vd_hmblck.c b/libmpcodecs/vd_hmblck.c
deleted file mode 100644
index a9a871cae2..0000000000
--- a/libmpcodecs/vd_hmblck.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "config.h"
-#include "mp_msg.h"
-
-#include "vd_internal.h"
-
-static const vd_info_t info = {
- "Hauppauge Macroblock/NV12/NV21 Decoder",
- "hmblck",
- "Alex <d18c7db@hotmail.com>, A'rpi, Alex Beregszaszi",
- "Alex <d18c7db@hotmail.com>",
- "uncompressed"
-};
-
-LIBVD_EXTERN(hmblck)
-
-static void de_macro_y(unsigned char* dst,unsigned char* src,int dstride,int w,int h){
- unsigned int y;
- // descramble Y plane
- for (y=0; y<h; y+=16) {
- unsigned int x;
- for (x=0; x<w; x+=16) {
- unsigned int i;
- for (i=0; i<16; i++) {
- memcpy(dst + x + (y+i)*dstride, src, 16);
- src+=16;
- }
- }
- }
-}
-
-static void de_macro_uv(unsigned char* dstu,unsigned char* dstv,unsigned char* src,int dstride,int w,int h){
- unsigned int y;
- // descramble U/V plane
- for (y=0; y<h; y+=16) {
- unsigned int x;
- for (x=0; x<w; x+=8) {
- unsigned int i;
- for (i=0; i<16; i++) {
- int idx=x + (y+i)*dstride;
- dstu[idx+0]=src[0]; dstv[idx+0]=src[1];
- dstu[idx+1]=src[2]; dstv[idx+1]=src[3];
- dstu[idx+2]=src[4]; dstv[idx+2]=src[5];
- dstu[idx+3]=src[6]; dstv[idx+3]=src[7];
- dstu[idx+4]=src[8]; dstv[idx+4]=src[9];
- dstu[idx+5]=src[10]; dstv[idx+5]=src[11];
- dstu[idx+6]=src[12]; dstv[idx+6]=src[13];
- dstu[idx+7]=src[14]; dstv[idx+7]=src[15];
- src+=16;
- }
- }
- }
-}
-
-/*************************************************************************
- * convert a nv12 buffer to yv12
- */
-static int nv12_to_yv12(unsigned char *data, int len, mp_image_t* mpi, int swapped) {
- unsigned int Y_size = mpi->width * mpi->height;
- unsigned int UV_size = mpi->chroma_width * mpi->chroma_height;
- unsigned int idx;
- unsigned char *dst_Y = mpi->planes[0];
- unsigned char *dst_U = mpi->planes[1];
- unsigned char *dst_V = mpi->planes[2];
- unsigned char *src = data + Y_size;
-
- // sanity check raw stream
- if ( (len != (Y_size + (UV_size<<1))) ) {
- mp_msg(MSGT_DECVIDEO, MSGL_ERR,
- "hmblck: Image size inconsistent with data size.\n");
- return 0;
- }
- if (mpi->num_planes != 3) {
- mp_msg(MSGT_DECVIDEO,MSGL_ERR,
- "hmblck: Incorrect number of image planes.\n");
- return 0;
- }
-
- // luma data is easy, just copy it
- memcpy(dst_Y, data, Y_size);
-
- // chroma data is interlaced UVUV... so deinterlace it
- for(idx=0; idx<UV_size; idx++ ) {
- *(dst_U + idx) = *(src + (idx<<1) + (swapped ? 1 : 0));
- *(dst_V + idx) = *(src + (idx<<1) + (swapped ? 0 : 1));
- }
- return 1;
-}
-
-/*************************************************************************
- * set/get/query special features/parameters
- */
-static int control(sh_video_t *sh,int cmd, void *arg,...){
- return CONTROL_UNKNOWN;
-}
-/*************************************************************************
- * init driver
- */
-static int init(sh_video_t *sh){
- return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,sh->format);
-}
-/*************************************************************************
- * uninit driver
- */
-static void uninit(sh_video_t *sh){
-}
-/*************************************************************************
- * decode a frame
- */
-static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
- mp_image_t* mpi;
-
- if(len<=0) return NULL; // skipped frame
-
- mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
- sh->disp_w, sh->disp_h);
- if(!mpi) return NULL;
-
- if(sh->format == IMGFMT_HM12) {
- //if(!de_macro(sh, data, len, flags, mpi)) return NULL;
- de_macro_y(mpi->planes[0],data,mpi->stride[0],mpi->w,mpi->h);
- de_macro_uv(mpi->planes[1],mpi->planes[2],
- (unsigned char *)data+mpi->w*mpi->h,mpi->stride[1],
- mpi->w/2,mpi->h/2);
- } else {
- if(!nv12_to_yv12(data, len, mpi,(sh->format == IMGFMT_NV21))) return NULL;
- }
-
- return mpi;
-}
-/*************************************************************************/
diff --git a/libmpcodecs/vd_ijpg.c b/libmpcodecs/vd_ijpg.c
deleted file mode 100644
index 2bfefb405d..0000000000
--- a/libmpcodecs/vd_ijpg.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "config.h"
-#include "mp_msg.h"
-
-#include <jpeglib.h>
-#define UINT16 IJPG_UINT16
-#define INT16 IJPG_INT16
-
-#include <setjmp.h>
-
-#include "mpbswap.h"
-
-#include "vd_internal.h"
-
-static const vd_info_t info = {
- "JPEG Images decoder",
- "ijpg",
- "Pontscho",
- "based on vd_mpng.c",
- "uses Independent JPEG Group's jpeglib"
-};
-
-LIBVD_EXTERN(ijpg)
-
-static int last_w=-1;
-static int last_h=-1;
-static int last_depth=-1;
-
-// to set/get/query special features/parameters
-static int control(sh_video_t *sh,int cmd,void* arg,...){
- if (cmd == VDCTRL_QUERY_FORMAT) {
- int format = *(int *)arg;
- if ((last_depth == 24 && format == IMGFMT_RGB24) ||
- (last_depth == 8 && format == IMGFMT_Y8 ))
- return CONTROL_TRUE;
- return CONTROL_FALSE;
- }
- return CONTROL_UNKNOWN;
-}
-
-// init driver
-static int init(sh_video_t *sh){
- last_w=-1;
- return 1;
-}
-
-// uninit driver
-static void uninit(sh_video_t *sh){
-}
-
-//mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h);
-
-typedef struct
-{
- struct jpeg_source_mgr pub;
- unsigned char * inbuf;
- int bufsize;
-} my_source_mgr;
-
-typedef my_source_mgr * my_src_ptr;
-
-METHODDEF(void) init_source (j_decompress_ptr cinfo)
-{
-}
-
-METHODDEF(boolean) fill_input_buffer (j_decompress_ptr cinfo)
-{
- my_src_ptr src = (my_src_ptr) cinfo->src;
- src->pub.next_input_byte = src->inbuf;
- src->pub.bytes_in_buffer = src->bufsize;
- return TRUE;
-}
-
-METHODDEF(void) skip_input_data (j_decompress_ptr cinfo, long num_bytes)
-{
- my_src_ptr src = (my_src_ptr) cinfo->src;
-
- if (num_bytes > 0)
- {
- while (num_bytes > (long) src->pub.bytes_in_buffer)
- {
- num_bytes -= (long) src->pub.bytes_in_buffer;
- (void) fill_input_buffer(cinfo);
- }
- src->pub.next_input_byte += (size_t) num_bytes;
- src->pub.bytes_in_buffer -= (size_t) num_bytes;
- }
-}
-
-METHODDEF(void) term_source (j_decompress_ptr cinfo) { }
-
-static void jpeg_buf_src (j_decompress_ptr cinfo, char * inbuf, int bufsize)
-{
- my_src_ptr src;
- if (cinfo->src == NULL) cinfo->src=malloc( sizeof( my_source_mgr ) );
- src = (my_src_ptr) cinfo->src;
- src->pub.init_source = init_source;
- src->pub.fill_input_buffer = fill_input_buffer;
- src->pub.skip_input_data = skip_input_data;
- src->pub.resync_to_restart = jpeg_resync_to_restart;
- src->pub.term_source = term_source;
- src->inbuf = inbuf;
- src->bufsize=bufsize;
- src->pub.bytes_in_buffer = 0;
- src->pub.next_input_byte = NULL;
-}
-
-struct my_error_mgr
-{
- struct jpeg_error_mgr pub;
- jmp_buf setjmp_buffer;
-};
-
-typedef struct my_error_mgr * my_error_ptr;
-
-METHODDEF(void) my_error_exit (j_common_ptr cinfo)
-{
- my_error_ptr myerr=(my_error_ptr) cinfo->err;
- (*cinfo->err->output_message) (cinfo);
- longjmp(myerr->setjmp_buffer, 1);
-}
-
-// decode a frame
-static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
- struct jpeg_decompress_struct cinfo;
- struct my_error_mgr jerr;
- mp_image_t * mpi = NULL;
- int width,height,depth,i;
-
- if ( len <= 0 ) return NULL; // skipped frame
-
- memset(&cinfo, 0, sizeof(cinfo));
- memset(&jerr, 0, sizeof(jerr));
- cinfo.err=jpeg_std_error( &jerr.pub );
- jerr.pub.error_exit=my_error_exit;
- if( setjmp( jerr.setjmp_buffer ) )
- {
- mp_msg( MSGT_DECVIDEO,MSGL_ERR,"[ijpg] setjmp error ...\n" );
- return NULL;
- }
-
- jpeg_create_decompress( &cinfo );
- jpeg_buf_src( &cinfo,data,len );
- jpeg_read_header( &cinfo,TRUE );
- sh->disp_w=width=cinfo.image_width;
- sh->disp_h=height=cinfo.image_height;
- jpeg_start_decompress( &cinfo );
- depth=cinfo.output_components * 8;
-
- switch( depth ) {
- case 8:
- case 24: break;
- default: mp_msg( MSGT_DECVIDEO,MSGL_ERR,"Sorry, unsupported JPEG colorspace: %d.\n",depth ); return NULL;
- }
-
- if ( last_w!=width || last_h!=height || last_depth != depth )
- {
- last_depth = depth;
- if(!mpcodecs_config_vo( sh,width,height, depth == 8 ? IMGFMT_Y8 : IMGFMT_RGB24 )) return NULL;
- last_w=width; last_h=height;
- }
-
- mpi=mpcodecs_get_image( sh,MP_IMGTYPE_TEMP,MP_IMGFLAG_ACCEPT_STRIDE,width,height );
- if ( !mpi ) return NULL;
-
- for ( i=0;i < height;i++ )
- {
- unsigned char * drow = mpi->planes[0] + mpi->stride[0] * i;
- jpeg_read_scanlines( &cinfo,(JSAMPLE**)&drow,1 );
- }
-
- jpeg_finish_decompress(&cinfo);
- jpeg_destroy_decompress(&cinfo);
-
- return mpi;
-}
diff --git a/libmpcodecs/vd_lzo.c b/libmpcodecs/vd_lzo.c
deleted file mode 100644
index fb926895cc..0000000000
--- a/libmpcodecs/vd_lzo.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "config.h"
-#include "mp_msg.h"
-
-#include "vd_internal.h"
-#include "libavutil/lzo.h"
-
-#define MOD_NAME "DecLZO"
-
-static const vd_info_t info = {
- "LZO compressed Video",
- "lzo",
- "Tilmann Bitterberg",
- "Transcode development team <http://www.theorie.physik.uni-goettingen.de/~ostreich/transcode/>",
- "based on liblzo: http://www.oberhumer.com/opensource/lzo/"
-};
-
-LIBVD_EXTERN(lzo)
-
-typedef struct {
- uint8_t *buffer;
- int bufsz;
- int codec;
-} lzo_context_t;
-
-// to set/get/query special features/parameters
-static int control (sh_video_t *sh, int cmd, void* arg, ...)
-{
- lzo_context_t *priv = sh->context;
- switch(cmd){
- case VDCTRL_QUERY_FORMAT:
- if (*(int *)arg == priv->codec) return CONTROL_TRUE;
- return CONTROL_FALSE;
- }
- return CONTROL_UNKNOWN;
-}
-
-
-// init driver
-static int init(sh_video_t *sh)
-{
- lzo_context_t *priv;
-
- if (sh->bih->biSizeImage <= 0) {
- mp_msg (MSGT_DECVIDEO, MSGL_ERR, "[%s] Invalid frame size\n", MOD_NAME);
- return 0;
- }
-
- priv = malloc(sizeof(lzo_context_t));
- if (!priv)
- {
- mp_msg (MSGT_DECVIDEO, MSGL_ERR, "[%s] memory allocation failed\n", MOD_NAME);
- return 0;
- }
- priv->bufsz = sh->bih->biSizeImage;
- priv->buffer = malloc(priv->bufsz + AV_LZO_OUTPUT_PADDING);
- priv->codec = -1;
- sh->context = priv;
-
- return 1;
-}
-
-// uninit driver
-static void uninit(sh_video_t *sh)
-{
- lzo_context_t *priv = sh->context;
-
- if (priv)
- {
- free(priv->buffer);
- free(priv);
- }
-
- sh->context = NULL;
-}
-
-// decode a frame
-static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags)
-{
- int r;
- mp_image_t* mpi;
- lzo_context_t *priv = sh->context;
- int w = priv->bufsz;
-
- if (len <= 0) {
- return NULL; // skipped frame
- }
-
- r = av_lzo1x_decode(priv->buffer, &w, data, &len);
- if (r) {
- /* this should NEVER happen */
- mp_msg (MSGT_DECVIDEO, MSGL_ERR,
- "[%s] internal error - decompression failed: %d\n", MOD_NAME, r);
- return NULL;
- }
-
- if (priv->codec == -1) {
- // detect RGB24 vs. YV12 via decoded size
- mp_msg (MSGT_DECVIDEO, MSGL_V, "[%s] 2 depth %d, format %d data %p len (%d) (%d)\n",
- MOD_NAME, sh->bih->biBitCount, sh->format, data, len, sh->bih->biSizeImage
- );
-
- if (w == 0) {
- priv->codec = IMGFMT_BGR24;
- mp_msg (MSGT_DECVIDEO, MSGL_V, "[%s] codec chosen is BGR24\n", MOD_NAME);
- } else if (w == (sh->bih->biSizeImage)/2) {
- priv->codec = IMGFMT_YV12;
- mp_msg (MSGT_DECVIDEO, MSGL_V, "[%s] codec chosen is YV12\n", MOD_NAME);
- } else {
- priv->codec = -1;
- mp_msg(MSGT_DECVIDEO,MSGL_ERR,"[%s] Unsupported out_fmt\n", MOD_NAME);
- return NULL;
- }
-
- if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,priv->codec)) {
- priv->codec = -1;
- return NULL;
- }
- }
-
- mpi = mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0,
- sh->disp_w, sh->disp_h);
-
-
- if (!mpi) {
- mp_msg (MSGT_DECVIDEO, MSGL_ERR, "[%s] mpcodecs_get_image failed\n", MOD_NAME);
- return NULL;
- }
-
- mpi->planes[0] = priv->buffer;
- if (priv->codec == IMGFMT_BGR24)
- mpi->stride[0] = 3 * sh->disp_w;
- else {
- mpi->stride[0] = sh->disp_w;
- mpi->planes[2] = priv->buffer + sh->disp_w*sh->disp_h;
- mpi->stride[2] = sh->disp_w / 2;
- mpi->planes[1] = priv->buffer + sh->disp_w*sh->disp_h*5/4;
- mpi->stride[1] = sh->disp_w / 2;
- }
-
- mp_msg (MSGT_DECVIDEO, MSGL_DBG2,
- "[%s] decompressed %lu bytes into %lu bytes\n", MOD_NAME,
- (long) len, (long)w);
-
- return mpi;
-}
diff --git a/libmpcodecs/vd_mpng.c b/libmpcodecs/vd_mpng.c
deleted file mode 100644
index c430566c70..0000000000
--- a/libmpcodecs/vd_mpng.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "config.h"
-#include "mp_msg.h"
-
-#include <png.h>
-
-#include "libavutil/common.h"
-#include "mpbswap.h"
-#include "libvo/fastmemcpy.h"
-
-#include "vd_internal.h"
-
-static const vd_info_t info = {
- "PNG Images decoder",
- "mpng",
- "A'rpi",
- ".so, based on mpng.c",
- "uses libpng, 8bpp modes not supported yet"
-};
-
-LIBVD_EXTERN(mpng)
-
-static unsigned int out_fmt=0;
-
-static int last_w=-1;
-static int last_h=-1;
-static int last_c=-1;
-
-// to set/get/query special features/parameters
-static int control(sh_video_t *sh,int cmd,void* arg,...){
- switch (cmd)
- {
- case VDCTRL_QUERY_FORMAT:
- if (*((int *) arg) == out_fmt) return CONTROL_TRUE;
- return CONTROL_FALSE;
- }
- return CONTROL_UNKNOWN;
-}
-
-// init driver
-static int init(sh_video_t *sh){
- last_w=-1;
- return 1;
-}
-
-// uninit driver
-static void uninit(sh_video_t *sh){
-}
-
-//mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h);
-
-static int pngPointer;
-static int pngLength;
-
-static void pngReadFN( png_structp pngstr,png_bytep buffer,png_size_t size )
-{
- char * p = png_get_io_ptr(pngstr);
- if(size>pngLength-pngPointer && pngLength>=pngPointer) size=pngLength-pngPointer;
- fast_memcpy( buffer,(char *)&p[pngPointer],size );
- pngPointer+=size;
-}
-
-// decode a frame
-static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
- png_structp png;
- png_infop info;
- png_infop endinfo;
-// png_bytep data;
- png_bytep * row_p;
- png_uint_32 png_width=0,png_height=0;
- int depth,color;
- png_uint_32 i;
- png_byte color_type;
- mp_image_t* mpi;
-
- int cols;
- png_colorp pal;
- unsigned char *p;
-
- if(len<=0) return NULL; // skipped frame
-
- png=png_create_read_struct( PNG_LIBPNG_VER_STRING,NULL,NULL,NULL );
- info=png_create_info_struct( png );
- endinfo=png_create_info_struct( png );
-
- pngPointer=8;
- pngLength=len;
- png_set_read_fn( png,data,pngReadFN );
- png_set_strip_16( png );
- png_set_sig_bytes( png,8 );
- png_read_info( png,info );
- png_get_IHDR( png,info,&png_width,&png_height,&depth,&color,NULL,NULL,NULL );
- png_set_bgr( png );
-
- color_type=png_get_color_type(png, info);
-
- switch( color_type ) {
- case PNG_COLOR_TYPE_GRAY_ALPHA:
- mp_msg( MSGT_DECVIDEO,MSGL_INFO,"Sorry gray scaled png with alpha channel not supported at moment.\n" );
- break;
- case PNG_COLOR_TYPE_GRAY:
- out_fmt=IMGFMT_Y800;
- break;
- case PNG_COLOR_TYPE_PALETTE:
- out_fmt=IMGFMT_BGR8;
- break;
- case PNG_COLOR_TYPE_RGB_ALPHA:
- out_fmt=IMGFMT_BGR32;
- break;
- case PNG_COLOR_TYPE_RGB:
- out_fmt=IMGFMT_BGR24;
- break;
- default:
- mp_msg( MSGT_DECVIDEO,MSGL_INFO,"Sorry, unsupported PNG colorspace: %d.\n" ,color_type);
- }
-
- // (re)init libvo if image parameters changed (width/height/colorspace)
- if(last_w!=png_width || last_h!=png_height || last_c!=out_fmt){
- last_w=png_width; last_h=png_height; last_c=out_fmt;
- if(!out_fmt) return NULL;
- if(!mpcodecs_config_vo(sh,png_width,png_height,out_fmt)) return NULL;
- }
-
-#if 0
- switch( info->color_type )
- {
- case PNG_COLOR_TYPE_GRAY_ALPHA: printf( "[png] used GrayA -> stripping alpha channel\n" ); break;
- case PNG_COLOR_TYPE_GRAY: printf( "[png] used Gray -> rgb\n" ); break;
- case PNG_COLOR_TYPE_PALETTE: printf( "[png] used palette -> rgb\n" ); break;
- case PNG_COLOR_TYPE_RGB_ALPHA: printf( "[png] used RGBA -> stripping alpha channel\n" ); break;
- case PNG_COLOR_TYPE_RGB: printf( "[png] read rgb datas.\n" ); break;
- }
-#endif
-
- mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
- png_width,png_height);
- if(!mpi) return NULL;
-
-// Let's DECODE!
- row_p=malloc( sizeof( png_bytep ) * png_height );
-//png_get_rowbytes( png,info )
- for ( i=0; i < png_height; i++ ) row_p[i]=mpi->planes[0] + mpi->stride[0]*i;
- png_read_image( png,row_p );
- free( row_p );
-
- if (out_fmt==IMGFMT_BGR8) {
- png_get_PLTE( png,info,&pal,&cols );
- mpi->planes[1] = realloc(mpi->planes[1], 4*cols);
- p = mpi->planes[1];
- for (i = 0; i < cols; i++) {
- *p++ = pal[i].blue;
- *p++ = pal[i].green;
- *p++ = pal[i].red;
- *p++ = 0;
- }
- }
-
- png_read_end( png,endinfo );
- png_destroy_read_struct( &png,&info,&endinfo );
-
- return mpi;
-}
diff --git a/libmpcodecs/vd_mtga.c b/libmpcodecs/vd_mtga.c
deleted file mode 100644
index 861f898f80..0000000000
--- a/libmpcodecs/vd_mtga.c
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * based on: XreaL's x_r_img_tga.* (http://www.sourceforge.net/projects/xreal/)
- * libtarga.*
- * xli's tga.*
- *
- * Copyright (c) 2002 Tilman Sauerbeck <tsauerbeck@users.sourceforge.net>
- *
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <libavutil/intreadwrite.h>
-
-#include "config.h"
-#include "mp_msg.h"
-
-#include "libvo/fastmemcpy.h"
-
-#include "vd_internal.h"
-
-static const vd_info_t info =
-{
- "TGA Images decoder",
- "mtga",
- "Tilman Sauerbeck, A'rpi",
- "Tilman Sauerbeck",
- "only 24bpp and 32bpp RGB targa files support so far"
-};
-
-LIBVD_EXTERN(mtga)
-
-typedef enum
-{
- TGA_NO_DATA,
- TGA_UNCOMP_PALETTED,
- TGA_UNCOMP_TRUECOLOR,
- TGA_UNCOMP_GRAYSCALE,
- TGA_RLE_PALETTED = 9,
- TGA_RLE_TRUECOLOR,
- TGA_RLE_GRAYSCALE
-} TGAImageType;
-
-typedef struct
-{
- unsigned char id_len;
- unsigned short img_type;
-
- unsigned short width;
- unsigned short height;
-
- unsigned char bpp;
- unsigned char origin; /* 0 = lower left, 1 = upper left */
- unsigned short start_row;
- short increment;
-} TGAInfo;
-
-static unsigned int out_fmt = 0;
-
-static int last_w = -1;
-static int last_h = -1;
-static int last_c = -1;
-
-
-/* to set/get/query special features/parameters */
-static int control(sh_video_t *sh, int cmd, void *arg, ...)
-{
- switch (cmd)
- {
- case VDCTRL_QUERY_FORMAT:
- if (*((int *) arg) == out_fmt) return CONTROL_TRUE;
- return CONTROL_FALSE;
- }
- return CONTROL_UNKNOWN;
-}
-
-/* init driver */
-static int init(sh_video_t *sh)
-{
- sh->context = calloc(1, sizeof(TGAInfo));
- last_w = -1;
-
- return 1;
-}
-
-
-/* uninit driver */
-static void uninit(sh_video_t *sh)
-{
- TGAInfo *info = sh->context;
- free(info);
- return;
-}
-
-
-/* decode a runlength-encoded tga */
-static void decode_rle_tga(TGAInfo *info, unsigned char *data, mp_image_t *mpi)
-{
- int row, col, replen, i, num_bytes = info->bpp / 8;
- unsigned char repetitions, packet_header, *final;
-
- /* see line 207 to see why this loop is set up like this */
- for (row = info->start_row; (!info->origin && row) || (info->origin && row < info->height); row += info->increment)
- {
- final = mpi->planes[0] + mpi->stride[0] * row;
-
- for (col = 0; col < info->width; col += repetitions)
- {
- packet_header = *data++;
- repetitions = (1 + (packet_header & 0x7f));
- replen = repetitions * num_bytes;
-
- if (packet_header & 0x80) /* runlength encoded packet */
- {
- memcpy(final, data, num_bytes);
-
- // Note: this will be slow when DR to vram!
- i=num_bytes;
- while(2*i<=replen){
- memcpy(final+i,final,i);
- i*=2;
- }
- memcpy(final+i,final,replen-i);
- data += num_bytes;
- }
- else /* raw packet */
- {
- fast_memcpy(final, data, replen);
- data += replen;
- }
-
- final += replen;
- }
- }
-
- return;
-}
-
-
-static void decode_uncompressed_tga(TGAInfo *info, unsigned char *data, mp_image_t *mpi)
-{
- unsigned char *final;
- int row, num_bytes = info->bpp / 8;
-
- /* see line 207 to see why this loop is set up like this */
- for (row = info->start_row; (!info->origin && row) || (info->origin && row < info->height); row += info->increment)
- {
- final = mpi->planes[0] + mpi->stride[0] * row;
- fast_memcpy(final, data, info->width * num_bytes);
- data += info->width * num_bytes;
- }
-
- return;
-}
-
-
-static short read_tga_header(unsigned char *buf, TGAInfo *info)
-{
- info->id_len = buf[0];
-
- info->img_type = buf[2];
-
- /* targa data is always stored in little endian byte order */
- info->width = AV_RL16(&buf[12]);
- info->height = AV_RL16(&buf[14]);
-
- info->bpp = buf[16];
-
- info->origin = (buf[17] & 0x20) >> 5;
-
- /* FIXME check for valid targa data */
-
- return 0;
-}
-
-
-/* decode a frame */
-static mp_image_t *decode(sh_video_t *sh, void *raw, int len, int flags)
-{
- TGAInfo *info = sh->context;
- unsigned char *data = raw;
- mp_image_t *mpi;
-
-
- if (len <= 0)
- return NULL; /* skip frame */
-
- read_tga_header(data, info); /* read information about the file */
-
- if (info->bpp == 24)
- out_fmt = IMGFMT_BGR24;
- else if (info->bpp == 32)
- out_fmt = IMGFMT_BGR32;
- else
- {
- mp_msg(MSGT_DECVIDEO, MSGL_INFO, "Unsupported TGA type! depth=%d\n",info->bpp);
- return NULL;
- }
-
- if (info->img_type != TGA_UNCOMP_TRUECOLOR && info->img_type != TGA_RLE_TRUECOLOR) /* not a true color image */
- {
- mp_msg(MSGT_DECVIDEO, MSGL_INFO, "Unsupported TGA type: %i!\n", info->img_type);
- return NULL;
- }
-
- /* if img.origin is 0, we decode from bottom to top. if it's 1, we decode from top to bottom */
- info->start_row = (info->origin) ? 0 : info->height - 1;
- info->increment = (info->origin) ? 1 : -1;
-
- /* set data to the beginning of the image data */
- data += 18 + info->id_len;
-
- /* (re)init libvo if image parameters changed (width/height/colorspace) */
- if (last_w != info->width || last_h != info->height || last_c != out_fmt)
- {
- last_w = info->width;
- last_h = info->height;
- last_c = out_fmt;
-
- if (!out_fmt || !mpcodecs_config_vo(sh, info->width, info->height, out_fmt))
- return NULL;
- }
-
- if (!(mpi = mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, info->width, info->height)))
- return NULL;
-
- /* finally decode the image */
- if (info->img_type == TGA_UNCOMP_TRUECOLOR)
- decode_uncompressed_tga(info, data, mpi);
- else if (info->img_type == TGA_RLE_TRUECOLOR)
- decode_rle_tga(info, data, mpi);
-// else
-// mpi = NULL;
-
- return mpi;
-}
diff --git a/libmpcodecs/vd_raw.c b/libmpcodecs/vd_raw.c
deleted file mode 100644
index 4b18ab301e..0000000000
--- a/libmpcodecs/vd_raw.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "config.h"
-#include "mp_msg.h"
-
-#include "vd_internal.h"
-
-static const vd_info_t info = {
- "RAW Uncompressed Video",
- "raw",
- "A'rpi",
- "A'rpi & Alex",
- "uncompressed"
-};
-
-LIBVD_EXTERN(raw)
-
-// to set/get/query special features/parameters
-static int control(sh_video_t *sh,int cmd,void* arg,...){
- int format = sh->bih ? sh->bih->biCompression : sh->format;
- switch(cmd){
- case VDCTRL_QUERY_FORMAT:
- if (*(int *)arg == format) return CONTROL_TRUE;
- if (*(int *)arg == IMGFMT_YUY2 && format == MKTAG('y', 'u', 'v', '2')) return CONTROL_TRUE;
- return CONTROL_FALSE;
- }
- return CONTROL_UNKNOWN;
-}
-
-// init driver
-static int init(sh_video_t *sh){
- // set format fourcc for raw RGB:
- if(sh->bih && sh->bih->biCompression==0){ // set based on bit depth
- switch(sh->bih->biBitCount){
- case 1: sh->bih->biCompression=IMGFMT_BGR1; break;
- case 4: sh->bih->biCompression=IMGFMT_BGR4; break;
- case 8: sh->bih->biCompression=IMGFMT_BGR8; break;
- case 15: sh->bih->biCompression=IMGFMT_BGR15; break;
- // workaround bitcount==16 => bgr15 case for avi files:
- case 16: sh->bih->biCompression=(sh->format)?IMGFMT_BGR16:IMGFMT_BGR15; break;
- case 24: sh->bih->biCompression=IMGFMT_BGR24; break;
- case 32: sh->bih->biCompression=IMGFMT_BGR32; break;
- default:
- mp_msg(MSGT_DECVIDEO,MSGL_WARN,"RAW: depth %d not supported\n",sh->bih->biBitCount);
- }
- }
- return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,sh->bih ? sh->bih->biCompression : sh->format);
-}
-
-// uninit driver
-static void uninit(sh_video_t *sh){
-}
-
-//mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h);
-
-// decode a frame
-static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
- mp_image_t* mpi;
- int frame_size;
- int format = sh->bih ? sh->bih->biCompression : sh->format;
-
- if(len<=0) return NULL; // skipped frame
-
- mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0,
- sh->disp_w, sh->disp_h);
- if(!mpi) return NULL;
-
- if(mpi->flags&MP_IMGFLAG_PLANAR){
- // TODO !!!
- mpi->planes[0]=data;
- mpi->stride[0]=mpi->width;
- frame_size=mpi->stride[0]*mpi->h;
- if((mpi->imgfmt == IMGFMT_NV12) || (mpi->imgfmt == IMGFMT_NV21))
- {
- mpi->planes[1]=mpi->planes[0]+mpi->width*mpi->height;
- mpi->stride[1]=mpi->chroma_width;
- frame_size+=mpi->chroma_width*mpi->chroma_height;
- } else if(mpi->flags&MP_IMGFLAG_YUV) {
- int cb=2, cr=1;
- if(mpi->flags&MP_IMGFLAG_SWAPPED) {
- cb=1; cr=2;
- }
- // Support for some common Planar YUV formats
- /* YV12,I420,IYUV */
- mpi->planes[cb]=mpi->planes[0]+mpi->width*mpi->height;
- mpi->stride[cb]=mpi->chroma_width;
- mpi->planes[cr]=mpi->planes[cb]+mpi->chroma_width*mpi->chroma_height;
- mpi->stride[cr]=mpi->chroma_width;
- frame_size+=2*mpi->chroma_width*mpi->chroma_height;
- }
- } else {
- mpi->planes[0]=data;
- mpi->stride[0]=mpi->width*(mpi->bpp/8);
- // .AVI files has uncompressed lines 4-byte aligned:
- if(sh->format==0 || sh->format==3) mpi->stride[0]=(mpi->stride[0]+3)&(~3);
- if(mpi->imgfmt==IMGFMT_RGB8 || mpi->imgfmt==IMGFMT_BGR8){
- // export palette:
- mpi->planes[1]=sh->bih ? (unsigned char*)(sh->bih+1) : NULL;
-#if 0
- printf("Exporting palette: %p !!\n",mpi->planes[1]);
- { unsigned char* p=mpi->planes[1];
- int i;
- for(i=0;i<64;i++) printf("%3d: %02X %02X %02X (%02X)\n",i,p[4*i],p[4*i+1],p[4*i+2],p[4*i+3]);
- }
-#endif
- }
- frame_size=mpi->stride[0]*mpi->h;
- if (len >= frame_size && format == MKTAG('y', 'u', 'v', '2')) {
- int i;
- for (i = 1; i < frame_size; i += 2)
- mpi->planes[0][i] ^= 128;
- }
- if(mpi->bpp<8) frame_size=frame_size*mpi->bpp/8;
- }
-
- if(len<frame_size){
- mp_msg(MSGT_DECVIDEO,MSGL_WARN,"Frame too small! (%d<%d) Wrong format?\n",
- len,frame_size);
- return NULL;
- }
-
- return mpi;
-}
diff --git a/libmpdemux/mp3_hdr.c b/libmpdemux/mp3_hdr.c
deleted file mode 100644
index ac2d0876e1..0000000000
--- a/libmpdemux/mp3_hdr.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdint.h>
-
-#include "config.h"
-#include "mp3_hdr.h"
-#include "mp_msg.h"
-
-//----------------------- mp3 audio frame header parser -----------------------
-
-static const uint16_t tabsel_123[2][3][16] = {
- { {0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,0},
- {0,32,48,56, 64, 80, 96,112,128,160,192,224,256,320,384,0},
- {0,32,40,48, 56, 64, 80, 96,112,128,160,192,224,256,320,0} },
-
- { {0,32,48,56,64,80,96,112,128,144,160,176,192,224,256,0},
- {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,0},
- {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,0} }
-};
-
-static const int freqs[9] = { 44100, 48000, 32000, // MPEG 1.0
- 22050, 24000, 16000, // MPEG 2.0
- 11025, 12000, 8000}; // MPEG 2.5
-
-/*
- * return frame size or -1 (bad frame)
- */
-int mp_get_mp3_header(unsigned char* hbuf,int* chans, int* srate, int* spf, int* mpa_layer, int* br){
- int stereo,lsf,framesize,padding,bitrate_index,sampling_frequency, divisor;
- int bitrate;
- int layer;
- static const int mult[3] = { 12000, 144000, 144000 };
- uint32_t newhead =
- hbuf[0] << 24 |
- hbuf[1] << 16 |
- hbuf[2] << 8 |
- hbuf[3];
-
- // head_check:
- if( (newhead & 0xffe00000) != 0xffe00000 ){
- mp_msg(MSGT_DEMUXER,MSGL_DBG2,"head_check failed\n");
- return -1;
- }
-
- layer = 4-((newhead>>17)&3);
- if(layer==4){
- mp_msg(MSGT_DEMUXER,MSGL_DBG2,"not layer-1/2/3\n");
- return -1;
- }
-
- sampling_frequency = (newhead>>10)&0x3; // valid: 0..2
- if(sampling_frequency==3){
- mp_msg(MSGT_DEMUXER,MSGL_DBG2,"invalid sampling_frequency\n");
- return -1;
- }
-
- if( newhead & (1<<20) ) {
- // MPEG 1.0 (lsf==0) or MPEG 2.0 (lsf==1)
- lsf = !(newhead & (1<<19));
- sampling_frequency += lsf*3;
- } else {
- // MPEG 2.5
- lsf = 1;
- sampling_frequency += 6;
- }
-
- bitrate_index = (newhead>>12)&0xf; // valid: 1..14
- padding = (newhead>>9)&0x1;
-
- stereo = ( ((newhead>>6)&0x3) == 3) ? 1 : 2;
-
- bitrate = tabsel_123[lsf][layer-1][bitrate_index];
- framesize = bitrate * mult[layer-1];
-
- mp_msg(MSGT_DEMUXER,MSGL_DBG2,"FRAMESIZE: %d, layer: %d, bitrate: %d, mult: %d\n",
- framesize, layer, tabsel_123[lsf][layer-1][bitrate_index], mult[layer-1]);
- if(!framesize){
- mp_msg(MSGT_DEMUXER,MSGL_DBG2,"invalid framesize/bitrate_index\n");
- return -1;
- }
-
- divisor = layer == 3 ? (freqs[sampling_frequency] << lsf) : freqs[sampling_frequency];
- framesize /= divisor;
- framesize += padding;
- if(layer==1)
- framesize *= 4;
-
- if(srate)
- *srate = freqs[sampling_frequency];
- if(spf) {
- if(layer == 1)
- *spf = 384;
- else if(layer == 2)
- *spf = 1152;
- else if(sampling_frequency > 2) // not 1.0
- *spf = 576;
- else
- *spf = 1152;
- }
- if(mpa_layer) *mpa_layer = layer;
- if(chans) *chans = stereo;
- if(br) *br = bitrate;
-
- return framesize;
-}
diff --git a/libmpdemux/mp3_hdr.h b/libmpdemux/mp3_hdr.h
deleted file mode 100644
index a9b34ac12c..0000000000
--- a/libmpdemux/mp3_hdr.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef MPLAYER_MP3_HDR_H
-#define MPLAYER_MP3_HDR_H
-
-#include <stddef.h>
-
-int mp_get_mp3_header(unsigned char* hbuf,int* chans, int* freq, int* spf, int* mpa_layer, int* br);
-
-#define mp_decode_mp3_header(hbuf) mp_get_mp3_header(hbuf,NULL,NULL,NULL,NULL,NULL)
-
-static inline int mp_check_mp3_header(unsigned int head){
- unsigned char tmp[4] = {head >> 24, head >> 16, head >> 8, head};
- if( (head & 0xffe00000) != 0xffe00000 ||
- (head & 0x00000c00) == 0x00000c00) return 0;
- if(mp_decode_mp3_header(tmp)<=0) return 0;
- return 1;
-}
-
-#endif /* MPLAYER_MP3_HDR_H */
diff --git a/libmpdemux/qtpalette.h b/libmpdemux/qtpalette.h
deleted file mode 100644
index 53de03bd9a..0000000000
--- a/libmpdemux/qtpalette.h
+++ /dev/null
@@ -1,589 +0,0 @@
-/*
- * default palettes for QuickTime files
- * Automatically generated from a utility derived from XAnim:
- * http://xanim.va.pubnix.com/home.html
- *
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef MPLAYER_QTPALETTE_H
-#define MPLAYER_QTPALETTE_H
-
-static const unsigned char qt_default_palette_4[4 * 4] = {
- 0x5E, 0x65, 0x93, 0x00,
- 0xFF, 0xFF, 0xFF, 0x00,
- 0xAB, 0xD0, 0xDF, 0x00,
- 0x00, 0x00, 0x00, 0x00
-};
-
-static const unsigned char qt_default_palette_16[16 * 4] = {
- 0xFF, 0xFB, 0xFF, 0x00,
- 0xBB, 0xD9, 0xEF, 0x00,
- 0xB1, 0xC9, 0xE8, 0x00,
- 0x5E, 0x65, 0x93, 0x00,
- 0xE8, 0xDE, 0xFC, 0x00,
- 0x91, 0x88, 0x9D, 0x00,
- 0xFF, 0xFF, 0xFF, 0x00,
- 0xFF, 0xFF, 0xFF, 0x00,
- 0xFF, 0xFF, 0xFF, 0x00,
- 0x37, 0x48, 0x47, 0x00,
- 0x55, 0x5E, 0x7A, 0x00,
- 0xAB, 0xD0, 0xDF, 0x00,
- 0xF9, 0xFB, 0xFF, 0x00,
- 0xC5, 0xCA, 0xE8, 0x00,
- 0x77, 0x7C, 0x8A, 0x00,
- 0x00, 0x00, 0x00, 0x00
-};
-
-static const unsigned char qt_default_palette_256[256 * 4] = {
- /* 0, 0x00 */ 0xFF, 0xFF, 0xFF, 0x00,
- /* 1, 0x01 */ 0xCC, 0xFF, 0xFF, 0x00,
- /* 2, 0x02 */ 0x99, 0xFF, 0xFF, 0x00,
- /* 3, 0x03 */ 0x66, 0xFF, 0xFF, 0x00,
- /* 4, 0x04 */ 0x33, 0xFF, 0xFF, 0x00,
- /* 5, 0x05 */ 0x00, 0xFF, 0xFF, 0x00,
- /* 6, 0x06 */ 0xFF, 0xCC, 0xFF, 0x00,
- /* 7, 0x07 */ 0xCC, 0xCC, 0xFF, 0x00,
- /* 8, 0x08 */ 0x99, 0xCC, 0xFF, 0x00,
- /* 9, 0x09 */ 0x66, 0xCC, 0xFF, 0x00,
- /* 10, 0x0A */ 0x33, 0xCC, 0xFF, 0x00,
- /* 11, 0x0B */ 0x00, 0xCC, 0xFF, 0x00,
- /* 12, 0x0C */ 0xFF, 0x99, 0xFF, 0x00,
- /* 13, 0x0D */ 0xCC, 0x99, 0xFF, 0x00,
- /* 14, 0x0E */ 0x99, 0x99, 0xFF, 0x00,
- /* 15, 0x0F */ 0x66, 0x99, 0xFF, 0x00,
- /* 16, 0x10 */ 0x33, 0x99, 0xFF, 0x00,
- /* 17, 0x11 */ 0x00, 0x99, 0xFF, 0x00,
- /* 18, 0x12 */ 0xFF, 0x66, 0xFF, 0x00,
- /* 19, 0x13 */ 0xCC, 0x66, 0xFF, 0x00,
- /* 20, 0x14 */ 0x99, 0x66, 0xFF, 0x00,
- /* 21, 0x15 */ 0x66, 0x66, 0xFF, 0x00,
- /* 22, 0x16 */ 0x33, 0x66, 0xFF, 0x00,
- /* 23, 0x17 */ 0x00, 0x66, 0xFF, 0x00,
- /* 24, 0x18 */ 0xFF, 0x33, 0xFF, 0x00,
- /* 25, 0x19 */ 0xCC, 0x33, 0xFF, 0x00,
- /* 26, 0x1A */ 0x99, 0x33, 0xFF, 0x00,
- /* 27, 0x1B */ 0x66, 0x33, 0xFF, 0x00,
- /* 28, 0x1C */ 0x33, 0x33, 0xFF, 0x00,
- /* 29, 0x1D */ 0x00, 0x33, 0xFF, 0x00,
- /* 30, 0x1E */ 0xFF, 0x00, 0xFF, 0x00,
- /* 31, 0x1F */ 0xCC, 0x00, 0xFF, 0x00,
- /* 32, 0x20 */ 0x99, 0x00, 0xFF, 0x00,
- /* 33, 0x21 */ 0x66, 0x00, 0xFF, 0x00,
- /* 34, 0x22 */ 0x33, 0x00, 0xFF, 0x00,
- /* 35, 0x23 */ 0x00, 0x00, 0xFF, 0x00,
- /* 36, 0x24 */ 0xFF, 0xFF, 0xCC, 0x00,
- /* 37, 0x25 */ 0xCC, 0xFF, 0xCC, 0x00,
- /* 38, 0x26 */ 0x99, 0xFF, 0xCC, 0x00,
- /* 39, 0x27 */ 0x66, 0xFF, 0xCC, 0x00,
- /* 40, 0x28 */ 0x33, 0xFF, 0xCC, 0x00,
- /* 41, 0x29 */ 0x00, 0xFF, 0xCC, 0x00,
- /* 42, 0x2A */ 0xFF, 0xCC, 0xCC, 0x00,
- /* 43, 0x2B */ 0xCC, 0xCC, 0xCC, 0x00,
- /* 44, 0x2C */ 0x99, 0xCC, 0xCC, 0x00,
- /* 45, 0x2D */ 0x66, 0xCC, 0xCC, 0x00,
- /* 46, 0x2E */ 0x33, 0xCC, 0xCC, 0x00,
- /* 47, 0x2F */ 0x00, 0xCC, 0xCC, 0x00,
- /* 48, 0x30 */ 0xFF, 0x99, 0xCC, 0x00,
- /* 49, 0x31 */ 0xCC, 0x99, 0xCC, 0x00,
- /* 50, 0x32 */ 0x99, 0x99, 0xCC, 0x00,
- /* 51, 0x33 */ 0x66, 0x99, 0xCC, 0x00,
- /* 52, 0x34 */ 0x33, 0x99, 0xCC, 0x00,
- /* 53, 0x35 */ 0x00, 0x99, 0xCC, 0x00,
- /* 54, 0x36 */ 0xFF, 0x66, 0xCC, 0x00,
- /* 55, 0x37 */ 0xCC, 0x66, 0xCC, 0x00,
- /* 56, 0x38 */ 0x99, 0x66, 0xCC, 0x00,
- /* 57, 0x39 */ 0x66, 0x66, 0xCC, 0x00,
- /* 58, 0x3A */ 0x33, 0x66, 0xCC, 0x00,
- /* 59, 0x3B */ 0x00, 0x66, 0xCC, 0x00,
- /* 60, 0x3C */ 0xFF, 0x33, 0xCC, 0x00,
- /* 61, 0x3D */ 0xCC, 0x33, 0xCC, 0x00,
- /* 62, 0x3E */ 0x99, 0x33, 0xCC, 0x00,
- /* 63, 0x3F */ 0x66, 0x33, 0xCC, 0x00,
- /* 64, 0x40 */ 0x33, 0x33, 0xCC, 0x00,
- /* 65, 0x41 */ 0x00, 0x33, 0xCC, 0x00,
- /* 66, 0x42 */ 0xFF, 0x00, 0xCC, 0x00,
- /* 67, 0x43 */ 0xCC, 0x00, 0xCC, 0x00,
- /* 68, 0x44 */ 0x99, 0x00, 0xCC, 0x00,
- /* 69, 0x45 */ 0x66, 0x00, 0xCC, 0x00,
- /* 70, 0x46 */ 0x33, 0x00, 0xCC, 0x00,
- /* 71, 0x47 */ 0x00, 0x00, 0xCC, 0x00,
- /* 72, 0x48 */ 0xFF, 0xFF, 0x99, 0x00,
- /* 73, 0x49 */ 0xCC, 0xFF, 0x99, 0x00,
- /* 74, 0x4A */ 0x99, 0xFF, 0x99, 0x00,
- /* 75, 0x4B */ 0x66, 0xFF, 0x99, 0x00,
- /* 76, 0x4C */ 0x33, 0xFF, 0x99, 0x00,
- /* 77, 0x4D */ 0x00, 0xFF, 0x99, 0x00,
- /* 78, 0x4E */ 0xFF, 0xCC, 0x99, 0x00,
- /* 79, 0x4F */ 0xCC, 0xCC, 0x99, 0x00,
- /* 80, 0x50 */ 0x99, 0xCC, 0x99, 0x00,
- /* 81, 0x51 */ 0x66, 0xCC, 0x99, 0x00,
- /* 82, 0x52 */ 0x33, 0xCC, 0x99, 0x00,
- /* 83, 0x53 */ 0x00, 0xCC, 0x99, 0x00,
- /* 84, 0x54 */ 0xFF, 0x99, 0x99, 0x00,
- /* 85, 0x55 */ 0xCC, 0x99, 0x99, 0x00,
- /* 86, 0x56 */ 0x99, 0x99, 0x99, 0x00,
- /* 87, 0x57 */ 0x66, 0x99, 0x99, 0x00,
- /* 88, 0x58 */ 0x33, 0x99, 0x99, 0x00,
- /* 89, 0x59 */ 0x00, 0x99, 0x99, 0x00,
- /* 90, 0x5A */ 0xFF, 0x66, 0x99, 0x00,
- /* 91, 0x5B */ 0xCC, 0x66, 0x99, 0x00,
- /* 92, 0x5C */ 0x99, 0x66, 0x99, 0x00,
- /* 93, 0x5D */ 0x66, 0x66, 0x99, 0x00,
- /* 94, 0x5E */ 0x33, 0x66, 0x99, 0x00,
- /* 95, 0x5F */ 0x00, 0x66, 0x99, 0x00,
- /* 96, 0x60 */ 0xFF, 0x33, 0x99, 0x00,
- /* 97, 0x61 */ 0xCC, 0x33, 0x99, 0x00,
- /* 98, 0x62 */ 0x99, 0x33, 0x99, 0x00,
- /* 99, 0x63 */ 0x66, 0x33, 0x99, 0x00,
- /* 100, 0x64 */ 0x33, 0x33, 0x99, 0x00,
- /* 101, 0x65 */ 0x00, 0x33, 0x99, 0x00,
- /* 102, 0x66 */ 0xFF, 0x00, 0x99, 0x00,
- /* 103, 0x67 */ 0xCC, 0x00, 0x99, 0x00,
- /* 104, 0x68 */ 0x99, 0x00, 0x99, 0x00,
- /* 105, 0x69 */ 0x66, 0x00, 0x99, 0x00,
- /* 106, 0x6A */ 0x33, 0x00, 0x99, 0x00,
- /* 107, 0x6B */ 0x00, 0x00, 0x99, 0x00,
- /* 108, 0x6C */ 0xFF, 0xFF, 0x66, 0x00,
- /* 109, 0x6D */ 0xCC, 0xFF, 0x66, 0x00,
- /* 110, 0x6E */ 0x99, 0xFF, 0x66, 0x00,
- /* 111, 0x6F */ 0x66, 0xFF, 0x66, 0x00,
- /* 112, 0x70 */ 0x33, 0xFF, 0x66, 0x00,
- /* 113, 0x71 */ 0x00, 0xFF, 0x66, 0x00,
- /* 114, 0x72 */ 0xFF, 0xCC, 0x66, 0x00,
- /* 115, 0x73 */ 0xCC, 0xCC, 0x66, 0x00,
- /* 116, 0x74 */ 0x99, 0xCC, 0x66, 0x00,
- /* 117, 0x75 */ 0x66, 0xCC, 0x66, 0x00,
- /* 118, 0x76 */ 0x33, 0xCC, 0x66, 0x00,
- /* 119, 0x77 */ 0x00, 0xCC, 0x66, 0x00,
- /* 120, 0x78 */ 0xFF, 0x99, 0x66, 0x00,
- /* 121, 0x79 */ 0xCC, 0x99, 0x66, 0x00,
- /* 122, 0x7A */ 0x99, 0x99, 0x66, 0x00,
- /* 123, 0x7B */ 0x66, 0x99, 0x66, 0x00,
- /* 124, 0x7C */ 0x33, 0x99, 0x66, 0x00,
- /* 125, 0x7D */ 0x00, 0x99, 0x66, 0x00,
- /* 126, 0x7E */ 0xFF, 0x66, 0x66, 0x00,
- /* 127, 0x7F */ 0xCC, 0x66, 0x66, 0x00,
- /* 128, 0x80 */ 0x99, 0x66, 0x66, 0x00,
- /* 129, 0x81 */ 0x66, 0x66, 0x66, 0x00,
- /* 130, 0x82 */ 0x33, 0x66, 0x66, 0x00,
- /* 131, 0x83 */ 0x00, 0x66, 0x66, 0x00,
- /* 132, 0x84 */ 0xFF, 0x33, 0x66, 0x00,
- /* 133, 0x85 */ 0xCC, 0x33, 0x66, 0x00,
- /* 134, 0x86 */ 0x99, 0x33, 0x66, 0x00,
- /* 135, 0x87 */ 0x66, 0x33, 0x66, 0x00,
- /* 136, 0x88 */ 0x33, 0x33, 0x66, 0x00,
- /* 137, 0x89 */ 0x00, 0x33, 0x66, 0x00,
- /* 138, 0x8A */ 0xFF, 0x00, 0x66, 0x00,
- /* 139, 0x8B */ 0xCC, 0x00, 0x66, 0x00,
- /* 140, 0x8C */ 0x99, 0x00, 0x66, 0x00,
- /* 141, 0x8D */ 0x66, 0x00, 0x66, 0x00,
- /* 142, 0x8E */ 0x33, 0x00, 0x66, 0x00,
- /* 143, 0x8F */ 0x00, 0x00, 0x66, 0x00,
- /* 144, 0x90 */ 0xFF, 0xFF, 0x33, 0x00,
- /* 145, 0x91 */ 0xCC, 0xFF, 0x33, 0x00,
- /* 146, 0x92 */ 0x99, 0xFF, 0x33, 0x00,
- /* 147, 0x93 */ 0x66, 0xFF, 0x33, 0x00,
- /* 148, 0x94 */ 0x33, 0xFF, 0x33, 0x00,
- /* 149, 0x95 */ 0x00, 0xFF, 0x33, 0x00,
- /* 150, 0x96 */ 0xFF, 0xCC, 0x33, 0x00,
- /* 151, 0x97 */ 0xCC, 0xCC, 0x33, 0x00,
- /* 152, 0x98 */ 0x99, 0xCC, 0x33, 0x00,
- /* 153, 0x99 */ 0x66, 0xCC, 0x33, 0x00,
- /* 154, 0x9A */ 0x33, 0xCC, 0x33, 0x00,
- /* 155, 0x9B */ 0x00, 0xCC, 0x33, 0x00,
- /* 156, 0x9C */ 0xFF, 0x99, 0x33, 0x00,
- /* 157, 0x9D */ 0xCC, 0x99, 0x33, 0x00,
- /* 158, 0x9E */ 0x99, 0x99, 0x33, 0x00,
- /* 159, 0x9F */ 0x66, 0x99, 0x33, 0x00,
- /* 160, 0xA0 */ 0x33, 0x99, 0x33, 0x00,
- /* 161, 0xA1 */ 0x00, 0x99, 0x33, 0x00,
- /* 162, 0xA2 */ 0xFF, 0x66, 0x33, 0x00,
- /* 163, 0xA3 */ 0xCC, 0x66, 0x33, 0x00,
- /* 164, 0xA4 */ 0x99, 0x66, 0x33, 0x00,
- /* 165, 0xA5 */ 0x66, 0x66, 0x33, 0x00,
- /* 166, 0xA6 */ 0x33, 0x66, 0x33, 0x00,
- /* 167, 0xA7 */ 0x00, 0x66, 0x33, 0x00,
- /* 168, 0xA8 */ 0xFF, 0x33, 0x33, 0x00,
- /* 169, 0xA9 */ 0xCC, 0x33, 0x33, 0x00,
- /* 170, 0xAA */ 0x99, 0x33, 0x33, 0x00,
- /* 171, 0xAB */ 0x66, 0x33, 0x33, 0x00,
- /* 172, 0xAC */ 0x33, 0x33, 0x33, 0x00,
- /* 173, 0xAD */ 0x00, 0x33, 0x33, 0x00,
- /* 174, 0xAE */ 0xFF, 0x00, 0x33, 0x00,
- /* 175, 0xAF */ 0xCC, 0x00, 0x33, 0x00,
- /* 176, 0xB0 */ 0x99, 0x00, 0x33, 0x00,
- /* 177, 0xB1 */ 0x66, 0x00, 0x33, 0x00,
- /* 178, 0xB2 */ 0x33, 0x00, 0x33, 0x00,
- /* 179, 0xB3 */ 0x00, 0x00, 0x33, 0x00,
- /* 180, 0xB4 */ 0xFF, 0xFF, 0x00, 0x00,
- /* 181, 0xB5 */ 0xCC, 0xFF, 0x00, 0x00,
- /* 182, 0xB6 */ 0x99, 0xFF, 0x00, 0x00,
- /* 183, 0xB7 */ 0x66, 0xFF, 0x00, 0x00,
- /* 184, 0xB8 */ 0x33, 0xFF, 0x00, 0x00,
- /* 185, 0xB9 */ 0x00, 0xFF, 0x00, 0x00,
- /* 186, 0xBA */ 0xFF, 0xCC, 0x00, 0x00,
- /* 187, 0xBB */ 0xCC, 0xCC, 0x00, 0x00,
- /* 188, 0xBC */ 0x99, 0xCC, 0x00, 0x00,
- /* 189, 0xBD */ 0x66, 0xCC, 0x00, 0x00,
- /* 190, 0xBE */ 0x33, 0xCC, 0x00, 0x00,
- /* 191, 0xBF */ 0x00, 0xCC, 0x00, 0x00,
- /* 192, 0xC0 */ 0xFF, 0x99, 0x00, 0x00,
- /* 193, 0xC1 */ 0xCC, 0x99, 0x00, 0x00,
- /* 194, 0xC2 */ 0x99, 0x99, 0x00, 0x00,
- /* 195, 0xC3 */ 0x66, 0x99, 0x00, 0x00,
- /* 196, 0xC4 */ 0x33, 0x99, 0x00, 0x00,
- /* 197, 0xC5 */ 0x00, 0x99, 0x00, 0x00,
- /* 198, 0xC6 */ 0xFF, 0x66, 0x00, 0x00,
- /* 199, 0xC7 */ 0xCC, 0x66, 0x00, 0x00,
- /* 200, 0xC8 */ 0x99, 0x66, 0x00, 0x00,
- /* 201, 0xC9 */ 0x66, 0x66, 0x00, 0x00,
- /* 202, 0xCA */ 0x33, 0x66, 0x00, 0x00,
- /* 203, 0xCB */ 0x00, 0x66, 0x00, 0x00,
- /* 204, 0xCC */ 0xFF, 0x33, 0x00, 0x00,
- /* 205, 0xCD */ 0xCC, 0x33, 0x00, 0x00,
- /* 206, 0xCE */ 0x99, 0x33, 0x00, 0x00,
- /* 207, 0xCF */ 0x66, 0x33, 0x00, 0x00,
- /* 208, 0xD0 */ 0x33, 0x33, 0x00, 0x00,
- /* 209, 0xD1 */ 0x00, 0x33, 0x00, 0x00,
- /* 210, 0xD2 */ 0xFF, 0x00, 0x00, 0x00,
- /* 211, 0xD3 */ 0xCC, 0x00, 0x00, 0x00,
- /* 212, 0xD4 */ 0x99, 0x00, 0x00, 0x00,
- /* 213, 0xD5 */ 0x66, 0x00, 0x00, 0x00,
- /* 214, 0xD6 */ 0x33, 0x00, 0x00, 0x00,
- /* 215, 0xD7 */ 0x00, 0x00, 0xEE, 0x00,
- /* 216, 0xD8 */ 0x00, 0x00, 0xDD, 0x00,
- /* 217, 0xD9 */ 0x00, 0x00, 0xBB, 0x00,
- /* 218, 0xDA */ 0x00, 0x00, 0xAA, 0x00,
- /* 219, 0xDB */ 0x00, 0x00, 0x88, 0x00,
- /* 220, 0xDC */ 0x00, 0x00, 0x77, 0x00,
- /* 221, 0xDD */ 0x00, 0x00, 0x55, 0x00,
- /* 222, 0xDE */ 0x00, 0x00, 0x44, 0x00,
- /* 223, 0xDF */ 0x00, 0x00, 0x22, 0x00,
- /* 224, 0xE0 */ 0x00, 0x00, 0x11, 0x00,
- /* 225, 0xE1 */ 0x00, 0xEE, 0x00, 0x00,
- /* 226, 0xE2 */ 0x00, 0xDD, 0x00, 0x00,
- /* 227, 0xE3 */ 0x00, 0xBB, 0x00, 0x00,
- /* 228, 0xE4 */ 0x00, 0xAA, 0x00, 0x00,
- /* 229, 0xE5 */ 0x00, 0x88, 0x00, 0x00,
- /* 230, 0xE6 */ 0x00, 0x77, 0x00, 0x00,
- /* 231, 0xE7 */ 0x00, 0x55, 0x00, 0x00,
- /* 232, 0xE8 */ 0x00, 0x44, 0x00, 0x00,
- /* 233, 0xE9 */ 0x00, 0x22, 0x00, 0x00,
- /* 234, 0xEA */ 0x00, 0x11, 0x00, 0x00,
- /* 235, 0xEB */ 0xEE, 0x00, 0x00, 0x00,
- /* 236, 0xEC */ 0xDD, 0x00, 0x00, 0x00,
- /* 237, 0xED */ 0xBB, 0x00, 0x00, 0x00,
- /* 238, 0xEE */ 0xAA, 0x00, 0x00, 0x00,
- /* 239, 0xEF */ 0x88, 0x00, 0x00, 0x00,
- /* 240, 0xF0 */ 0x77, 0x00, 0x00, 0x00,
- /* 241, 0xF1 */ 0x55, 0x00, 0x00, 0x00,
- /* 242, 0xF2 */ 0x44, 0x00, 0x00, 0x00,
- /* 243, 0xF3 */ 0x22, 0x00, 0x00, 0x00,
- /* 244, 0xF4 */ 0x11, 0x00, 0x00, 0x00,
- /* 245, 0xF5 */ 0xEE, 0xEE, 0xEE, 0x00,
- /* 246, 0xF6 */ 0xDD, 0xDD, 0xDD, 0x00,
- /* 247, 0xF7 */ 0xBB, 0xBB, 0xBB, 0x00,
- /* 248, 0xF8 */ 0xAA, 0xAA, 0xAA, 0x00,
- /* 249, 0xF9 */ 0x88, 0x88, 0x88, 0x00,
- /* 250, 0xFA */ 0x77, 0x77, 0x77, 0x00,
- /* 251, 0xFB */ 0x55, 0x55, 0x55, 0x00,
- /* 252, 0xFC */ 0x44, 0x44, 0x44, 0x00,
- /* 253, 0xFD */ 0x22, 0x22, 0x22, 0x00,
- /* 254, 0xFE */ 0x11, 0x11, 0x11, 0x00,
- /* 255, 0xFF */ 0x00, 0x00, 0x00, 0x00
-};
-
-static const unsigned char qt_default_grayscale_palette_16[16 * 4] = {
- 0xFF, 0xFF, 0xFF, 0xFF,
- 0xEE, 0xEE, 0xEE, 0xEE,
- 0xDD, 0xDD, 0xDD, 0xDD,
- 0xCC, 0xCC, 0xCC, 0xCC,
- 0xBB, 0xBB, 0xBB, 0xBB,
- 0xAA, 0xAA, 0xAA, 0xAA,
- 0x99, 0x99, 0x99, 0x99,
- 0x88, 0x88, 0x88, 0x88,
- 0x77, 0x77, 0x77, 0x77,
- 0x66, 0x66, 0x66, 0x66,
- 0x55, 0x55, 0x55, 0x55,
- 0x44, 0x44, 0x44, 0x44,
- 0x33, 0x33, 0x33, 0x33,
- 0x22, 0x22, 0x22, 0x22,
- 0x11, 0x11, 0x11, 0x11,
- 0x00, 0x00, 0x00, 0x00
-};
-
-static const unsigned char qt_default_grayscale_palette_256[256 * 4] = {
- /* 0, 0x00 */ 0xFF, 0xFF, 0xFF, 0xFF,
- /* 1, 0x01 */ 0xFE, 0xFE, 0xFE, 0xFE,
- /* 2, 0x02 */ 0xFD, 0xFD, 0xFD, 0xFD,
- /* 3, 0x03 */ 0xFC, 0xFC, 0xFC, 0xFC,
- /* 4, 0x04 */ 0xFB, 0xFB, 0xFB, 0xFB,
- /* 5, 0x05 */ 0xFA, 0xFA, 0xFA, 0xFA,
- /* 6, 0x06 */ 0xF9, 0xF9, 0xF9, 0xF9,
- /* 7, 0x07 */ 0xF8, 0xF8, 0xF8, 0xF8,
- /* 8, 0x08 */ 0xF7, 0xF7, 0xF7, 0xF7,
- /* 9, 0x09 */ 0xF6, 0xF6, 0xF6, 0xF6,
- /* 10, 0x0A */ 0xF5, 0xF5, 0xF5, 0xF5,
- /* 11, 0x0B */ 0xF4, 0xF4, 0xF4, 0xF4,
- /* 12, 0x0C */ 0xF3, 0xF3, 0xF3, 0xF3,
- /* 13, 0x0D */ 0xF2, 0xF2, 0xF2, 0xF2,
- /* 14, 0x0E */ 0xF1, 0xF1, 0xF1, 0xF1,
- /* 15, 0x0F */ 0xF0, 0xF0, 0xF0, 0xF0,
- /* 16, 0x10 */ 0xEF, 0xEF, 0xEF, 0xEF,
- /* 17, 0x11 */ 0xEE, 0xEE, 0xEE, 0xEE,
- /* 18, 0x12 */ 0xED, 0xED, 0xED, 0xED,
- /* 19, 0x13 */ 0xEC, 0xEC, 0xEC, 0xEC,
- /* 20, 0x14 */ 0xEB, 0xEB, 0xEB, 0xEB,
- /* 21, 0x15 */ 0xEA, 0xEA, 0xEA, 0xEA,
- /* 22, 0x16 */ 0xE9, 0xE9, 0xE9, 0xE9,
- /* 23, 0x17 */ 0xE8, 0xE8, 0xE8, 0xE8,
- /* 24, 0x18 */ 0xE7, 0xE7, 0xE7, 0xE7,
- /* 25, 0x19 */ 0xE6, 0xE6, 0xE6, 0xE6,
- /* 26, 0x1A */ 0xE5, 0xE5, 0xE5, 0xE5,
- /* 27, 0x1B */ 0xE4, 0xE4, 0xE4, 0xE4,
- /* 28, 0x1C */ 0xE3, 0xE3, 0xE3, 0xE3,
- /* 29, 0x1D */ 0xE2, 0xE2, 0xE2, 0xE2,
- /* 30, 0x1E */ 0xE1, 0xE1, 0xE1, 0xE1,
- /* 31, 0x1F */ 0xE0, 0xE0, 0xE0, 0xE0,
- /* 32, 0x20 */ 0xDF, 0xDF, 0xDF, 0xDF,
- /* 33, 0x21 */ 0xDE, 0xDE, 0xDE, 0xDE,
- /* 34, 0x22 */ 0xDD, 0xDD, 0xDD, 0xDD,
- /* 35, 0x23 */ 0xDC, 0xDC, 0xDC, 0xDC,
- /* 36, 0x24 */ 0xDB, 0xDB, 0xDB, 0xDB,
- /* 37, 0x25 */ 0xDA, 0xDA, 0xDA, 0xDA,
- /* 38, 0x26 */ 0xD9, 0xD9, 0xD9, 0xD9,
- /* 39, 0x27 */ 0xD8, 0xD8, 0xD8, 0xD8,
- /* 40, 0x28 */ 0xD7, 0xD7, 0xD7, 0xD7,
- /* 41, 0x29 */ 0xD6, 0xD6, 0xD6, 0xD6,
- /* 42, 0x2A */ 0xD5, 0xD5, 0xD5, 0xD5,
- /* 43, 0x2B */ 0xD4, 0xD4, 0xD4, 0xD4,
- /* 44, 0x2C */ 0xD3, 0xD3, 0xD3, 0xD3,
- /* 45, 0x2D */ 0xD2, 0xD2, 0xD2, 0xD2,
- /* 46, 0x2E */ 0xD1, 0xD1, 0xD1, 0xD1,
- /* 47, 0x2F */ 0xD0, 0xD0, 0xD0, 0xD0,
- /* 48, 0x30 */ 0xCF, 0xCF, 0xCF, 0xCF,
- /* 49, 0x31 */ 0xCE, 0xCE, 0xCE, 0xCE,
- /* 50, 0x32 */ 0xCD, 0xCD, 0xCD, 0xCD,
- /* 51, 0x33 */ 0xCC, 0xCC, 0xCC, 0xCC,
- /* 52, 0x34 */ 0xCB, 0xCB, 0xCB, 0xCB,
- /* 53, 0x35 */ 0xCA, 0xCA, 0xCA, 0xCA,
- /* 54, 0x36 */ 0xC9, 0xC9, 0xC9, 0xC9,
- /* 55, 0x37 */ 0xC8, 0xC8, 0xC8, 0xC8,
- /* 56, 0x38 */ 0xC7, 0xC7, 0xC7, 0xC7,
- /* 57, 0x39 */ 0xC6, 0xC6, 0xC6, 0xC6,
- /* 58, 0x3A */ 0xC5, 0xC5, 0xC5, 0xC5,
- /* 59, 0x3B */ 0xC4, 0xC4, 0xC4, 0xC4,
- /* 60, 0x3C */ 0xC3, 0xC3, 0xC3, 0xC3,
- /* 61, 0x3D */ 0xC2, 0xC2, 0xC2, 0xC2,
- /* 62, 0x3E */ 0xC1, 0xC1, 0xC1, 0xC1,
- /* 63, 0x3F */ 0xC0, 0xC0, 0xC0, 0xC0,
- /* 64, 0x40 */ 0xBF, 0xBF, 0xBF, 0xBF,
- /* 65, 0x41 */ 0xBE, 0xBE, 0xBE, 0xBE,
- /* 66, 0x42 */ 0xBD, 0xBD, 0xBD, 0xBD,
- /* 67, 0x43 */ 0xBC, 0xBC, 0xBC, 0xBC,
- /* 68, 0x44 */ 0xBB, 0xBB, 0xBB, 0xBB,
- /* 69, 0x45 */ 0xBA, 0xBA, 0xBA, 0xBA,
- /* 70, 0x46 */ 0xB9, 0xB9, 0xB9, 0xB9,
- /* 71, 0x47 */ 0xB8, 0xB8, 0xB8, 0xB8,
- /* 72, 0x48 */ 0xB7, 0xB7, 0xB7, 0xB7,
- /* 73, 0x49 */ 0xB6, 0xB6, 0xB6, 0xB6,
- /* 74, 0x4A */ 0xB5, 0xB5, 0xB5, 0xB5,
- /* 75, 0x4B */ 0xB4, 0xB4, 0xB4, 0xB4,
- /* 76, 0x4C */ 0xB3, 0xB3, 0xB3, 0xB3,
- /* 77, 0x4D */ 0xB2, 0xB2, 0xB2, 0xB2,
- /* 78, 0x4E */ 0xB1, 0xB1, 0xB1, 0xB1,
- /* 79, 0x4F */ 0xB0, 0xB0, 0xB0, 0xB0,
- /* 80, 0x50 */ 0xAF, 0xAF, 0xAF, 0xAF,
- /* 81, 0x51 */ 0xAE, 0xAE, 0xAE, 0xAE,
- /* 82, 0x52 */ 0xAD, 0xAD, 0xAD, 0xAD,
- /* 83, 0x53 */ 0xAC, 0xAC, 0xAC, 0xAC,
- /* 84, 0x54 */ 0xAB, 0xAB, 0xAB, 0xAB,
- /* 85, 0x55 */ 0xAA, 0xAA, 0xAA, 0xAA,
- /* 86, 0x56 */ 0xA9, 0xA9, 0xA9, 0xA9,
- /* 87, 0x57 */ 0xA8, 0xA8, 0xA8, 0xA8,
- /* 88, 0x58 */ 0xA7, 0xA7, 0xA7, 0xA7,
- /* 89, 0x59 */ 0xA6, 0xA6, 0xA6, 0xA6,
- /* 90, 0x5A */ 0xA5, 0xA5, 0xA5, 0xA5,
- /* 91, 0x5B */ 0xA4, 0xA4, 0xA4, 0xA4,
- /* 92, 0x5C */ 0xA3, 0xA3, 0xA3, 0xA3,
- /* 93, 0x5D */ 0xA2, 0xA2, 0xA2, 0xA2,
- /* 94, 0x5E */ 0xA1, 0xA1, 0xA1, 0xA1,
- /* 95, 0x5F */ 0xA0, 0xA0, 0xA0, 0xA0,
- /* 96, 0x60 */ 0x9F, 0x9F, 0x9F, 0x9F,
- /* 97, 0x61 */ 0x9E, 0x9E, 0x9E, 0x9E,
- /* 98, 0x62 */ 0x9D, 0x9D, 0x9D, 0x9D,
- /* 99, 0x63 */ 0x9C, 0x9C, 0x9C, 0x9C,
- /* 100, 0x64 */ 0x9B, 0x9B, 0x9B, 0x9B,
- /* 101, 0x65 */ 0x9A, 0x9A, 0x9A, 0x9A,
- /* 102, 0x66 */ 0x99, 0x99, 0x99, 0x99,
- /* 103, 0x67 */ 0x98, 0x98, 0x98, 0x98,
- /* 104, 0x68 */ 0x97, 0x97, 0x97, 0x97,
- /* 105, 0x69 */ 0x96, 0x96, 0x96, 0x96,
- /* 106, 0x6A */ 0x95, 0x95, 0x95, 0x95,
- /* 107, 0x6B */ 0x94, 0x94, 0x94, 0x94,
- /* 108, 0x6C */ 0x93, 0x93, 0x93, 0x93,
- /* 109, 0x6D */ 0x92, 0x92, 0x92, 0x92,
- /* 110, 0x6E */ 0x91, 0x91, 0x91, 0x91,
- /* 111, 0x6F */ 0x90, 0x90, 0x90, 0x90,
- /* 112, 0x70 */ 0x8F, 0x8F, 0x8F, 0x8F,
- /* 113, 0x71 */ 0x8E, 0x8E, 0x8E, 0x8E,
- /* 114, 0x72 */ 0x8D, 0x8D, 0x8D, 0x8D,
- /* 115, 0x73 */ 0x8C, 0x8C, 0x8C, 0x8C,
- /* 116, 0x74 */ 0x8B, 0x8B, 0x8B, 0x8B,
- /* 117, 0x75 */ 0x8A, 0x8A, 0x8A, 0x8A,
- /* 118, 0x76 */ 0x89, 0x89, 0x89, 0x89,
- /* 119, 0x77 */ 0x88, 0x88, 0x88, 0x88,
- /* 120, 0x78 */ 0x87, 0x87, 0x87, 0x87,
- /* 121, 0x79 */ 0x86, 0x86, 0x86, 0x86,
- /* 122, 0x7A */ 0x85, 0x85, 0x85, 0x85,
- /* 123, 0x7B */ 0x84, 0x84, 0x84, 0x84,
- /* 124, 0x7C */ 0x83, 0x83, 0x83, 0x83,
- /* 125, 0x7D */ 0x82, 0x82, 0x82, 0x82,
- /* 126, 0x7E */ 0x81, 0x81, 0x81, 0x81,
- /* 127, 0x7F */ 0x80, 0x80, 0x80, 0x80,
- /* 128, 0x80 */ 0x7F, 0x7F, 0x7F, 0x7F,
- /* 129, 0x81 */ 0x7E, 0x7E, 0x7E, 0x7E,
- /* 130, 0x82 */ 0x7D, 0x7D, 0x7D, 0x7D,
- /* 131, 0x83 */ 0x7C, 0x7C, 0x7C, 0x7C,
- /* 132, 0x84 */ 0x7B, 0x7B, 0x7B, 0x7B,
- /* 133, 0x85 */ 0x7A, 0x7A, 0x7A, 0x7A,
- /* 134, 0x86 */ 0x79, 0x79, 0x79, 0x79,
- /* 135, 0x87 */ 0x78, 0x78, 0x78, 0x78,
- /* 136, 0x88 */ 0x77, 0x77, 0x77, 0x77,
- /* 137, 0x89 */ 0x76, 0x76, 0x76, 0x76,
- /* 138, 0x8A */ 0x75, 0x75, 0x75, 0x75,
- /* 139, 0x8B */ 0x74, 0x74, 0x74, 0x74,
- /* 140, 0x8C */ 0x73, 0x73, 0x73, 0x73,
- /* 141, 0x8D */ 0x72, 0x72, 0x72, 0x72,
- /* 142, 0x8E */ 0x71, 0x71, 0x71, 0x71,
- /* 143, 0x8F */ 0x70, 0x70, 0x70, 0x70,
- /* 144, 0x90 */ 0x6F, 0x6F, 0x6F, 0x6F,
- /* 145, 0x91 */ 0x6E, 0x6E, 0x6E, 0x6E,
- /* 146, 0x92 */ 0x6D, 0x6D, 0x6D, 0x6D,
- /* 147, 0x93 */ 0x6C, 0x6C, 0x6C, 0x6C,
- /* 148, 0x94 */ 0x6B, 0x6B, 0x6B, 0x6B,
- /* 149, 0x95 */ 0x6A, 0x6A, 0x6A, 0x6A,
- /* 150, 0x96 */ 0x69, 0x69, 0x69, 0x69,
- /* 151, 0x97 */ 0x68, 0x68, 0x68, 0x68,
- /* 152, 0x98 */ 0x67, 0x67, 0x67, 0x67,
- /* 153, 0x99 */ 0x66, 0x66, 0x66, 0x66,
- /* 154, 0x9A */ 0x65, 0x65, 0x65, 0x65,
- /* 155, 0x9B */ 0x64, 0x64, 0x64, 0x64,
- /* 156, 0x9C */ 0x63, 0x63, 0x63, 0x63,
- /* 157, 0x9D */ 0x62, 0x62, 0x62, 0x62,
- /* 158, 0x9E */ 0x61, 0x61, 0x61, 0x61,
- /* 159, 0x9F */ 0x60, 0x60, 0x60, 0x60,
- /* 160, 0xA0 */ 0x5F, 0x5F, 0x5F, 0x5F,
- /* 161, 0xA1 */ 0x5E, 0x5E, 0x5E, 0x5E,
- /* 162, 0xA2 */ 0x5D, 0x5D, 0x5D, 0x5D,
- /* 163, 0xA3 */ 0x5C, 0x5C, 0x5C, 0x5C,
- /* 164, 0xA4 */ 0x5B, 0x5B, 0x5B, 0x5B,
- /* 165, 0xA5 */ 0x5A, 0x5A, 0x5A, 0x5A,
- /* 166, 0xA6 */ 0x59, 0x59, 0x59, 0x59,
- /* 167, 0xA7 */ 0x58, 0x58, 0x58, 0x58,
- /* 168, 0xA8 */ 0x57, 0x57, 0x57, 0x57,
- /* 169, 0xA9 */ 0x56, 0x56, 0x56, 0x56,
- /* 170, 0xAA */ 0x55, 0x55, 0x55, 0x55,
- /* 171, 0xAB */ 0x54, 0x54, 0x54, 0x54,
- /* 172, 0xAC */ 0x53, 0x53, 0x53, 0x53,
- /* 173, 0xAD */ 0x52, 0x52, 0x52, 0x52,
- /* 174, 0xAE */ 0x51, 0x51, 0x51, 0x51,
- /* 175, 0xAF */ 0x50, 0x50, 0x50, 0x50,
- /* 176, 0xB0 */ 0x4F, 0x4F, 0x4F, 0x4F,
- /* 177, 0xB1 */ 0x4E, 0x4E, 0x4E, 0x4E,
- /* 178, 0xB2 */ 0x4D, 0x4D, 0x4D, 0x4D,
- /* 179, 0xB3 */ 0x4C, 0x4C, 0x4C, 0x4C,
- /* 180, 0xB4 */ 0x4B, 0x4B, 0x4B, 0x4B,
- /* 181, 0xB5 */ 0x4A, 0x4A, 0x4A, 0x4A,
- /* 182, 0xB6 */ 0x49, 0x49, 0x49, 0x49,
- /* 183, 0xB7 */ 0x48, 0x48, 0x48, 0x48,
- /* 184, 0xB8 */ 0x47, 0x47, 0x47, 0x47,
- /* 185, 0xB9 */ 0x46, 0x46, 0x46, 0x46,
- /* 186, 0xBA */ 0x45, 0x45, 0x45, 0x45,
- /* 187, 0xBB */ 0x44, 0x44, 0x44, 0x44,
- /* 188, 0xBC */ 0x43, 0x43, 0x43, 0x43,
- /* 189, 0xBD */ 0x42, 0x42, 0x42, 0x42,
- /* 190, 0xBE */ 0x41, 0x41, 0x41, 0x41,
- /* 191, 0xBF */ 0x40, 0x40, 0x40, 0x40,
- /* 192, 0xC0 */ 0x3F, 0x3F, 0x3F, 0x3F,
- /* 193, 0xC1 */ 0x3E, 0x3E, 0x3E, 0x3E,
- /* 194, 0xC2 */ 0x3D, 0x3D, 0x3D, 0x3D,
- /* 195, 0xC3 */ 0x3C, 0x3C, 0x3C, 0x3C,
- /* 196, 0xC4 */ 0x3B, 0x3B, 0x3B, 0x3B,
- /* 197, 0xC5 */ 0x3A, 0x3A, 0x3A, 0x3A,
- /* 198, 0xC6 */ 0x39, 0x39, 0x39, 0x39,
- /* 199, 0xC7 */ 0x38, 0x38, 0x38, 0x38,
- /* 200, 0xC8 */ 0x37, 0x37, 0x37, 0x37,
- /* 201, 0xC9 */ 0x36, 0x36, 0x36, 0x36,
- /* 202, 0xCA */ 0x35, 0x35, 0x35, 0x35,
- /* 203, 0xCB */ 0x34, 0x34, 0x34, 0x34,
- /* 204, 0xCC */ 0x33, 0x33, 0x33, 0x33,
- /* 205, 0xCD */ 0x32, 0x32, 0x32, 0x32,
- /* 206, 0xCE */ 0x31, 0x31, 0x31, 0x31,
- /* 207, 0xCF */ 0x30, 0x30, 0x30, 0x30,
- /* 208, 0xD0 */ 0x2F, 0x2F, 0x2F, 0x2F,
- /* 209, 0xD1 */ 0x2E, 0x2E, 0x2E, 0x2E,
- /* 210, 0xD2 */ 0x2D, 0x2D, 0x2D, 0x2D,
- /* 211, 0xD3 */ 0x2C, 0x2C, 0x2C, 0x2C,
- /* 212, 0xD4 */ 0x2B, 0x2B, 0x2B, 0x2B,
- /* 213, 0xD5 */ 0x2A, 0x2A, 0x2A, 0x2A,
- /* 214, 0xD6 */ 0x29, 0x29, 0x29, 0x29,
- /* 215, 0xD7 */ 0x28, 0x28, 0x28, 0x28,
- /* 216, 0xD8 */ 0x27, 0x27, 0x27, 0x27,
- /* 217, 0xD9 */ 0x26, 0x26, 0x26, 0x26,
- /* 218, 0xDA */ 0x25, 0x25, 0x25, 0x25,
- /* 219, 0xDB */ 0x24, 0x24, 0x24, 0x24,
- /* 220, 0xDC */ 0x23, 0x23, 0x23, 0x23,
- /* 221, 0xDD */ 0x22, 0x22, 0x22, 0x22,
- /* 222, 0xDE */ 0x21, 0x21, 0x21, 0x21,
- /* 223, 0xDF */ 0x20, 0x20, 0x20, 0x20,
- /* 224, 0xE0 */ 0x1F, 0x1F, 0x1F, 0x1F,
- /* 225, 0xE1 */ 0x1E, 0x1E, 0x1E, 0x1E,
- /* 226, 0xE2 */ 0x1D, 0x1D, 0x1D, 0x1D,
- /* 227, 0xE3 */ 0x1C, 0x1C, 0x1C, 0x1C,
- /* 228, 0xE4 */ 0x1B, 0x1B, 0x1B, 0x1B,
- /* 229, 0xE5 */ 0x1A, 0x1A, 0x1A, 0x1A,
- /* 230, 0xE6 */ 0x19, 0x19, 0x19, 0x19,
- /* 231, 0xE7 */ 0x18, 0x18, 0x18, 0x18,
- /* 232, 0xE8 */ 0x17, 0x17, 0x17, 0x17,
- /* 233, 0xE9 */ 0x16, 0x16, 0x16, 0x16,
- /* 234, 0xEA */ 0x15, 0x15, 0x15, 0x15,
- /* 235, 0xEB */ 0x14, 0x14, 0x14, 0x14,
- /* 236, 0xEC */ 0x13, 0x13, 0x13, 0x13,
- /* 237, 0xED */ 0x12, 0x12, 0x12, 0x12,
- /* 238, 0xEE */ 0x11, 0x11, 0x11, 0x11,
- /* 239, 0xEF */ 0x10, 0x10, 0x10, 0x10,
- /* 240, 0xF0 */ 0x0F, 0x0F, 0x0F, 0x0F,
- /* 241, 0xF1 */ 0x0E, 0x0E, 0x0E, 0x0E,
- /* 242, 0xF2 */ 0x0D, 0x0D, 0x0D, 0x0D,
- /* 243, 0xF3 */ 0x0C, 0x0C, 0x0C, 0x0C,
- /* 244, 0xF4 */ 0x0B, 0x0B, 0x0B, 0x0B,
- /* 245, 0xF5 */ 0x0A, 0x0A, 0x0A, 0x0A,
- /* 246, 0xF6 */ 0x09, 0x09, 0x09, 0x09,
- /* 247, 0xF7 */ 0x08, 0x08, 0x08, 0x08,
- /* 248, 0xF8 */ 0x07, 0x07, 0x07, 0x07,
- /* 249, 0xF9 */ 0x06, 0x06, 0x06, 0x06,
- /* 250, 0xFA */ 0x05, 0x05, 0x05, 0x05,
- /* 251, 0xFB */ 0x04, 0x04, 0x04, 0x04,
- /* 252, 0xFC */ 0x03, 0x03, 0x03, 0x03,
- /* 253, 0xFD */ 0x02, 0x02, 0x02, 0x02,
- /* 254, 0xFE */ 0x01, 0x01, 0x01, 0x01,
- /* 255, 0xFF */ 0x00, 0x00, 0x00, 0x00
-};
-
-#endif /* MPLAYER_QTPALETTE_H */