diff options
author | Thibaut Mattern <tmattern@users.sourceforge.net> | 2003-01-03 21:29:20 +0000 |
---|---|---|
committer | Thibaut Mattern <tmattern@users.sourceforge.net> | 2003-01-03 21:29:20 +0000 |
commit | 725a7a2631013ae00b8d363069331446eaff4273 (patch) | |
tree | e6b7a96ce3b3c05b4d3c92e5113dbb6e26f83097 /src/post/goom/drawmethods.h | |
parent | b4bcc7ac8ae797dbe478d42d34839f31bba277dc (diff) | |
download | xine-lib-725a7a2631013ae00b8d363069331446eaff4273.tar.gz xine-lib-725a7a2631013ae00b8d363069331446eaff4273.tar.bz2 |
Updates to the latest version of Goom
Adds mmx and ppc assembly optimizations.
Adds 5 config entries for this post plugin :
- frames per second
- width
- height
- usage of assembly optimizations
- colorspace conversion method
PPc optimizations are not tested.
The compiler option -fomit-frame-pointer is disabled.
CVS patchset: 3762
CVS date: 2003/01/03 21:29:20
Diffstat (limited to 'src/post/goom/drawmethods.h')
-rw-r--r-- | src/post/goom/drawmethods.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/post/goom/drawmethods.h b/src/post/goom/drawmethods.h new file mode 100644 index 000000000..4ad83b047 --- /dev/null +++ b/src/post/goom/drawmethods.h @@ -0,0 +1,41 @@ +#ifndef _DRAWMETHODS_H +#define _DRAWMETHODS_H + +#include "goom_config.h" + +#define DRAWMETHOD_NORMAL(adr,col) {*(adr) = (col);} + +/* #ifdef MMX */ +#if 0 +#define DRAWMETHOD_PLUS(_out,_backbuf,_col) \ +{\ +__asm__ ("movd %%eax,%%mm0\n movd %%edx,%%mm1\n paddusb %%mm1,%%mm0\n movd %%mm0,%%eax"\ +:"=eax"(_out):"eax"(_backbuf),"edx"(_col));\ +} +#else +#define DRAWMETHOD_PLUS(_out,_backbuf,_col) \ +{\ + int tra=0,i=0;\ + unsigned char *bra = (unsigned char*)&(_backbuf);\ + unsigned char *dra = (unsigned char*)&(_out);\ + unsigned char *cra = (unsigned char*)&(_col);\ + for (;i<4;i++) {\ + tra = *cra;\ + tra += *bra;\ + if (tra>255) tra=255;\ + *dra = tra;\ + ++dra;++cra;++bra;\ + }\ +} +#endif + +#define DRAWMETHOD_OR(adr,col) {*(adr)|=(col);} + +/* #ifdef MMX */ +#if 0 +#define DRAWMETHOD_DONE() {__asm__ __volatile__ ("emms");} +#else +#define DRAWMETHOD_DONE() {} +#endif + +#endif |