[FFmpeg-devel] Some ideas for a tiny set of audio conversion functions..
Thu Nov 22 01:09:37 CET 2007
On Sun, Nov 18, 2007 at 04:51:55PM +0100, Andreas ?man wrote:
> Michael Niedermayer wrote:
>> the data/stride for the src is strangely duplicated for each dst
>> also the convertion stuff (which channel to which and what gain) is in the
>> same struct as the instance specific stuff (data/stride)
>> these should be seperated!
>> also src/dst data/stride could be stored in 2 arrays
>> like videos data/linesize in AVFrame
> Here is another idea.
> Some thoughts...
> I don't know how useful arbitrary strides are for audio.
> Unless someone has a good reason for having them i think
> we could stick with 'variant 2' below, i.e. just specifying
> if the audio is stored in planar or interleaved mode.
> It is more flexible with strides yes, but is it ever going
> to be used?
> I also changed the mixing stuff to a matrix.
> It's a bit more flexible but OTOH it might be a little more
> code to figure out when to use special case optimized code.
> (Do we need to check if the supplied matrix is an identity
> matrix or can we just assume that NULL is always used for that,
> I also envision that in the future we might just pass
> 'AVAFrame' directly to audio decoders instead of
> an (uint16_t *) and then let avcodec_decode_audio take care
> of the conversion. Same for encoding.
> Then we might add avcodec_decode_audio3() that passes
> this AVAFrame directly to the user.
my original idea was to use AVFrame for audio as well
if we choose not to do this then you will first have to find out
how your AVAFrame can be used in code which should work with all
codec_types, that is code which wants to access
key_frame, pts, quality, opaque, ...
and how direct rendering with audio (get/release_buffer()) could work
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The worst form of inequality is to try to make unequal things equal.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel