s += x * 4;
- video_orc_unpack_ABGR (dest, s, width);
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+ video_orc_unpack_ABGR_le (dest, s, width);
+#else
+ video_orc_unpack_ABGR_be (dest, s, width);
+#endif
}
static void
{
guint8 *restrict d = GET_LINE (y);
- video_orc_pack_ABGR (d, src, width);
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+ video_orc_pack_ABGR_le (d, src, width);
+#else
+ video_orc_pack_ABGR_be (d, src, width);
+#endif
}
#define PACK_RGBA GST_VIDEO_FORMAT_ARGB, unpack_RGBA, 1, pack_RGBA
s += x * 4;
- video_orc_unpack_RGBA (dest, s, width);
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+ video_orc_unpack_RGBA_le (dest, s, width);
+#else
+ video_orc_unpack_RGBA_be (dest, s, width);
+#endif
}
static void
{
guint8 *restrict d = GET_LINE (y);
- video_orc_pack_RGBA (d, src, width);
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+ video_orc_pack_RGBA_le (d, src, width);
+#else
+ video_orc_pack_RGBA_be (d, src, width);
+#endif
}
#define PACK_RGB GST_VIDEO_FORMAT_ARGB, unpack_RGB, 1, pack_RGB
swapl bgra, argb
-.function video_orc_pack_RGBA
+.function video_orc_pack_RGBA_le
.dest 4 rgba guint8
.source 4 argb guint8
.temp 4 a
shll r, r, 24
orl rgba, r, a
-.function video_orc_unpack_RGBA
+.function video_orc_unpack_RGBA_le
.dest 4 argb guint8
.source 4 rgba guint8
.temp 4 a
shrul r, r, 24
orl argb, r, a
-.function video_orc_unpack_ABGR
+.function video_orc_pack_RGBA_be
+.dest 4 rgba guint8
+.source 4 argb guint8
+.temp 4 a
+.temp 4 r
+
+loadl r, argb
+shrul a, r, 24
+shll r, r, 8
+orl rgba, r, a
+
+.function video_orc_unpack_RGBA_be
+.dest 4 argb guint8
+.source 4 rgba guint8
+.temp 4 a
+.temp 4 r
+
+loadl r, rgba
+shll a, r, 24
+shrul r, r, 8
+orl argb, r, a
+
+
+.function video_orc_unpack_ABGR_le
.dest 4 argb guint8
.source 4 abgr guint8
.temp 4 a
shrul r, r, 24
orl argb, r, a
-.function video_orc_pack_ABGR
+.function video_orc_pack_ABGR_le
.dest 4 abgr guint8
.source 4 argb guint8
.temp 4 a
shrul r, r, 24
orl abgr, r, a
+.function video_orc_unpack_ABGR_be
+.dest 4 argb guint8
+.source 4 abgr guint8
+.temp 4 a
+.temp 4 r
+
+swapl r, abgr
+shll a, r, 24
+shrul r, r, 8
+orl argb, r, a
+
+.function video_orc_pack_ABGR_be
+.dest 4 abgr guint8
+.source 4 argb guint8
+.temp 4 a
+.temp 4 r
+
+swapl r, argb
+shll a, r, 24
+shrul r, r, 8
+orl abgr, r, a
+
+
.function video_orc_unpack_NV12
.dest 8 d guint8
.source 2 y guint8