liborc question

Jérôme Laheurte jerome-bugzilla at jeromelaheurte.net
Tue Sep 29 08:47:37 PDT 2015


> Le 29 sept. 2015 à 12:43, Peter Maersk-Moller <pmaersk at gmail.com> a écrit :
> 
> Hi Jérôme.
> 
> On Mon, Sep 28, 2015 at 6:39 PM, Jérôme Laheurte <jerome-bugzilla at jeromelaheurte.net <mailto:jerome-bugzilla at jeromelaheurte.net>> wrote:
> Unless something has drastically changed since the last time I wrote Orc code, that is not possible; source and destination pointers are incremented by the « register » size, which must be a power of 2 up to eight, I think; three is out of the question.
> 
> So operating on an array of 3 bytes per pixels such as the RGB/BGR layout with the byte array layout RGBRGBRGB... is really difficult or near impossible?
> 
> And if that is the case, if one wants to use orc, the array needs to be conerted into something like RGB.RGB.RGB. etc. with an extra byte? And such a conversion can't really be done much faster than with a loop like this
> 
> for (int i=0 ; i < N ; i++) {
>   *dst++ = *src++;
>   *dst++ = *src++;
>   *dst++ = *src++;
>   *dst++ = 255;
> };
> 
> which to begin with was what I wanted orc to substitute using SIMDs commands.
> 
> Is that more or less the conclusion?

Exactly. Directly using SIMD code like MMX/SSE2/etc in raw assembly allows you to do this kind of stuff by mixing SIMD and regular instructions and doing various tricks that are not possible in the purely vector-oriented Orc world, but of course you’d loose the portability advantage.

Best regards
Jérôme Laheurte

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150929/00f58bbd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150929/00f58bbd/attachment.sig>


More information about the gstreamer-devel mailing list