[MPlayer-cygwin] Fast CoreAVC DShow H264 decoder - Need help

Stefan Gürtler helfmir at surfeu.de
Mon Jan 16 20:46:31 CET 2006


Hi folks
Over at doom9, BetaBoy and PickardGK from CoreCodec 
(http://www.corecodec.net/) have released first alpha-Versions of their 
H264/MPEG-4 AVC decoder, that outperform any other H264 decoder out 
there. (http://forum.doom9.org/showthread.php?t=104277)
Initially the decoder was only available as plugin to 
player-applicateion TCPMP, but later on a DShow decoder filter was added 
by Toff. It has reached v0.0.0.4 by now and is nearly fully featured.
(http://forum.doom9.org/showthread.php?p=767051#post767051).
Here the README form v0.0.0.4:

CoreCodec AVC DirectShow Video Decoder

ALPHA VERSION FOR TESTING PURPOSE ONLY

Changelog:
==========

Version 0.0.0.4 Alpha (20060113) :
   Support for VSSH FOURCC
   Support for YUY2 output
   Force anamorphic flag on renderer

Version 0.0.0.3 Alpha (20060109) :
   CQM support
   Fix for 8x8dct
   Flush buffered frame
   Support for X264 and x264 FOURCCs
   Now use MERIT_NORMAL

Version 0.0.0.2 Alpha (20060104) :
   Fixed some compatibility problems (AVI Decompressor, AviSynth, ...)
   Project cleanup (smaller size)

Version 0.0.0.1 Alpha (20060102) :
   Use a very high merit in this alpha release, don't install it if you
   don't want to use it.
   Should support anamorphic from Matroska (native mode) and MP4 files.
   Limitations :
     - Only output to YV12 and I420
     - No dynamic output mediatype change
     - No flushing for buffered frame at end of file
     - Linked with some unecessary code from TCPMP
     - no cqm, lossless or interlacing support
For testing, one can use a ActivX plugin with MS IExplorer at
http://tcpmp.corecodec.org/tcpmpx/index.htm

I have tryed to add the dshwo filter to mplayers codec.conf but failed 
so far. What I did is:

Add this section added to codecs.conf

; NEW SG
videocodec coreAVC
   info "CoreAVC DShow H264 decoder vor x86 - http://corecodec.org/"
   status untested
   fourcc AVC,avc
   fourcc VSSH
   fourcc X264,x264
   driver dshow
   dll "CoreAVCDecoder.ax"
   ;copied from vssh264
   guid 0x6931C7e7, 0x75b7, 0x4729, 0xa1, 0x53, 0xa8, 0xad, 0x99, 0xbd, 
0xf7, 0x0b
   out YV12,I420
   out YUY2
; END NEW SG

MPlayer was compiled on win32 using with
./configure --prefix=/opt/mplayer_coreavc --with-codecsdir=codecs
and CoreAVCDecoder.ax placed to /opt/mplayer_coreavc/bin/codecs
Stefan at SAGARA /opt/mplayer_coreavc/bin/codecs
$ ls
CoreAVCDecoder.ax

codecs.conf was copied to ~/mplayer/codecs.conf and the output of 
./mplayer.exe -v checked to verify that it was actually read.

H264-sample was downloaded from apple.com. I have choosen 
nasa_shuttle_m720p.mov.

mplayer.exe was started without request for coreAVC
-----------------------------------------------------------
./mplayer /d/Import/nasa_shuttle_m720p.mov
...
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
...
-----------------------------------------------------------
Plays just fine.

Now the coreAVC decoder is being requested, with fallback to ffh264
-----------------------------------------------------------
./mplayer -vc coreAVC, /d/Import/nasa_shuttle_m720p.mov

...
Forced video codec: coreAVC
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
...
-----------------------------------------------------------
coreAVC is not being used, though mplayer knows that it was requested
With more info:
-----------------------------------------------------------
./mplayer -vc coreAVC, /d/Import/nasa_shuttle_m720p.mov -v

...
Fourcc: avc1  Codec: 'H.264'
--------------
Quicktime Clip Info:
  Comment: All Rights Reserved
  Copyright: ©2005 NASA
  Name: NASA Shuttle
  Artist: NASA
  Author: NASA
  Info: http://spaceflight.nasa.gov/
MOV: unknown chunk: meta 274
MOV: longest streams: A: #0 (2626 samples)  V: #1 (1829 samples)
VIDEO:  [avc1]  1280x720  24bpp  29.970 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:7  fourcc:0x31637661  size:1280x720  fps:29.97  ftime:=0.0334
Clip info:
  comments: All Rights Reserved
  copyright: ©2005 NASA
  name: NASA Shuttle
  author: NASA
get_path('sub/') -> 'C:/Programme/msys/1.0/home/Stefan/mplayer/sub/'
get_path('default.sub') -> 
'C:/Programme/msys/1.0/home/Stefan/mplayer/default.sub'
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
...
<vo_directx><INFO>hardware supports overlay
==========================================================================
Forced video codec: coreAVC
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
-----------------------------------------------------------
I do not know how to translate hex to ascii, so i assume that 
fourcc:0x31637661 actually is avc1, as stated in the first line that i 
have pasted.
OK, lets add avc1 to codecs.conf

; NEW SG
videocodec coreAVC
   info "CoreAVC DShow H264 decoder vor x86 - http://corecodec.org/"
   status untested
   fourcc AVC,avc
   fourcc VSSH
   fourcc X264,x264
   fourcc avc1,AVC1
   driver dshow
   dll "CoreAVCDecoder.ax"
   ;copied from vssh264
   guid 0x6931C7e7, 0x75b7, 0x4729, 0xa1, 0x53, 0xa8, 0xad, 0x99, 0xbd, 
0xf7, 0x0b
   out YV12,I420
   out YUY2
; END NEW SG

-----------------------------------------------------------
./mplayer -vc coreAVC, /d/Import/nasa_shuttle_m720p.mov -v

...
<vo_directx><INFO>hardware supports overlay
==========================================================================
Forced video codec: coreAVC
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
...
-----------------------------------------------------------

Here the full output
-----------------------------------------------------------
Stefan at SAGARA /opt/mplayer_coreavc/bin
$ ./mplayer -vc coreAVC, /d/Import/nasa_shuttle_m720p.mov -v
MPlayer dev-CVS-060116-18:40-3.4.4 (C) 2000-2006 MPlayer Team
CPU: Intel Pentium M Dothan (Family: 6, Stepping: 8)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2


get_path('codecs.conf') -> 
'C:/Programme/msys/1.0/home/Stefan/mplayer/codecs.conf'
Reading C:/Programme/msys/1.0/home/Stefan/mplayer/codecs.conf: parse 
error at line 1810
Reading /opt/mplayer_coreavc/etc/mplayer/codecs.conf: Can't open 
'/opt/mplayer_coreavc/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
CommandLine: '-vc' 'coreAVC,' 'd:/Import/nasa_shuttle_m720p.mov' '-v'
get_path('font/font.desc') -> 
'C:/Programme/msys/1.0/home/Stefan/mplayer/font/font.desc'
font: can't open file: 
C:/Programme/msys/1.0/home/Stefan/mplayer/font/font.desc
font: can't open file: /opt/mplayer_coreavc/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Using Windows native timing
get_path('input.conf') -> 
'C:/Programme/msys/1.0/home/Stefan/mplayer/input.conf'
Can't open input config file 
C:/Programme/msys/1.0/home/Stefan/mplayer/input.conf: No such file or 
directory
Can't open input config file 
/opt/mplayer_coreavc/etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config
get_path('nasa_shuttle_m720p.mov.conf') -> 
'C:/Programme/msys/1.0/home/Stefan/mplayer/nasa_shuttle_m720p.mov.conf'
getch2: 6 can't get number of input events  [disabling console input]
Playing d:/Import/nasa_shuttle_m720p.mov.
get_path('sub/') -> 'C:/Programme/msys/1.0/home/Stefan/mplayer/sub/'
WINSOCK2 init: 0
[file] File size is 48317201 bytes
STREAM: [file] d:/Import/nasa_shuttle_m720p.mov
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for NuppelVideo
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename d:/Import/nasa_shuttle_m720p.mov 
ext: .mov
Trying demuxer 7 based on filename extension
Checking for MOV
ISO: File Type Major Brand: Original QuickTime
ISO: File Type Minor Version: 537199360
ISO: File Type Compatible Brand #0: qt
ISO: File Type Compatible Brand #1:
ISO: File Type Compatible Brand #2:
ISO: File Type Compatible Brand #3:
MOV: 'WIDE' chunk found!
MOV: Movie DATA found!
MOV: Movie DATA found!
MOV: Movie header found!
Quicktime/MOV file format detected.
MOV: Movie header (100 bytes): tscale=600  dur=36553
--------------
MOV: Track #0:
MOV:  Track header!
tkhd len=84 ver=0 flags=0x0 id=1 dur=36553 lay=0 vol=256
MOV:  Edit atom!
MOV:   Edit list table (1 entries) (ver:0,flags:0)
MOV:     entry#0: duration: 36553  start time: 0  speed: 1.0x
MOV:  Media stream!
MOV:   Media header!
MOV:   Handler header: mhlr/soun (appl) Apple Sound Media Handler
MOV:   Media info!
MOV:    Sound header!
MOV:    Handler header: dhlr/alis (appl) Apple Alias Data Handler
MOV: unknown chunk: dinf 28
MOV:    Sample info!
MOV:     Description list! (cnt:1)
MOV:      desc #0: mp4a  (151 bytes)
MOV:     Sample duration table! (1 blocks)
MOV:     Sample->Chunk mapping table!  (238 blocks) (ver:0,flags:0)
MOV:     Sample size table! (entries=2626 ss=0) (ver:0,flags:0)
MOV:     Chunk offset table! (239 chunks)
MOV track #0: 239 chunks, 2626 samples
pts=2689024  scale=44100  time=60.976
EL#0: pts=0  1st_sample=0  frames=2624 (60.922s)  pts_offs=0
==> Found audio stream: 0
Audio bits: 16  chans: 2  rate: 44100
Audio header: samp/pack=1024 bytes/pack=1 bytes/frame=2 bytes/samp=2
Audio extra header: len=91  fcc=0x77617665
MOV: Found MPEG4 audio Elementary Stream Descriptor atom (51)!
ESDS MPEG4 version: 0  flags: 0x000000
ESDS MPEG4 ES Descriptor (34Bytes):
  -> ESId: 0
  -> streamPriority: 0
ESDS MPEG4 Decoder Config Descriptor (20Bytes):
  -> objectTypeId: 64
  -> streamType: 0x15
  -> bufferSizeDB: 0x001800
  -> maxBitrate: 192.000kbit/s
  -> avgBitrate: 192.000kbit/s
ESDS MPEG4 Decoder Specific Descriptor (2Bytes)
ESDS MPEG4 Sync Layer Config Descriptor (1Bytes)
  -> predefined: 2
Fourcc: mp4a
--------------
MOV: Track #1:
MOV:  Track header!
tkhd len=84 ver=0 flags=0x0 id=2 dur=36553 lay=0 vol=0
MOV: unknown chunk: load 16
MOV:  Edit atom!
MOV:   Edit list table (1 entries) (ver:0,flags:0)
MOV:     entry#0: duration: 36553  start time: 0  speed: 1.0x
MOV:  Media stream!
MOV:   Media header!
MOV:   Handler header: mhlr/vide (appl) Apple Video Media Handler
MOV:   Media info!
MOV:    Video header!
MOV:    Handler header: dhlr/alis (appl) Apple Alias Data Handler
MOV: unknown chunk: dinf 28
MOV:    Sample info!
MOV:     Description list! (cnt:1)
MOV:      desc #0: avc1  (135 bytes)
MOV:     Sample duration table! (13 blocks)
MOV: unknown chunk: ctts 14400
MOV: unknown chunk: cslg 24
MOV:     Syncing samples (keyframes) table! (31 entries) (ver:0,flags:0)
MOV: unknown chunk: sdtp 1833
MOV:     Sample->Chunk mapping table!  (19 blocks) (ver:0,flags:0)
MOV:     Sample size table! (entries=1829 ss=0) (ver:0,flags:0)
MOV:     Chunk offset table! (125 chunks)
MOV track #1: 125 chunks, 1829 samples
pts=182586  scale=2997  time=60.923
EL#0: pts=0  1st_sample=0  frames=1829 (60.922s)  pts_offs=0
==> Found video stream: 1
MOV: Found unknown movie atom colr (18)!
MOV: AVC decoder configuration record atom (43)!
MOV: avcC version: 1
MOV: avcC profile: 77
MOV: avcC profile compatibility: 64
MOV: avcC level: 31
MOV: avcC nal length size: 4
MOV: avcC number of sequence param sets: 1
MOV: avcC sps 0 have length 20
MOV: avcC number of picture param sets: 1
MOV: avcC pps 0 have length 4
Image size: 1280 x 720 (24 bpp)
Display size: 1280 x 720
Fourcc: avc1  Codec: 'H.264'
--------------
Quicktime Clip Info:
  Comment: All Rights Reserved
  Copyright: ©2005 NASA
  Name: NASA Shuttle
  Artist: NASA
  Author: NASA
  Info: http://spaceflight.nasa.gov/
MOV: unknown chunk: meta 274
MOV: longest streams: A: #0 (2626 samples)  V: #1 (1829 samples)
VIDEO:  [avc1]  1280x720  24bpp  29.970 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:7  fourcc:0x31637661  size:1280x720  fps:29.97  ftime:=0.0334
Clip info:
  comments: All Rights Reserved
  copyright: ©2005 NASA
  name: NASA Shuttle
  author: NASA
get_path('sub/') -> 'C:/Programme/msys/1.0/home/Stefan/mplayer/sub/'
get_path('default.sub') -> 
'C:/Programme/msys/1.0/home/Stefan/mplayer/default.sub'
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
dec_audio: Allocating 4608 bytes for input buffer.
dec_audio: Allocating 49152 + 65536 = 114688 bytes for output buffer.
FAAD: Decoder init done (0Bytes)!
FAAD: Negotiated samplerate: 44100Hz  channels: 2
FAAD: got 192kbit/s bitrate from MP4 header!
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000->176400)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio) 
decoder)
==========================================================================
<vo_directx><INFO>checking primary surface
<vo_directx><FORMAT PRIMARY>14 BGR32 supported
<vo_directx><INFO>testing supported overlay pixelformats
<vo_directx><FORMAT OVERLAY>0 YV12  supported
<vo_directx><FORMAT OVERLAY>1 I420  not supported
<vo_directx><FORMAT OVERLAY>2 IYUV  not supported
<vo_directx><FORMAT OVERLAY>3 YVU9  supported
<vo_directx><FORMAT OVERLAY>4 YUY2  supported
<vo_directx><FORMAT OVERLAY>5 UYVY  supported
<vo_directx><FORMAT OVERLAY>6 BGR8  not supported
<vo_directx><FORMAT OVERLAY>7 RGB15 supported
<vo_directx><FORMAT OVERLAY>8 BGR15 supported
<vo_directx><FORMAT OVERLAY>9 RGB16 supported
<vo_directx><FORMAT OVERLAY>10 BGR16 supported
<vo_directx><FORMAT OVERLAY>11 RGB24 not supported
<vo_directx><FORMAT OVERLAY>12 BGR24 not supported
<vo_directx><FORMAT OVERLAY>13 RGB32 supported
<vo_directx><FORMAT OVERLAY>14 BGR32 supported
<vo_directx><INFO>Your card supports 10 of 15 overlayformats
<vo_directx><INFO>hardware supports overlay
==========================================================================
Forced video codec: coreAVC
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
ao_dsound: Output Devices:
0 Primärer Soundtreiber <--
1 Realtek HD Audio output
ao_dsound: DirectSound initialized
ao_dsound: Samplerate:44100Hz Channels:2 Format:s16le
ao_dsound: Buffersize:176400 bytes (1000 msec)
ao_dsound: primary buffer created
ao_dsound: secondary (stream)buffer created
AO: [dsound] 44100Hz 2ch s16le (2 bytes per sample)
AO: Description: Windows DirectSound audio output
AO: Author: Gabor Szecsi <deje at miki.hu>
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Starting playback...
[ffmpeg] aspect_ratio: 0.000000
VDec: vo config request - 1280 x 720 (preferred colorspace: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (1280x720->1280x720,flags=0,'MPlayer',0x32315659)
VO: [directx] 1280x720 => 1280x720 Planar YV12
VO: Description: Directx DDraw YUV/RGB/BGR renderer
VO: Author: Sascha Sommer <saschasommer at freenet.de>
aspect: Warning: no suitable new res found!
<vo_directx><INFO>overlay with format YV12  created
*** [vo] Exporting mp_image_t, 1280x720x12bpp YUV planar, 1382400 bytes
Uninit audio filters... 0.002 ct:  0.029  47/ 47 76%  3%  1.0% 0 0 

[libaf] Removing filter dummy
uninit audio: faad
FAAD: Closing decoder!
uninit video: ffmpeg
WINSOCK2 uninit
ao_dsound: DirectSound uninitialized

Exiting... (Quit)

Stefan at SAGARA /opt/mplayer_coreavc/bin
-----------------------------------------------------------


What else can be done to get coreAVCDecoder.ax up and running?

Stefan






More information about the MPlayer-cygwin mailing list