avfilter/vf_cropdetect: Factorize duplicated code using a macro

This simplifies subsequent changes

Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avutil/atomic: reuse ret to avoid dereferencing twice the same value.
vp9/x86: save one register in loopfilter surface coverage.
vp9/x86: make cglobal statement more conservative in register allocation.
vp9/x86: slightly simplify 44/48/84/88 h stores.
vp8/x86: remove unused register from ABSSUB_CMP macro.
vp9/x86: simplify ABSSUM_CMP by inverting the comparison meaning.
vp8/x86: move variable assigned inside macro branch.

The value is not used outside the branch.
vp9/x86: store unpacked intermediates for filter6/14 on stack.

filter16 goes from 508 to 482 (h) or 346 to 314 (v) cycles; filter88
goes from 240 to 238 (h) or 174 to 165 (v) cycles, measured on TOS.
vp8/x86: save one register in SIGN_ADD/SUB.
vp9/x86: make filter_44_v work on 32-bit.
vp9/x86: make filter_88_v work on 32-bit.
vp9/x86: make filter_48/84_v work on 32-bit.
vp9/x86: make filter_16_v work on 32-bit.
vp9/x86: make filter_44_h work on 32-bit.
vp9/x86: make filter_48/84/88_h work on 32-bit.
vp9/x86: make filter_16_h work on 32-bit.
vp9/x86: add myself to copyright holders for loopfilter assembly.
r210enc.c: Simplify and never store more than 10 bits.

The r10k and avrp decoders would previously store 12 bit precision
for the blue channel, which is inconsistent and probably not a
desirable behaviour.
Now the 2 unused extra bits are set to 0.
This is possibly not ideal either as RGBA1010102 format has the same
layout but stores alpha in these bits, thus explicitly setting them
to 1 might be preferable.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Merge remote-tracking branch 'rbultje/vp9-32bit-lpf'

* rbultje/vp9-32bit-lpf:
  vp9/x86: add myself to copyright holders for loopfilter assembly.
  vp9/x86: make filter_16_h work on 32-bit.
  vp9/x86: make filter_48/84/88_h work on 32-bit.
  vp9/x86: make filter_44_h work on 32-bit.
  vp9/x86: make filter_16_v work on 32-bit.
  vp9/x86: make filter_48/84_v work on 32-bit.
  vp9/x86: make filter_88_v work on 32-bit.
  vp9/x86: make filter_44_v work on 32-bit.
  vp8/x86: save one register in SIGN_ADD/SUB.
  vp9/x86: store unpacked intermediates for filter6/14 on stack.
  vp8/x86: move variable assigned inside macro branch.
  vp9/x86: simplify ABSSUM_CMP by inverting the comparison meaning.
  vp8/x86: remove unused register from ABSSUB_CMP macro.
  vp9/x86: slightly simplify 44/48/84/88 h stores.
  vp9/x86: make cglobal statement more conservative in register allocation.
  vp9/x86: save one register in loopfilter surface coverage.

Merged-by: Michael Niedermayer <michaelni@gmx.at>