[FFmpeg-devel] st 0339-2008 format support
Patrick Shirkey
pshirkey at boosthardware.com
Sat Oct 27 20:00:15 CEST 2012
On Sun, October 28, 2012 4:34 am, Kieran Kunhya wrote:
> On Sat, Oct 27, 2012 at 5:38 PM, Patrick Shirkey
> <pshirkey at boosthardware.com> wrote:
>>
>> On Sat, October 27, 2012 4:10 pm, Kieran Kunhya wrote:
>>> On Sat, Oct 27, 2012 at 5:39 AM, compn <tempn at twmi.rr.com> wrote:
>>>> On Sat, 27 Oct 2012 13:37:47 +1100 (EST), Patrick Shirkey wrote:
>>>>>Hi,
>>>>>
>>>>>Does ffmpeg have support for encoding/decoding this format?
>>>
>>> It is a case of extending lavf/spdif.c to handle 20/24-bit audio.
>>
>>
>> Like this?
>>
>> //TODO move to DSP
>> void ff_spdif_bswap_buf24(uint24_t *dst, const uint24_t *src, int w)
>> {
>> int i;
>>
>> for (i = 0; i + 8 <= w; i += 8) {
>> dst[i + 0] = av_bswap24(src[i + 0]);
>> dst[i + 1] = av_bswap24(src[i + 1]);
>> dst[i + 2] = av_bswap24(src[i + 2]);
>> dst[i + 3] = av_bswap24(src[i + 3]);
>> dst[i + 4] = av_bswap24(src[i + 4]);
>> dst[i + 5] = av_bswap24(src[i + 5]);
>> dst[i + 6] = av_bswap24(src[i + 6]);
>> dst[i + 7] = av_bswap24(src[i + 7]);
>> }
>> for (; i < w; i++)
>> dst[i + 0] = av_bswap24(src[i + 0]);
>> }
>>
>
> No, read the spec and see how it's done.
I have the spec but it's not really my field of expertise. Seeing as you
wrote a decoder and it was apparently integrated into VLC in 2010 maybe
you can offer some more specific pointers?
I can obtain sample files if required and can even chip in a limited
amount of cash (approx USD$300) to get the ball rolling.
--
Patrick Shirkey
Boost Hardware Ltd
More information about the ffmpeg-devel
mailing list