[FFmpeg-devel] [PATCH] IFF stereo support

Michael Niedermayer michaelni
Fri May 2 20:46:46 CEST 2008


On Fri, May 02, 2008 at 11:36:33PM +0530, Jai Menon wrote:
> On Friday 02 May 2008 11:19:23 pm Michael Niedermayer wrote:
> > What about 8SVX_FIB/EXP 2 channel files? This looks like it is just
> > correct for 8bit PCM.
> 
> The "spec" and sketchy documentation available do not say anything about 
> stereo 8svx compressed sampling. My assumption is that such samples are not 
> defined. Same goes for 16bit stereo samples. IIRC we only have one compressed 
> sample available and that is mono.
> More importantly, stereo samples are present in a number of anim files, which 
> are again uncompressed.
> I'll be happy to add functionality as and when samples surface.
> 
> Attached patch addresses the other stuff.
> 
> Regards,
> Jai Menon
> <realityman at gmx.net>

> Index: libavformat/iff.c
> ===================================================================
> --- libavformat/iff.c	(revision 13030)
> +++ libavformat/iff.c	(working copy)
> @@ -60,6 +60,19 @@
>      uint32_t  audio_frame_count;
>  } IffDemuxContext;
>  
> +

> +static void interleave_stereo(const uint8_t *src, uint8_t *dest, int size)
> +{
> +    uint8_t *end = dest + size;

> +    int index = size = size>>1;

something here is redundant

> +
> +    while(dest < end) {
> +        *dest++ = *src;
> +        *dest++ = *(src+index);
> +        src++;
> +    }
> +}
[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thouse who are best at talking, realize last or never when they are wrong.
-------------- 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/20080502/3bab4d63/attachment.pgp>



More information about the ffmpeg-devel mailing list