Re: [linux-audio-dev] acid, linux

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] acid, linux
From: Paul Barton-Davis (pbd_AT_Op.Net)
Date: to joulu  02 1999 - 14:24:41 EST


In message <3846AC1C.9582B45B_AT_ulster.net>you write:
>Paul Barton-Davis wrote:
>>
>> >2) When recording, I can use the -eaw effect (amplify w/ clip-control)
>> > in the recording chain to warn about clipping.
>>
>> someone should implement a logarithmic/exponential clipping function
>> that asymptotically approaches ((2^bits_per_sample)-1) once the sample
>> amplitude exceeds ((2^bits_per_sample)-some_threshold).
>
>Couldn't you just do this with waveshaping, using a table lookup?
>Use the input as the index, and fill the table with a straight line
>up to the threshold level, then some sort of curve beyond that (but

now that you mention, i think one can do it more space-efficiently
than this:

    if (*sample > threshold) {
         *sample = table[*sample-threshold];
    }

this doesn't save much for 16 bit samples, but if you're going to use,
say, 24 bit samples, do you really want a 16MB table for lookups ? not
me - i'd just use a table for values over the threshold.

and yes, missing the branch prediction on the conditional is
expensive, but its really not our job to worry about that :)

--p


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:23:26 EST