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

Diego Biurrun diego at biurrun.de
Thu Jul 12 02:56:56 CEST 2007


On Sun, Jul 08, 2007 at 07:10:55PM +0200, Roberto Togni wrote:
>  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.
> 
> --- libmpcodecs/ad_libdca.c	(revision 0)
> +++ libmpcodecs/ad_libdca.c	(revision 0)
> @@ -0,0 +1,308 @@
> +/*
> + * ad_libdca.c : DTS Coherent Acoustics stream decoder
> + * 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 FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

It should read MPlayer there, not FFmpeg.

> + * This file is based on dtsdec.c r9036 from FFmpeg and ad_liba52.c

I'd prefer to see this line before the license statement.

Some nits below, build system changes are OK.

> +        for(i = 0; i < 256; i++){

I'd prefer if you could leave a space between the for and the
parentheses.

> +    case DTS_3F:
> +        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] = s16[5*i+3] = 0;
> +            s16[5*i+4] = convert(f[i]);

Michael would say you could align all of this vertically :)

I've tested the patch on PPC, it works, but with the
Fire__VooDoo_Studio_1_min.wav sample the sound sometimes gets muted
after seeking.

Diego



More information about the MPlayer-dev-eng mailing list