Skip to content

x86/filmgrain: simplify post-horizontal filter blending

Ronald S. Bultje requested to merge rbultje/dav1d:fg_simplify_blending into master

This commit makes a handful of minor changes:

  • in horizontal blending, use shufps or vpblendd. If we change fewer pixels than can be used as one source operand for the given instruction (8 or 4 bytes), we abuse 0,32 as a edge/cur pair weight, so that the resulting blended register contains an unmodified cur grain. This replaces more complicated vpblendw + vpblendd or pand/pandn/por blending combinations.
  • for scaling LUTs, always use psrld instead of pand, since the latter requires a register.
Edited by Ronald S. Bultje

Merge request reports