On Sun, Sep 10, 2017 at 5:17 PM, Martin Vignali <martin.vign...@gmail.com> wrote: > + void (*reorder_pixels)(uint8_t *src, uint8_t *dst, int size);
size should be ptrdiff_t instead of int since it's used as a 64-bit operand in the asm on x86-64 and the upper 32 bits are undefined otherwise. > +++ b/libavcodec/x86/exrdsp.asm Couldn't this be simplified to something like: %macro REORDER_PIXELS 0 cglobal reorder_pixels, 3,4,3, src1, dst, size, src2 lea src2q, [src1q+sizeq] add dstq, sizeq shr sizeq, 1 add src1q, sizeq neg sizeq .loop: mova m0, [src1q+sizeq] movu m1, [src2q+sizeq] SBUTTERFLY bw, 0, 1, 2 mova [dstq+2*sizeq ], xm0 mova [dstq+2*sizeq+16], xm1 %if mmsize == 32 vperm2i128 m0, m0, m1, 0x31 mova [dstq+2*sizeq+32], m0 %endif add sizeq, mmsize jl .loop RET %endmacro (completely untested) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel