Mercurial > mplayer.hg
changeset 33008:6ee39df47be0
Support CrystalHD decoding.
Patch by Philip Langdale, philipl overt org
author | cehoyos |
---|---|
date | Wed, 23 Mar 2011 08:35:45 +0000 |
parents | 027481d941c0 |
children | 3138b52fdd10 |
files | configure etc/codecs.conf libmpdemux/stheader.h |
diffstat | 3 files changed, 142 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/configure Tue Mar 22 11:44:26 2011 +0000 +++ b/configure Wed Mar 23 08:35:45 2011 +0000 @@ -431,6 +431,7 @@ --disable-libopencore_amrnb disable libopencore_amr narrowband [autodetect] --disable-libopencore_amrwb disable libopencore_amr wideband [autodetect] --disable-libopenjpeg disable OpenJPEG (JPEG2000) input/output support [autodetect] + --disable-crystalhd disable CrystalHD support [autodetect] --disable-decoder=DECODER disable specified FFmpeg decoder --enable-decoder=DECODER enable specified FFmpeg decoder --disable-encoder=ENCODER disable specified FFmpeg encoder @@ -634,8 +635,6 @@ libopenjpeg=auto libavdecoders_all=$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') libavdecoders=$(echo $libavdecoders_all | sed -e 's/ LIB[A-Z0-9_]*_DECODER//g') -# temporary hack until we have proper crystalhd support -libavdecoders=$(echo $libavdecoders | sed -e 's/[A-Z0-9]*_CRYSTALHD_DECODER//g') libavencoders_all=$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') libavencoders=$(echo $libavencoders_all | sed -e 's/ LIB[A-Z0-9_]*_ENCODER//g') libavparsers_all=$(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]') @@ -775,6 +774,7 @@ _dhahelper=no _svgalib_helper=no _joystick=no +crystalhd=auto _xvid=auto _xvid_lavc=auto _x264=auto @@ -1219,6 +1219,8 @@ --disable-svgalib_helper) _svgalib_helper=no ;; --enable-joystick) _joystick=yes ;; --disable-joystick) _joystick=no ;; + --enable-crystalhd) crystalhd=yes ;; + --disable-crystalhd) crystalhd=no ;; --enable-xvid) _xvid=yes ;; --disable-xvid) _xvid=no ;; --enable-xvid-lavc) _xvid_lavc=yes ;; @@ -6963,6 +6965,22 @@ fi echores "$_libdv" +echocheck "CrystalHD" +if test "$crystalhd" = auto ; then + crystalhd=no + statement_check_broken libcrystalhd/bc_dts_types.h libcrystalhd/libcrystalhd_if.h 'DtsGetVersion(0, 0, 0)' -lcrystalhd $_ld_lm && crystalhd=yes +fi + +if test "$crystalhd" = yes ; then + extra_ldflags="$extra_ldflags -lcrystalhd" + def_crystalhd="#define CONFIG_CRYSTALHD 1" + codecmodules="crystalhd $codecmodules" +else + def_crystalhd="#define CONFIG_CRYSTALHD 0" + nocodecmodules="crystalhd $nocodecmodules" + libavdecoders=$(echo $libavdecoders | sed -e 's/[A-Z0-9]*_CRYSTALHD_DECODER//g') +fi +echores "$crystalhd" echocheck "Xvid" if test "$_xvid" = auto ; then @@ -8171,6 +8189,7 @@ CONFIG_AC3DSP = $_mencoder CONFIG_BZLIB = $bzlib +CONFIG_CRYSTALHD= $crystalhd CONFIG_ENCODERS = yes CONFIG_GPL = yes CONFIG_MLIB = $_mlib @@ -8682,6 +8701,7 @@ #define LIBAV_LICENSE FFMPEG_LICENSE /* External libraries used through FFmpeg. */ +$def_crystalhd $def_faac_lavc $def_libdirac_lavc $def_libgsm
--- a/etc/codecs.conf Tue Mar 22 11:44:26 2011 +0000 +++ b/etc/codecs.conf Wed Mar 23 08:35:45 2011 +0000 @@ -3,7 +3,7 @@ ; Before editing this file, please read DOCS/tech/codecs.conf.txt ! ;============================================================================= -release 20101127 +release 20110311 ;============================================================================= ; VIDEO CODECS @@ -366,6 +366,42 @@ out VDPAU_MPEG1 out VDPAU_MPEG2 +videocodec ffmpeg2crystalhd + info "FFmpeg MPEG-2 (CrystalHD)" + status working + format 0x10000002 ; MPEG-2 + fourcc mpg2,MPG2 + fourcc "DVR " + fourcc hdv1 + fourcc hdv2 + fourcc MPEG + fourcc hdv3 ; HDV 1080i50 + fourcc hdv5 ; HDV 720p25 + fourcc mx5p ; MPEG IMX 625/50 (50 Mb/s) + fourcc MMES,mmes ; matrox mpeg2 in avi + fourcc M701 ; matrox mpeg2 intra-only + fourcc hdv6,hdv7,hdv8 + 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 + fourcc mx5n,mx4n,mx4p + fourcc mx3n,mx3p + fourcc AVmp + fourcc VCR2 + fourcc mp2v,mpgv + fourcc m2v1 + fourcc PIM2 + fourcc LMP2 ; Lead mpeg2 in avi + fourcc slif ; SoftLab MPEG-2 I-frames Codec + driver ffmpeg + dll mpeg2_crystalhd + out YUY2 + videocodec mpegpes info "MPEG-PES output (.mpg or DXR3/IVTV/DVB/V4L2 card)" comment "for hardware decoding" @@ -900,6 +936,23 @@ dll msmpeg4 out YV12,I420,IYUV +videocodec ffdivxcrystalhd + info "FFmpeg DivX ;-) (MSMPEG-4 v3) (CrystalHD)" + status buggy + fourcc MPG3,mpg3 div3 + 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 DIVF,divf ; divx4.12 + fourcc AP41 div3 ; AngelPotion stuff + fourcc COL1,col1,COL0,col0 ; Cool codec (based on mpg4ds32.ax) + fourcc 3IVD,3ivd ; divxdoctored files (3ivx.com) + fourcc DVX3 + driver ffmpeg + dll msmpeg4_crystalhd + out YUY2 + videocodec ffmp42 info "FFmpeg MSMPEG-4 v2" status working @@ -960,6 +1013,14 @@ dll wmv3_vdpau out VDPAU_WMV3 +videocodec ffwmv3crystalhd + info "FFmpeg WMV3/WMV9 (CrystalHD)" + status buggy + fourcc WMV3,wmv3 + driver ffmpeg + dll wmv3_crystalhd + out YUY2 + videocodec ffvc1 info "FFmpeg WVC1" status buggy @@ -978,6 +1039,15 @@ dll vc1_vdpau out VDPAU_VC1 +videocodec ffvc1crystalhd + info "FFmpeg WVC1 (CrystalHD)" + status buggy + fourcc WVC1,wvc1,WMVA + fourcc vc-1,VC-1 + driver ffmpeg + dll vc1_crystalhd + out YUY2 + videocodec ffh264 info "FFmpeg H.264" status working @@ -1008,6 +1078,21 @@ dll h264_vdpau out VDPAU_H264 +videocodec ffh264crystalhd + info "FFmpeg H.264 (CrystalHD)" + status working + fourcc H264,h264 + fourcc X264,x264 + fourcc avc1,AVC1 + fourcc davc,DAVC + fourcc vvvc ; only one sample using this fourcc + fourcc ai55,ai15 ; flip4mac avc intra + fourcc ai1q,ai5q ; flip4mac avc intra + format 0x10000005 + driver ffmpeg + dll h264_crystalhd + out YUY2 + videocodec coreavcwindows info "CoreAVC H.264 for x86 - http://corecodec.org/" comment "this codec will only work after purchasing it" @@ -1100,6 +1185,39 @@ dll mpeg4_vdpau out VDPAU_MPEG4 +videocodec ffodivxcrystalhd + info "FFmpeg MPEG-4,DIVX-4/5 (CrystalHD)" + status working + fourcc FMP4,fmp4 + fourcc DIVX,divx + fourcc DIV1,div1 divx + fourcc MP4S,mp4s ; ISO MPEG-4 Video V1 + fourcc M4S2,m4s2 + fourcc xvid,XVID,XviD,XVIX + fourcc DX50,dx50,BLZ0 DX50 + fourcc mp4v,MP4V + format 0x4 + fourcc UMP4 + fourcc RMP4 + fourcc 3IV2,3iv2 ; 3ivx Delta 4 + fourcc DXGM + fourcc SEDG ; diskless camcorder Samsung Miniket VP-M110 + fourcc SMP4,smp4 ; Samsung SMP4 video codec + fourcc VIDM ; vidm 4.01 codec + format 0x10000004 ; mpeg 4 es + fourcc m4cc,M4CC + fourcc hdx4,HDX4 + fourcc FVFW,fvfw + fourcc FFDS + fourcc DCOD,MVXM,EM4A,PM4V + fourcc M4T3,DMK2,DIGI,INMC + fourcc EPHV,SN40,WAWV + fourcc uldx,ULDX,VSPX + fourcc SIPP ; Samsung SHR-6040 + driver ffmpeg + dll mpeg4_crystalhd + out YUY2 + videocodec ffwv1f info "WV1F MPEG-4" status working
--- a/libmpdemux/stheader.h Tue Mar 22 11:44:26 2011 +0000 +++ b/libmpdemux/stheader.h Wed Mar 23 08:35:45 2011 +0000 @@ -97,7 +97,7 @@ double i_pts; // PTS for the _next_ I/P frame float next_frame_time; double last_pts; - double buffered_pts[20]; + double buffered_pts[32]; int num_buffered_pts; // output format: (set by demuxer) float fps; // frames per second (set only if constant fps)