Add support for non-x86 architectures

Hi, I’ve packaged MotionBox for openSUSE linux and I’ve noticed it cannot be built on ppc64 or aarch64 on account of SSE2 instructions being used.
It seems to me they’re borrowed from the vlc i420_rgb_x86 module, so I was wondering if the generic i420_rgb could likewise be re-purposed.
Or perhaps there would be too much of a performance hit?

Regards

Greetings,

This is related to this: https://github.com/omega-gg/Sky/blob/master/src/SkMedia/src/media/WBackendVlc.cpp#L752

I’m using an SSE2_CALL to convert YUV images to RGB. I have a software alternative but it’s slower as far as I can remember.

Maybe we could use another instruction when the ppc64 or aarch64 is used to build SkMedia.

I saw a conversion reference guide for SSE2 to Altivec, but I haven’t touched any asm in years.

Is the platform-independent version really unusable?

The quick fix would be to force “software” version when on ppc64 or aarch64. I’m not sure about the defines I should use with gcc.

I should also mention I haven’t tested the code on non x86 architectures.

Perhaps I could get someone to test it, is this alternative version already in the source tree?

You would have to replace convertFrameSse with convertFrameSoftware.

Like I said it’s not implemented at the moment so you would have to make a pull request with the proper defines.