summaryrefslogtreecommitdiffstats
path: root/ext/hermes
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2002-03-19 04:10:06 +0000
committerAndy Wingo <wingo@pobox.com>2002-03-19 04:10:06 +0000
commit4359de26166000e317604b6b20283c79dd2a0521 (patch)
treebc587b41e92b76e4f12e5e11984989e4e89d9935 /ext/hermes
parent0dc999da00ffc311ee1fc040ab754dab6660f2c7 (diff)
downloadgst-plugins-bad-4359de26166000e317604b6b20283c79dd2a0521.tar.gz
gst-plugins-bad-4359de26166000e317604b6b20283c79dd2a0521.tar.bz2
gst-plugins-bad-4359de26166000e317604b6b20283c79dd2a0521.zip
removal of //-style comments don't link plugins to core libs -- the versioning is done internally to the plugins with...
Original commit message from CVS: * removal of //-style comments * don't link plugins to core libs -- the versioning is done internally to the plugins with the plugin_info struct, and symbol resolution is lazy, so we can always know if a plugin can be loaded by the plugin_info data. in theory.
Diffstat (limited to 'ext/hermes')
-rw-r--r--ext/hermes/Makefile.am2
-rw-r--r--ext/hermes/gstcolorspace.c4
-rw-r--r--ext/hermes/gstcolorspace.h2
-rw-r--r--ext/hermes/yuv2rgb.c244
-rw-r--r--ext/hermes/yuv2yuv.c2
5 files changed, 127 insertions, 127 deletions
diff --git a/ext/hermes/Makefile.am b/ext/hermes/Makefile.am
index 60b0af54..f178a29f 100644
--- a/ext/hermes/Makefile.am
+++ b/ext/hermes/Makefile.am
@@ -16,7 +16,7 @@ endif
libgstcolorspace_la_SOURCES = gstcolorspace.c yuv2yuv.c yuv2rgb.c rgb2yuv.c $(ARCHSRCS)
libgstcolorspace_la_CFLAGS = $(GST_CFLAGS)
-libgstcolorspace_la_LIBADD = $(GST_LIBS) $(PLUGIN_EXTRA_LIBS)
+libgstcolorspace_la_LIBADD = $(PLUGIN_EXTRA_LIBS)
libgstcolorspace_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstcolorspace.h yuv2rgb.h
diff --git a/ext/hermes/gstcolorspace.c b/ext/hermes/gstcolorspace.c
index 69ef4dab..7b35f900 100644
--- a/ext/hermes/gstcolorspace.c
+++ b/ext/hermes/gstcolorspace.c
@@ -97,7 +97,7 @@ static void gst_colorspace_chain (GstPad *pad, GstBuffer *buf);
static GstElementStateReturn
gst_colorspace_change_state (GstElement *element);
-// FIXME
+/* FIXME */
extern void gst_colorspace_yuy2_to_i420 (unsigned char *src, unsigned char *dest,
guint width, guint height);
extern void gst_colorspace_rgb32_to_i420 (unsigned char *src, unsigned char *dest,
@@ -106,7 +106,7 @@ extern void gst_colorspace_rgb32_to_yv12 (unsigned char *src, unsigned char *de
guint width, guint height);
static GstElementClass *parent_class = NULL;
-//static guint gst_colorspace_signals[LAST_SIGNAL] = { 0 };
+/*static guint gst_colorspace_signals[LAST_SIGNAL] = { 0 }; */
static GstBufferPool*
colorspace_get_bufferpool (GstPad *pad)
diff --git a/ext/hermes/gstcolorspace.h b/ext/hermes/gstcolorspace.h
index ca345fde..4a56e369 100644
--- a/ext/hermes/gstcolorspace.h
+++ b/ext/hermes/gstcolorspace.h
@@ -30,7 +30,7 @@
# include <Hermes/Hermes.h>
#endif
-// #include <gst/meta/audioraw.h>
+/* #include <gst/meta/audioraw.h> */
#ifdef __cplusplus
diff --git a/ext/hermes/yuv2rgb.c b/ext/hermes/yuv2rgb.c
index 0b5a9b4c..fb1da7f1 100644
--- a/ext/hermes/yuv2rgb.c
+++ b/ext/hermes/yuv2rgb.c
@@ -24,7 +24,7 @@
#include "yuv2rgb.h"
-//#undef HAVE_LIBMMX
+/*#undef HAVE_LIBMMX */
#ifdef HAVE_LIBMMX
#include "mmx.h"
@@ -116,7 +116,7 @@ gst_colorspace_yuv2rgb_get_converter (GstCaps *from, GstCaps *to)
to_space = gst_caps_get_fourcc_int (to, "format");
to_bpp = gst_caps_get_int (to, "bpp");
- // FIXME we leak new here.
+ /* FIXME we leak new here. */
g_return_val_if_fail (to_space == GST_STR_FOURCC ("RGB "), NULL);
switch(from_space) {
@@ -186,9 +186,9 @@ static void gst_colorspace_yuv420P_to_rgb32(GstColorSpaceConverter *space, unsig
size = space->width * space->height;
gst_colorspace_yuv_to_rgb32(space->color_tables,
- src, // Y component
- src+size, // cr component
- src+size+(size>>2), // cb component
+ src, /* Y component */
+ src+size, /* cr component */
+ src+size+(size>>2), /* cb component */
dest,
space->height,
space->width);
@@ -202,9 +202,9 @@ static void gst_colorspace_yuv420P_to_rgb24(GstColorSpaceConverter *space, unsig
size = space->width * space->height;
gst_colorspace_yuv_to_rgb24(space->color_tables,
- src, // Y component
- src+size, // cr component
- src+size+(size>>2), // cb component
+ src, /* Y component */
+ src+size, /* cr component */
+ src+size+(size>>2), /* cb component */
dest,
space->height,
space->width);
@@ -218,9 +218,9 @@ static void gst_colorspace_yuv420P_to_rgb16(GstColorSpaceConverter *space, unsig
size = space->width * space->height;
gst_colorspace_yuv_to_rgb16(space->color_tables,
- src, // Y component
- src+size, // cr component
- src+size+(size>>2), // cb component
+ src, /* Y component */
+ src+size, /* cr component */
+ src+size+(size>>2), /* cb component */
dest,
space->height,
space->width);
@@ -235,9 +235,9 @@ static void gst_colorspace_yuv420P_to_bgr32_mmx(GstColorSpaceConverter *space, u
size = space->width * space->height;
gst_colorspace_yuv_to_bgr32_mmx(NULL,
- src, // Y component
- src+size, // cr component
- src+size+(size>>2), // cb component
+ src, /* Y component */
+ src+size, /* cr component */
+ src+size+(size>>2), /* cb component */
dest,
space->height,
space->width);
@@ -250,9 +250,9 @@ static void gst_colorspace_yuv420P_to_bgr16_mmx(GstColorSpaceConverter *space, u
size = space->width * space->height;
gst_colorspace_yuv_to_bgr16_mmx(NULL,
- src, // Y component
- src+size, // cr component
- src+size+(size>>2), // cb component
+ src, /* Y component */
+ src+size, /* cr component */
+ src+size+(size>>2), /* cb component */
dest,
space->height,
space->width);
@@ -675,10 +675,10 @@ gst_colorspace_yuv_to_rgb32(tables, lum, cb, cr, out, rows, cols)
}
#ifdef HAVE_LIBMMX
-static mmx_t MMX_80w = (mmx_t)(long long)0x0080008000800080LL; //dd 00080 0080h, 000800080h
+static mmx_t MMX_80w = (mmx_t)(long long)0x0080008000800080LL; /*dd 00080 0080h, 000800080h */
-static mmx_t MMX_00FFw = (mmx_t)(long long)0x00ff00ff00ff00ffLL; //dd 000FF 00FFh, 000FF00FFh
-static mmx_t MMX_FF00w = (mmx_t)(long long)0xff00ff00ff00ff00LL; //dd 000FF 00FFh, 000FF00FFh
+static mmx_t MMX_00FFw = (mmx_t)(long long)0x00ff00ff00ff00ffLL; /*dd 000FF 00FFh, 000FF00FFh */
+static mmx_t MMX_FF00w = (mmx_t)(long long)0xff00ff00ff00ff00LL; /*dd 000FF 00FFh, 000FF00FFh */
static mmx_t MMX32_Vredcoeff = (mmx_t)(long long)0x0059005900590059LL;
static mmx_t MMX32_Ubluecoeff = (mmx_t)(long long)0x0072007200720072LL;
@@ -695,7 +695,7 @@ gst_colorspace_yuv_to_bgr32_mmx(tables, lum, cr, cb, out, rows, cols)
int cols, rows;
{
- guint32 *row1 = (guint32 *)out; // 32 bit target
+ guint32 *row1 = (guint32 *)out; /* 32 bit target */
int cols4 = cols>>2;
int y, x;
@@ -703,109 +703,109 @@ gst_colorspace_yuv_to_bgr32_mmx(tables, lum, cr, cb, out, rows, cols)
for (y=rows>>1; y; y--) {
for (x=cols4; x; x--) {
- // create Cr (result in mm1)
- movd_m2r(*(mmx_t *)cb, mm1); // 0 0 0 0 v3 v2 v1 v0
- pxor_r2r(mm7, mm7); // 00 00 00 00 00 00 00 00
- movd_m2r(*(mmx_t *)lum, mm2); // 0 0 0 0 l3 l2 l1 l0
- punpcklbw_r2r(mm7, mm1); // 0 v3 0 v2 00 v1 00 v0
- punpckldq_r2r(mm1, mm1); // 00 v1 00 v0 00 v1 00 v0
- psubw_m2r(MMX_80w, mm1); // mm1-128:r1 r1 r0 r0 r1 r1 r0 r0
-
- // create Cr_g (result in mm0)
- movq_r2r(mm1, mm0); // r1 r1 r0 r0 r1 r1 r0 r0
- pmullw_m2r(MMX32_Vgrncoeff, mm0); // red*-46dec=0.7136*64
- pmullw_m2r(MMX32_Vredcoeff, mm1); // red*89dec=1.4013*64
- psraw_i2r(6, mm0); // red=red/64
- psraw_i2r(6, mm1); // red=red/64
+ /* create Cr (result in mm1) */
+ movd_m2r(*(mmx_t *)cb, mm1); /* 0 0 0 0 v3 v2 v1 v0 */
+ pxor_r2r(mm7, mm7); /* 00 00 00 00 00 00 00 00 */
+ movd_m2r(*(mmx_t *)lum, mm2); /* 0 0 0 0 l3 l2 l1 l0 */
+ punpcklbw_r2r(mm7, mm1); /* 0 v3 0 v2 00 v1 00 v0 */
+ punpckldq_r2r(mm1, mm1); /* 00 v1 00 v0 00 v1 00 v0 */
+ psubw_m2r(MMX_80w, mm1); /* mm1-128:r1 r1 r0 r0 r1 r1 r0 r0 */
+
+ /* create Cr_g (result in mm0) */
+ movq_r2r(mm1, mm0); /* r1 r1 r0 r0 r1 r1 r0 r0 */
+ pmullw_m2r(MMX32_Vgrncoeff, mm0); /* red*-46dec=0.7136*64 */
+ pmullw_m2r(MMX32_Vredcoeff, mm1); /* red*89dec=1.4013*64 */
+ psraw_i2r(6, mm0); /* red=red/64 */
+ psraw_i2r(6, mm1); /* red=red/64 */
- // create L1 L2 (result in mm2,mm4)
- // L2=lum+cols
- movq_m2r(*(mmx_t *)(lum+cols),mm3); // 0 0 0 0 L3 L2 L1 L0
- punpckldq_r2r(mm3, mm2); // L3 L2 L1 L0 l3 l2 l1 l0
- movq_r2r(mm2, mm4); // L3 L2 L1 L0 l3 l2 l1 l0
- pand_m2r(MMX_FF00w, mm2); // L3 0 L1 0 l3 0 l1 0
- pand_m2r(MMX_00FFw, mm4); // 0 L2 0 L0 0 l2 0 l0
- psrlw_i2r(8, mm2); // 0 L3 0 L1 0 l3 0 l1
-
- // create R (result in mm6)
- movq_r2r(mm2, mm5); // 0 L3 0 L1 0 l3 0 l1
- movq_r2r(mm4, mm6); // 0 L2 0 L0 0 l2 0 l0
- paddsw_r2r(mm1, mm5); // lum1+red:x R3 x R1 x r3 x r1
- paddsw_r2r(mm1, mm6); // lum1+red:x R2 x R0 x r2 x r0
- packuswb_r2r(mm5, mm5); // R3 R1 r3 r1 R3 R1 r3 r1
- packuswb_r2r(mm6, mm6); // R2 R0 r2 r0 R2 R0 r2 r0
- pxor_r2r(mm7, mm7); // 00 00 00 00 00 00 00 00
- punpcklbw_r2r(mm5, mm6); // R3 R2 R1 R0 r3 r2 r1 r0
-
- // create Cb (result in mm1)
- movd_m2r(*(mmx_t *)cr, mm1); // 0 0 0 0 u3 u2 u1 u0
- punpcklbw_r2r(mm7, mm1); // 0 u3 0 u2 00 u1 00 u0
- punpckldq_r2r(mm1, mm1); // 00 u1 00 u0 00 u1 00 u0
- psubw_m2r(MMX_80w, mm1); // mm1-128:u1 u1 u0 u0 u1 u1 u0 u0
- // create Cb_g (result in mm5)
- movq_r2r(mm1, mm5); // u1 u1 u0 u0 u1 u1 u0 u0
- pmullw_m2r(MMX32_Ugrncoeff, mm5); // blue*-109dec=1.7129*64
- pmullw_m2r(MMX32_Ubluecoeff, mm1); // blue*114dec=1.78125*64
- psraw_i2r(6, mm5); // blue=red/64
- psraw_i2r(6, mm1); // blue=blue/64
-
- // create G (result in mm7)
- movq_r2r(mm2, mm3); // 0 L3 0 L1 0 l3 0 l1
- movq_r2r(mm4, mm7); // 0 L2 0 L0 0 l2 0 l1
- paddsw_r2r(mm5, mm3); // lum1+Cb_g:x G3t x G1t x g3t x g1t
- paddsw_r2r(mm5, mm7); // lum1+Cb_g:x G2t x G0t x g2t x g0t
- paddsw_r2r(mm0, mm3); // lum1+Cr_g:x G3 x G1 x g3 x g1
- paddsw_r2r(mm0, mm7); // lum1+blue:x G2 x G0 x g2 x g0
- packuswb_r2r(mm3, mm3); // G3 G1 g3 g1 G3 G1 g3 g1
- packuswb_r2r(mm7, mm7); // G2 G0 g2 g0 G2 G0 g2 g0
- punpcklbw_r2r(mm3, mm7); // G3 G2 G1 G0 g3 g2 g1 g0
-
- // create B (result in mm5)
- movq_r2r(mm2, mm3); // 0 L3 0 L1 0 l3 0 l1
- movq_r2r(mm4, mm5); // 0 L2 0 L0 0 l2 0 l1
- paddsw_r2r(mm1, mm3); // lum1+blue:x B3 x B1 x b3 x b1
- paddsw_r2r(mm1, mm5); // lum1+blue:x B2 x B0 x b2 x b0
- packuswb_r2r(mm3, mm3); // B3 B1 b3 b1 B3 B1 b3 b1
- packuswb_r2r(mm5, mm5); // B2 B0 b2 b0 B2 B0 b2 b0
- punpcklbw_r2r(mm3, mm5); // B3 B2 B1 B0 b3 b2 b1 b0
-
- // fill destination row1 (needed are mm6=Rr,mm7=Gg,mm5=Bb)
-
- pxor_r2r(mm2, mm2); // 0 0 0 0 0 0 0 0
- pxor_r2r(mm4, mm4); // 0 0 0 0 0 0 0 0
- movq_r2r(mm6, mm1); // R3 R2 R1 R0 r3 r2 r1 r0
- movq_r2r(mm5, mm3); // B3 B2 B1 B0 b3 b2 b1 b0
- // process lower lum
- punpcklbw_r2r(mm4, mm1); // 0 r3 0 r2 0 r1 0 r0
- punpcklbw_r2r(mm4, mm3); // 0 b3 0 b2 0 b1 0 b0
- movq_r2r(mm1, mm2); // 0 r3 0 r2 0 r1 0 r0
- movq_r2r(mm3, mm0); // 0 b3 0 b2 0 b1 0 b0
- punpcklwd_r2r(mm1, mm3); // 0 r1 0 b1 0 r0 0 b0
- punpckhwd_r2r(mm2, mm0); // 0 r3 0 b3 0 r2 0 b2
-
- pxor_r2r(mm2, mm2); // 0 0 0 0 0 0 0 0
- movq_r2r(mm7, mm1); // G3 G2 G1 G0 g3 g2 g1 g0
- punpcklbw_r2r(mm1, mm2); // g3 0 g2 0 g1 0 g0 0
- punpcklwd_r2r(mm4, mm2); // 0 0 g1 0 0 0 g0 0
- por_r2r(mm3, mm2); // 0 r1 g1 b1 0 r0 g0 b0
- movq_r2m(mm2, *(mmx_t *)row1); // wrote out ! row1
-
- pxor_r2r(mm2, mm2); // 0 0 0 0 0 0 0 0
- punpcklbw_r2r(mm1, mm4); // g3 0 g2 0 g1 0 g0 0
- punpckhwd_r2r(mm2, mm4); // 0 0 g3 0 0 0 g2 0
- por_r2r(mm0, mm4); // 0 r3 g3 b3 0 r2 g2 b2
- movq_r2m(mm4, *(mmx_t *)(row1+2)); // wrote out ! row1
+ /* create L1 L2 (result in mm2,mm4) */
+ /* L2=lum+cols */
+ movq_m2r(*(mmx_t *)(lum+cols),mm3); /* 0 0 0 0 L3 L2 L1 L0 */
+ punpckldq_r2r(mm3, mm2); /* L3 L2 L1 L0 l3 l2 l1 l0 */
+ movq_r2r(mm2, mm4); /* L3 L2 L1 L0 l3 l2 l1 l0 */
+ pand_m2r(MMX_FF00w, mm2); /* L3 0 L1 0 l3 0 l1 0 */
+ pand_m2r(MMX_00FFw, mm4); /* 0 L2 0 L0 0 l2 0 l0 */
+ psrlw_i2r(8, mm2); /* 0 L3 0 L1 0 l3 0 l1 */
+
+ /* create R (result in mm6) */
+ movq_r2r(mm2, mm5); /* 0 L3 0 L1 0 l3 0 l1 */
+ movq_r2r(mm4, mm6); /* 0 L2 0 L0 0 l2 0 l0 */
+ paddsw_r2r(mm1, mm5); /* lum1+red:x R3 x R1 x r3 x r1 */
+ paddsw_r2r(mm1, mm6); /* lum1+red:x R2 x R0 x r2 x r0 */
+ packuswb_r2r(mm5, mm5); /* R3 R1 r3 r1 R3 R1 r3 r1 */
+ packuswb_r2r(mm6, mm6); /* R2 R0 r2 r0 R2 R0 r2 r0 */
+ pxor_r2r(mm7, mm7); /* 00 00 00 00 00 00 00 00 */
+ punpcklbw_r2r(mm5, mm6); /* R3 R2 R1 R0 r3 r2 r1 r0 */
+
+ /* create Cb (result in mm1) */
+ movd_m2r(*(mmx_t *)cr, mm1); /* 0 0 0 0 u3 u2 u1 u0 */
+ punpcklbw_r2r(mm7, mm1); /* 0 u3 0 u2 00 u1 00 u0 */
+ punpckldq_r2r(mm1, mm1); /* 00 u1 00 u0 00 u1 00 u0 */
+ psubw_m2r(MMX_80w, mm1); /* mm1-128:u1 u1 u0 u0 u1 u1 u0 u0 */
+ /* create Cb_g (result in mm5) */
+ movq_r2r(mm1, mm5); /* u1 u1 u0 u0 u1 u1 u0 u0 */
+ pmullw_m2r(MMX32_Ugrncoeff, mm5); /* blue*-109dec=1.7129*64 */
+ pmullw_m2r(MMX32_Ubluecoeff, mm1); /* blue*114dec=1.78125*64 */
+ psraw_i2r(6, mm5); /* blue=red/64 */
+ psraw_i2r(6, mm1); /* blue=blue/64 */
+
+ /* create G (result in mm7) */
+ movq_r2r(mm2, mm3); /* 0 L3 0 L1 0 l3 0 l1 */
+ movq_r2r(mm4, mm7); /* 0 L2 0 L0 0 l2 0 l1 */
+ paddsw_r2r(mm5, mm3); /* lum1+Cb_g:x G3t x G1t x g3t x g1t */
+ paddsw_r2r(mm5, mm7); /* lum1+Cb_g:x G2t x G0t x g2t x g0t */
+ paddsw_r2r(mm0, mm3); /* lum1+Cr_g:x G3 x G1 x g3 x g1 */
+ paddsw_r2r(mm0, mm7); /* lum1+blue:x G2 x G0 x g2 x g0 */
+ packuswb_r2r(mm3, mm3); /* G3 G1 g3 g1 G3 G1 g3 g1 */
+ packuswb_r2r(mm7, mm7); /* G2 G0 g2 g0 G2 G0 g2 g0 */
+ punpcklbw_r2r(mm3, mm7); /* G3 G2 G1 G0 g3 g2 g1 g0 */
+
+ /* create B (result in mm5) */
+ movq_r2r(mm2, mm3); /* 0 L3 0 L1 0 l3 0 l1 */
+ movq_r2r(mm4, mm5); /* 0 L2 0 L0 0 l2 0 l1 */
+ paddsw_r2r(mm1, mm3); /* lum1+blue:x B3 x B1 x b3 x b1 */
+ paddsw_r2r(mm1, mm5); /* lum1+blue:x B2 x B0 x b2 x b0 */
+ packuswb_r2r(mm3, mm3); /* B3 B1 b3 b1 B3 B1 b3 b1 */
+ packuswb_r2r(mm5, mm5); /* B2 B0 b2 b0 B2 B0 b2 b0 */
+ punpcklbw_r2r(mm3, mm5); /* B3 B2 B1 B0 b3 b2 b1 b0 */
+
+ /* fill destination row1 (needed are mm6=Rr,mm7=Gg,mm5=Bb) */
+
+ pxor_r2r(mm2, mm2); /* 0 0 0 0 0 0 0 0 */
+ pxor_r2r(mm4, mm4); /* 0 0 0 0 0 0 0 0 */
+ movq_r2r(mm6, mm1); /* R3 R2 R1 R0 r3 r2 r1 r0 */
+ movq_r2r(mm5, mm3); /* B3 B2 B1 B0 b3 b2 b1 b0 */
+ /* process lower lum */
+ punpcklbw_r2r(mm4, mm1); /* 0 r3 0 r2 0 r1 0 r0 */
+ punpcklbw_r2r(mm4, mm3); /* 0 b3 0 b2 0 b1 0 b0 */
+ movq_r2r(mm1, mm2); /* 0 r3 0 r2 0 r1 0 r0 */
+ movq_r2r(mm3, mm0); /* 0 b3 0 b2 0 b1 0 b0 */
+ punpcklwd_r2r(mm1, mm3); /* 0 r1 0 b1 0 r0 0 b0 */
+ punpckhwd_r2r(mm2, mm0); /* 0 r3 0 b3 0 r2 0 b2 */
+
+ pxor_r2r(mm2, mm2); /* 0 0 0 0 0 0 0 0 */
+ movq_r2r(mm7, mm1); /* G3 G2 G1 G0 g3 g2 g1 g0 */
+ punpcklbw_r2r(mm1, mm2); /* g3 0 g2 0 g1 0 g0 0 */
+ punpcklwd_r2r(mm4, mm2); /* 0 0 g1 0 0 0 g0 0 */
+ por_r2r(mm3, mm2); /* 0 r1 g1 b1 0 r0 g0 b0 */
+ movq_r2m(mm2, *(mmx_t *)row1); /* wrote out ! row1 */
+
+ pxor_r2r(mm2, mm2); /* 0 0 0 0 0 0 0 0 */
+ punpcklbw_r2r(mm1, mm4); /* g3 0 g2 0 g1 0 g0 0 */
+ punpckhwd_r2r(mm2, mm4); /* 0 0 g3 0 0 0 g2 0 */
+ por_r2r(mm0, mm4); /* 0 r3 g3 b3 0 r2 g2 b2 */
+ movq_r2m(mm4, *(mmx_t *)(row1+2)); /* wrote out ! row1 */
- // fill destination row2 (needed are mm6=Rr,mm7=Gg,mm5=Bb)
- // this can be done "destructive"
- pxor_r2r(mm2, mm2); // 0 0 0 0 0 0 0 0
- punpckhbw_r2r(mm2, mm6); // 0 R3 0 R2 0 R1 0 R0
- punpckhbw_r2r(mm1, mm5); // G3 B3 G2 B2 G1 B1 G0 B0
- movq_r2r(mm5, mm1); // G3 B3 G2 B2 G1 B1 G0 B0
- punpcklwd_r2r(mm6, mm1); // 0 R1 G1 B1 0 R0 G0 B0
- movq_r2m(mm1, *(mmx_t *)(row1+cols)); // wrote out ! row2
- punpckhwd_r2r(mm6, mm5); // 0 R3 G3 B3 0 R2 G2 B2
- movq_r2m(mm5, *(mmx_t *)(row1+cols+2)); // wrote out ! row2
+ /* fill destination row2 (needed are mm6=Rr,mm7=Gg,mm5=Bb) */
+ /* this can be done "destructive" */
+ pxor_r2r(mm2, mm2); /* 0 0 0 0 0 0 0 0 */
+ punpckhbw_r2r(mm2, mm6); /* 0 R3 0 R2 0 R1 0 R0 */
+ punpckhbw_r2r(mm1, mm5); /* G3 B3 G2 B2 G1 B1 G0 B0 */
+ movq_r2r(mm5, mm1); /* G3 B3 G2 B2 G1 B1 G0 B0 */
+ punpcklwd_r2r(mm6, mm1); /* 0 R1 G1 B1 0 R0 G0 B0 */
+ movq_r2m(mm1, *(mmx_t *)(row1+cols)); /* wrote out ! row2 */
+ punpckhwd_r2r(mm6, mm5); /* 0 R3 G3 B3 0 R2 G2 B2 */
+ movq_r2m(mm5, *(mmx_t *)(row1+cols+2)); /* wrote out ! row2 */
lum+=4;
cr+=2;
diff --git a/ext/hermes/yuv2yuv.c b/ext/hermes/yuv2yuv.c
index bec60c8a..4f13a9d4 100644
--- a/ext/hermes/yuv2yuv.c
+++ b/ext/hermes/yuv2yuv.c
@@ -24,7 +24,7 @@
#include <gst/gst.h>
-//#undef HAVE_LIBMMX
+/*#undef HAVE_LIBMMX */
#ifdef HAVE_LIBMMX
#include "mmx.h"