[FFmpeg-devel] [PATCH] Add CRC check to ALS decoder

Måns Rullgård mans
Mon Jun 14 14:18:40 CEST 2010


Thilo Borgmann <thilo.borgmann at googlemail.com> writes:

> Am 13.06.10 19:51, schrieb M?ns Rullg?rd:
>>> +    // update CRC
>>> +    if (sconf->crc_enabled && avctx->error_recognition >= FF_ER_CAREFUL) {
>>> +        int swap = HAVE_BIGENDIAN != sconf->msb_first;
>>> +
>>> +        #define CONVERT_OUTPUT(bps)                                \
>>> +        {                                                          \
>>> +            int##bps##_t *src  = (int##bps##_t*) data;             \
>>> +            int##bps##_t *dest = (int##bps##_t*) ctx->crc_buffer;  \
>>> +            for (sample = 0;                                       \
>>> +                 sample < ctx->cur_frame_length * avctx->channels; \
>>> +                 sample++)                                         \
>>> +                    *dest++ = bswap_##bps (src[sample]);           \
>>> +        }
>> 
>> Use bswap_buf from dsputil after adding a 16-bit version.
>
> There already is a 16-bit case.

What do you mean?  I posted a patch adding a 16-bit block bswap to
dsputil.  Once that is applied, you can use it.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list