[FFmpeg-devel] st 0339-2008 format support

Patrick Shirkey pshirkey at boosthardware.com
Sat Oct 27 18:38:48 CEST 2012


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]);
}


--
Patrick Shirkey
Boost Hardware Ltd


More information about the ffmpeg-devel mailing list