On 9/3/2016 11:07 AM, James Almer wrote:
>> > +
>> > +    /* avoid integer overflow in the loop below. */
>> > +    if (length > (UINT_MAX / 128U)) return AVERROR(EINVAL);
>> > +
>> > +    /* across 64 segments of the incoming data,
>> > +     * do a running crc of each segment and store the crc as the state 
>> > for that slot.
>> > +     * this works even if the length of the segment is 0 bytes. */
>> > +    beg = 0;
>> > +    for (segm = 0;segm < 64;segm++) {
>> > +        end = (((segm + 1) * length) / 64);
>> > +        crc = av_crc(avcrc, crc, data + beg, end - beg);
> The thing about speed made me wonder, wouldn't using adler32 be faster?

Nevermind, probably not a good idea. adler32 wouldn't be a good seed
for lfg.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to