[MPlayer-dev-eng] [PATCH] Fixed-point WMA decoder adapted from ROckbox

Ivan Kalvachev ikalvachev at gmail.com
Tue Apr 29 21:26:02 CEST 2008


On Tue, Apr 29, 2008 at 9:14 PM, compn <tempn at twmi.rr.com> wrote:
> On Tue, 29 Apr 2008 11:49:09 -0500
>
> Matt Campbell <mattcampbell at pobox.com> wrote:
>
>
> > I'm sorry, I didn't mean to remove the libdca check in configure; I was
>  > merely using the libdca check as a template for what I needed to add for
>  > libwma.  Here's a corrected patch.
>  >
>  > As for patching libavcodec, the problem is that libwma includes modified
>  > versions of the FFT and MDCT functions from libavcodec, since the WMA
>  > decoder requires the MDCT function.  So if I patch libavcodec, then I'll
>  > also have to fix all of the other codecs in libavcodec that use MDCT
>  > and/or FFT, to use fixed-point numbers for these functions instead of
>  > floats.  And I'm not sure what else was changed in libwma relative to
>  > libavcodec; as I said before, I took libwma from Rockbox.
>
>  well you wont have to fix all of the other codecs, the ffmpeg team will.
>  but i see now what you mean, you swiped it from rockbox, and have nothing to do with rockbox or ffmpeg.
>
>  sorry for the confusion
>
>  -compn
>
>
>
>
>  >
>  > Matt
>  >
>  > compn wrote:
>  > > On Tue, 29 Apr 2008 10:48:25 -0500
>  > > Matt Campbell <mattcampbell at pobox.com> wrote:
>  > >
>  > >> Hello:
>  > >>
>  > >> Attached is a patch for MPlayer which adds a fixed-point WMA decoder
>  > >> that I adapted from Rockbox.  Rockbox's fixed-point WMA decoder was in
>  > >> turn adapted from the one in libavcodec, so it would seem that the best
>  > >> approach is to port the modifications from the Rockbox WMA decoder back
>  > >> to libavcodec.  But I didn't want to break libavcodec.  So instead, I
>  > >> turned the libwma library from ROckbox into a stand-alone library which
>  > >> can run outside of Rockbox, then added it to the MPlayer build system
>  > >> and wrote an audio decoder plug-in for libwma (based on ad_ffmpeg.c).
>  > >> The attached patch also includes some changes to etc/codecs.conf.
>  > >
>  > > this would be better off in libavcodec. if you can, submit a diff of svn libavcodec to ffmpeg-devel. at least it will be a starting point. i'll add it to the ffmpeg small projects wiki.
>  > >
>  > > as for your patch, it seems to remove the check for libdca for some reason.
>  > >
>  > > -echocheck "libdca support"
>  > > -if test "$_libdca" = auto ; then
>  > > -  _libdca=no
>  > > -  cat > $TMPC << EOF
>  > > -#include <inttypes.h>
>  > > -#include <dts.h>
>  > > -int main(void) { dts_init (0); return 0; }
>  > > -EOF
>  > > -  cc_check -ldts $_ld_lm && _libdca=yes
>  > > -fi
>  > > -if test "$_libdca" = yes ; then
>  > > -  _def_libdca='#define USE_LIBDCA 1'
>  > > -  _ld_extra="$_ld_extra -ldts"
>  > > -  _codecmodules="libdca $_codecmodules"
>  > >
>  > >

It also moves some stuff from codecs.conf around.

We actually accept only patches against current svn, with all the
cosmetic and build changes, patch against rc2 may need quite some
addition work to be applied.

I have few more questions:

1. Why this library is better than the one in lavc. Can it decode
wma3/pro (lavc can't). Is it faster (on x86 or only on cpu without
fpu) ? Ignoring that it doesn't work correctly in cases where lavc
does.


2. I don't like it been included as subdirectory. First, it have a lot
of stuff I've seen in lavc , there are a lot of possibilities for
conflict and/or miscompilation when both are available. I guess that
probably a lot of the tables are also not changed.

3. I'm sure diego won't like the copyright headers.

I'm ok with supporting this as external library, but I think it is
overkill to add it into mplayer main tree.

I may be wrong but I think there was integer only version of wma
proposed by the original author in lavc list, or at least there was
another attempt to not use floats. I'm not sure why it haven't made
it.



More information about the MPlayer-dev-eng mailing list