[Libre-soc-dev] new svp64 page

Luke Kenneth Casson Leighton lkcl at lkcl.net
Sat Dec 12 09:43:43 GMT 2020


On 12/12/20, Lauri Kasanen <cand at gmx.com> wrote:
> On Fri, 11 Dec 2020 18:58:51 +0000
> Luke Kenneth Casson Leighton <lkcl at lkcl.net> wrote:
>
>> Lauri can i ask: how common is clamped arithmetic in AV? i think i
>> know the answer (very) however in any given algorithm, what percentage
>> of operations are clamped?
>>
>> if it is "30%" per audio sample then clearly that weighs strongly in
>> favour of the extra 2 bits.  if however it is only say 2% then
>> honestly we have higher priorities to weigh.
>
> 10-20%? Pathological cases higher.

ok. worth it.

> But as Jacob says, the clamp width is
> always the dest width. Hence why I said to use the dest elwidth for
> clamping.

ok now very confused.

> Is there any reason why we can't use it?

not that i know of.

> u16 * u16 = u8 means exactly that. Inputs 16-bit, operation 16-bit,
> destination 8-bit. Dest width = clamp width.

not the way i'd expressed it before.

so.

* src is N
* op is @ src width
* sat/clamp is from src to dest width
* output is at dest width

correct?

l.



More information about the Libre-soc-dev mailing list