Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/common
Modified Files:
evas_convert_yuv.c
Log Message:
more comments
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_convert_yuv.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_convert_yuv.c 10 Dec 2003 01:35:37 -0000 1.2
+++ evas_convert_yuv.c 10 Dec 2003 06:55:18 -0000 1.3
@@ -107,6 +107,12 @@
/* from mmx I think :( It might be possible to use SSE and SSE2 here, but */
/* I haven't tried yet. Let's see. */
+/* NB: XviD has almost the same code in it's assembly YV12->RGB code. same */
+/* algorithm, same constants, same all over actually, except it actually */
+/* does a few extra memory accesses that this one doesn't, so in theory */
+/* this code should be faster. In the end it's all just an mmx version of */
+/* the reference implimentation done with fixed point math */
+
static void
_evas_yv12torgb_mmx(unsigned char **yuv, unsigned char *rgb, int w, int h)
{
@@ -126,21 +132,20 @@
vp = yuv[h + (h / 2) + (yy / 2)];
for (xx = 0; xx < (w - 7); xx += 8)
{
+ movd_m2r(*up, mm3);
+ movd_m2r(*vp, mm2);
movq_m2r(*yp1, mm0);
+
+ pxor_r2r(mm7, mm7);
+ punpcklbw_r2r(mm7, mm2);
+ punpcklbw_r2r(mm7, mm3);
+
movq_r2r(mm0, mm1);
psrlw_i2r(8, mm0);
psllw_i2r(8, mm1);
psrlw_i2r(8, mm1);
- pxor_r2r(mm7, mm7);
- movd_m2r(*up, mm3);
- movd_m2r(*vp, mm2);
-
- punpcklbw_r2r(mm7, mm2);
- punpcklbw_r2r(mm7, mm3);
-
movq_m2r(CONST_16, mm4);
-
psubsw_r2r(mm4, mm0);
psubsw_r2r(mm4, mm1);
@@ -154,13 +159,10 @@
movq_m2r(CONST_CRVCRV, mm7);
pmullw_r2r(mm3, mm7);
-
movq_m2r(CONST_CBUCBU, mm6);
pmullw_r2r(mm2, mm6);
-
movq_m2r(CONST_CGUCGU, mm5);
pmullw_r2r(mm2, mm5);
-
movq_m2r(CONST_CGVCGV, mm4);
pmullw_r2r(mm3, mm4);
@@ -213,7 +215,6 @@
punpcklbw_r2r(mm5, mm7);
por_r2r(mm7, mm0);
-// pxor_r2r(mm1, mm1);
movq_m2r(CONST_FF, mm1);
movq_r2r(mm0, mm5);
movq_r2r(mm3, mm6);
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs