[FFmpeg-devel] [RFC] LPCM 24 bits support
Michael Niedermayer
michaelni
Sat May 3 17:52:12 CEST 2008
On Sat, May 03, 2008 at 04:35:59PM +0200, Baptiste Coudurier wrote:
> Baptiste Coudurier wrote:
> > Hi,
> >
> > M?ns Rullg?rd wrote:
> >> Lars T?uber <lars.taeuber at gmx.net> writes:
> >>
> >>> diff -pur ffmpeg/libavcodec/Makefile ffmpeg.1/libavcodec/Makefile
> >>> --- ffmpeg/libavcodec/Makefile 2008-04-19 20:25:42.000000000 +0200
> >>> +++ ffmpeg.1/libavcodec/Makefile 2008-04-19 20:27:50.000000000 +0200
> >>> @@ -236,6 +236,7 @@ OBJS-$(CONFIG_ZMBV_ENCODER) +
> >>>
> >>> OBJS-$(CONFIG_PCM_ALAW_DECODER) += pcm.o
> >>> OBJS-$(CONFIG_PCM_ALAW_ENCODER) += pcm.o
> >>> +OBJS-$(CONFIG_PCM_DVD_DECODER) += pcm.o
> >>> OBJS-$(CONFIG_PCM_MULAW_DECODER) += pcm.o
> >>> OBJS-$(CONFIG_PCM_MULAW_ENCODER) += pcm.o
> >>> OBJS-$(CONFIG_PCM_S8_DECODER) += pcm.o
> >>>
> >>> diff -pur ffmpeg/libavformat/mpeg.c ffmpeg.1/libavformat/mpeg.c
> >>> --- ffmpeg/libavformat/mpeg.c 2008-03-04 21:54:06.000000000 +0100
> >>> +++ ffmpeg.1/libavformat/mpeg.c 2008-04-19 20:27:58.000000000 +0200
> >>> @@ -473,7 +473,9 @@ 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_PCM_S16BE will be handled as the 16bit
> >>> + form of CODEC_ID_PCM_DVD */
> >>> + codec_id = CODEC_ID_PCM_DVD;
> >
> > Isn't comment still a bit weird ? Maybe not ...
> >
>
> I was about to apply the patch, I updated the comment, bumped minor. I'd
> like confirmation. Thanks.
[...]
> @@ -492,6 +498,18 @@
> *samples++ = s->table[*src++];
> }
> break;
> + case CODEC_ID_PCM_DVD:
> + if(avctx->bits_per_sample != 20 && avctx->bits_per_sample != 24) {
> + av_log(avctx, AV_LOG_ERROR, "PCM DVD unsupported sample depth\n");
> + return -1;
> + }
> + n = buf_size / (avctx->channels * 2 * avctx->bits_per_sample / 8);
> + while (n--) {
> + for (c=0; c < 2*avctx->channels; c++)
> + *samples++ = bytestream_get_be16(&src);
> + src+=
> + avctx->channels * (avctx->bits_per_sample-16) / 4;
that could be calculated outside of the loop.
and iam fine with the rest that i do maintain
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Frequently ignored awnser#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- 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/20080503/b070b8ae/attachment.pgp>
More information about the ffmpeg-devel
mailing list