[FFmpeg-devel] [RFC] LPCM 24 bits support

Michael Niedermayer michaelni
Wed Mar 26 00:48:39 CET 2008


On Wed, Mar 26, 2008 at 12:20:13AM +0000, Giuliano Pochini wrote:
> On Sun, 23 Mar 2008 22:33:07 +0000
> M?ns Rullg?rd <mans at mansr.com> wrote:
> 
> > > diff -dupr ffmpeg__orig/libavcodec/adpcm.c ffmpeg/libavcodec/adpcm.c
> > > --- ffmpeg__orig/libavcodec/adpcm.c	2008-02-06 12:37:37.000000000 +0000
> > > +++ ffmpeg/libavcodec/adpcm.c	2008-03-23 22:26:48.000000000 +0000
> > 
> > 24-bit DVD audio is not ADPCM, so this code is misplaced.
> 
> It was just a quick and dirty test... Here you are a somewhat refined and
> improved patch. It support any format and number of channels. It seems to
> work fine with all the test files I was told about, but of course it needs
> more testing. I didn't pay much attention to coding style and performance.
> Audio data is first decoded to S24, then it is copied into the destination
> buffer in S16 format.
[...]
> diff -dupr ffmpeg__orig/libavformat/mpeg.c ffmpeg/libavformat/mpeg.c
> --- ffmpeg__orig/libavformat/mpeg.c	2008-02-06 12:37:37.000000000 +0000
> +++ ffmpeg/libavformat/mpeg.c	2008-03-25 01:02:11.000000000 +0000
> @@ -469,7 +469,7 @@ static int mpegps_read_packet(AVFormatCo
>          codec_id = CODEC_ID_DTS;
>      } else if (startcode >= 0xa0 && startcode <= 0xaf) {
>          type = CODEC_TYPE_AUDIO;
> -        codec_id = CODEC_ID_PCM_S16BE;
> +        codec_id = CODEC_ID_PCM_DVD;
>      } else if (startcode >= 0xb0 && startcode <= 0xbf) {
>          type = CODEC_TYPE_AUDIO;
>          codec_id = CODEC_ID_MLP;

CODEC_ID_PCM_S16BE should stay CODEC_ID_PCM_S16BE


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080326/2a8a79fc/attachment.pgp>



More information about the ffmpeg-devel mailing list