[FFmpeg-devel] [PATCH] avfilter/vf_maskedmerge: add SIMD for maskedmerge with 8 bit depth input

James Darnley james.darnley at gmail.com
Thu Oct 1 19:55:59 CEST 2015


On 2015-10-01 19:25, Paul B Mahol wrote:
> +cglobal maskedmerge8, 10, 11, 3, 0, bsrc, blinesize, osrc, olinesize, msrc, mlinesize, dst, dlinesize, w, h

You need a guard to prevent this being compiled on x86.

> +    lea bsrcq, [bsrcq+blinesizeq]
> +    lea osrcq, [osrcq+olinesizeq]
> +    lea msrcq, [msrcq+mlinesizeq]
> +    lea dstq, [dstq+dlinesizeq]

> +    void (*maskedmerge)(const uint8_t *bsrc, int blinesize,
> +                        const uint8_t *osrc, int olinesize,
> +                        const uint8_t *msrc, int mlinesize,
> +                        uint8_t *dst, int dlinesize, int w, int h,
> +                        int half, int shift);

As I said briefly on IRC, you need to sign-extend (movsxd or the macro
movsxdifnidn) these integer linesize arguments before using the quadword
registers they sit in.  An alternative is to define the arguments as
ptrdiff_t types and let the compiler do that in the C code.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151001/d273565a/attachment.sig>


More information about the ffmpeg-devel mailing list