Skip to content

Fix C and x86 inverse ADST clipping

Henrik Gramner requested to merge gramner/dav1d:iadst_negate_clipping into master

Fixes #324 (closed). The rest of the x86 iadst asm uses pmulhrsw with a negative constant to combine negation and downshifting, and thus shouldn't run into any issues dealing with intermediate +32768 values without having to use more than 16-bit precision.

The Neon asm should be fine since it uses saturated 16-bit negation instructions which ends up being equivalent to "infinite precision" due to the rounding in the downshifting : (satsw(-(-0x8000)) + 1) >> 1 == (0x7fff + 1) >> 1 == 0x4000.

Edited by Ronald S. Bultje

Merge request reports

Loading