[MPlayer-dev-eng] [PATCH] libdca support

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Sun Jul 15 16:33:22 CEST 2007


On Sunday, 15 July 2007 at 16:16, Dominik 'Rathann' Mierzejewski wrote:
> On Sunday, 08 July 2007 at 19:10, Roberto Togni wrote:
> > Hi all,
> >  this patch add support for dts decoding using libdca.
> > It uses libdca directly, not via ffmpeg.
> > 
> > This should fix the regression created with removal of libdca support
> > from ffmpeg.
> > 
> > Please test, especially with multispeaker setup.
> 
> It doesn't do automatic 6ch->2ch downmixing, like liba52 does.
> Does anyone have the coefficients for -af channels?

This 6ch sample doesn't play, but I guess it's more of an ALSA problem,
because it plays the front channels (but only them) with -ao oss just fine.

$ mplayer -v DemoSample_DTS_4a.wav
MPlayer SVN-r23784 rpm.livna.org (C) 2000-2007 MPlayer Team
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ (Family: 15, Model: 35, Stepping: 2)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
get_path('codecs.conf') -> '/home/rathann/.mplayer/codecs.conf'
Reading /home/rathann/.mplayer/codecs.conf: Can't open '/home/rathann/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: Can't open '/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
Configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/mplayer --mandir=/usr/share/man --confdir=/etc/mplayer --libdir=/usr/lib64 --codecsdir=/usr/lib64/codecs --disable-encoder=FAAC --disable-encoder=MP3LAME --disable-encoder=X264 --enable-largefiles --disable-termcap --disable-bitmap-font --enable-lirc --enable-joystick --disable-smb --disable-dvdread-internal --disable-libdvdcss-internal --enable-menu --disable-faad-internal --disable-tremor-internal --disable-mad --disable-svga --enable-xvmc --disable-directfb --disable-svga --disable-arts --disable-esd --disable-jack --disable-openal --enable-runtime-cpudetection --target=x86_64-linux --language=all --with-xvmclib=XvMCW
CommandLine: '-v' 'DemoSample_DTS_4a.wav'
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/rathann/.mplayer/fonts'
Using nanosleep() timing
get_path('input.conf') -> '/home/rathann/.mplayer/input.conf'
Parsing input config file /home/rathann/.mplayer/input.conf
Input config file /home/rathann/.mplayer/input.conf parsed: 62 binds
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
get_path('DemoSample_DTS_4a.wav.conf') -> '/home/rathann/.mplayer/DemoSample_DTS_4a.wav.conf'

Playing DemoSample_DTS_4a.wav.
get_path('sub/') -> '/home/rathann/.mplayer/sub/'
[file] File size is 2852234 bytes
STREAM: [file] DemoSample_DTS_4a.wav
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
SUB: opened iconv descriptor.
SUB: closed iconv descriptor.
Searching demuxer type for filename DemoSample_DTS_4a.wav ext: .wav
Trying demuxer 17 based on filename extension
==> Found audio stream: 0
======= WAVE Format =======
Format Tag: 1 (0x1)
Channels: 2
Samplerate: 44100
avg byte/sec: 176400
Block align: 4
bits/sample: 16
cbSize: 0
==========================================================================
[demux_audio] DTS audio in wav, 14 bit, LE
demux_audio: audio data 0x2E - 0x2B81CA  
Audio file file format detected.
==========================================================================
Opening audio decoder: [libdca] DTS decoding with libdca
dec_audio: Allocating 18726 bytes for input buffer.
dec_audio: Allocating 192000 + 65536 = 257536 bytes for output buffer.
AUDIO: 44100 Hz, 6 ch, s16le, 1411.2 kbit/33.33% (ratio: 176400->529200)
Selected audio codec: [dts] afm: libdca (DTS-libdca)
==========================================================================
Building audio filter chain for 44100Hz/6ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter volnorm 
alsa-init: requested format: 44100 Hz, 6 channels, 9
alsa-init: using ALSA 1.0.14rc1
alsa-init: device set to surround51
alsa-init: using device surround51
[AO_ALSA] alsa-lib: confmisc.c:1283:(snd_func_refer) Unable to find definition 'cards.CMI8738.pcm.surround51.0:CARD=0'
[AO_ALSA] alsa-lib: conf.c:3500:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
[AO_ALSA] alsa-lib: conf.c:3972:(snd_config_expand) Evaluate error: No such file or directory
[AO_ALSA] alsa-lib: pcm.c:2145:(snd_pcm_open_noupdate) Unknown PCM surround51
[AO_ALSA] Open in nonblock-mode failed, trying to open in block-mode.
[AO_ALSA] alsa-lib: confmisc.c:1283:(snd_func_refer) Unable to find definition 'cards.CMI8738.pcm.surround51.0:CARD=0'
[AO_ALSA] alsa-lib: conf.c:3500:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
[AO_ALSA] alsa-lib: conf.c:3972:(snd_config_expand) Evaluate error: No such file or directory
[AO_ALSA] alsa-lib: pcm.c:2145:(snd_pcm_open_noupdate) Unknown PCM surround51
[AO_ALSA] Playback open error: No such file or directory
AO: [null] 44100Hz 6ch s16le (2 bytes per sample)
AO: Description: Null audio output
AO: Author: Tobias Diedrich <ranma+mplayer at tdiedrich.de>
Building audio filter chain for 44100Hz/6ch/s16le -> 44100Hz/6ch/s16le...
Video: no video
Freeing 0 unused video chunks.
Starting playback...
Uninit audio filters... (16.0)  9.3%
[libaf] Removing filter volnorm 
Uninit audio: libdca
vo: x11 uninit called but X11 not inited..

Exiting... (Quit)

Amazingly enough, it works with a 5ch sample I have here:

$ mplayer diatonis_dts_secret-universe.wav -v
MPlayer SVN-r23784 rpm.livna.org (C) 2000-2007 MPlayer Team
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ (Family: 15, Model: 35, Stepping: 2)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
get_path('codecs.conf') -> '/home/rathann/.mplayer/codecs.conf'
Reading /home/rathann/.mplayer/codecs.conf: Can't open '/home/rathann/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: Can't open '/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
Configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/mplayer --mandir=/usr/share/man --confdir=/etc/mplayer --libdir=/usr/lib64 --codecsdir=/usr/lib64/codecs --disable-encoder=FAAC --disable-encoder=MP3LAME --disable-encoder=X264 --enable-largefiles --disable-termcap --disable-bitmap-font --enable-lirc --enable-joystick --disable-smb --disable-dvdread-internal --disable-libdvdcss-internal --enable-menu --disable-faad-internal --disable-tremor-internal --disable-mad --disable-svga --enable-xvmc --disable-directfb --disable-svga --disable-arts --disable-esd --disable-jack --disable-openal --enable-runtime-cpudetection --target=x86_64-linux --language=all --with-xvmclib=XvMCW
CommandLine: 'diatonis_dts_secret-universe.wav' '-v'
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/rathann/.mplayer/fonts'
Using nanosleep() timing
get_path('input.conf') -> '/home/rathann/.mplayer/input.conf'
Parsing input config file /home/rathann/.mplayer/input.conf
Input config file /home/rathann/.mplayer/input.conf parsed: 62 binds
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
get_path('diatonis_dts_secret-universe.wav.conf') -> '/home/rathann/.mplayer/diatonis_dts_secret-universe.wav.conf'

Playing diatonis_dts_secret-universe.wav.
get_path('sub/') -> '/home/rathann/.mplayer/sub/'
[file] File size is 71893036 bytes
STREAM: [file] diatonis_dts_secret-universe.wav
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
SUB: opened iconv descriptor.
SUB: closed iconv descriptor.
Searching demuxer type for filename diatonis_dts_secret-universe.wav ext: .wav
Trying demuxer 17 based on filename extension
==> Found audio stream: 0
======= WAVE Format =======
Format Tag: 1 (0x1)
Channels: 2
Samplerate: 44100
avg byte/sec: 176400
Block align: 4
bits/sample: 16
cbSize: 0
==========================================================================
[demux_audio] DTS audio in wav, 14 bit, LE
demux_audio: audio data 0x2C - 0x449002C  
Audio file file format detected.
==========================================================================
Opening audio decoder: [libdca] DTS decoding with libdca
dec_audio: Allocating 18726 bytes for input buffer.
dec_audio: Allocating 192000 + 65536 = 257536 bytes for output buffer.
AUDIO: 44100 Hz, 5 ch, s16le, 1411.2 kbit/40.00% (ratio: 176400->441000)
Selected audio codec: [dts] afm: libdca (DTS-libdca)
==========================================================================
Building audio filter chain for 44100Hz/5ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter volnorm 
alsa-init: requested format: 44100 Hz, 5 channels, 9
alsa-init: using ALSA 1.0.14rc1
[AO_ALSA] 5 channels are not supported.
alsa-init: using device default
alsa-init: pcm opened in blocking mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=65536
alsa-init: got period size 1024
alsa: 44100 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <joy at streamminister.de>
AO: Comment: under developement
Building audio filter chain for 44100Hz/5ch/s16le -> 44100Hz/2ch/s16le...
[libaf] Adding filter channels 
[channels] Changing number of channels to 2
Video: no video
Freeing 0 unused video chunks.
Starting playback...
[libaf] Reallocating memory in module channels, old len = 0, new len = 26220
A:  18.7 (18.7) of 407.0 (06:47.0)  9.5%
[libaf] Removing filter volnorm 
[libaf] Removing filter channels 
Uninit audio: libdca
alsa-uninit: pcm closed
vo: x11 uninit called but X11 not inited..

Regards,
R.

-- 
MPlayer developer and RPMs maintainer: http://mplayerhq.hu http://rpm.livna.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan



More information about the MPlayer-dev-eng mailing list