~ubuntu-branches/ubuntu/karmic/xmame/karmic

« back to all changes in this revision

Viewing changes to src/unix/blit/advance/xq2x_defs.h

  • Committer: Bazaar Package Importer
  • Author(s): Bruno Barrera C.
  • Date: 2007-02-16 10:06:54 UTC
  • mfrom: (2.1.5 edgy)
  • Revision ID: james.westby@ubuntu.com-20070216100654-iztas2cl47k5j039
Tags: 0.106-2
* Added Italian debconf templates translation. (closes: #382672)
* Added German debconf templates translation. (closes: #396610)
* Added Japanese debconf templates translation. (closes: #400011)
* Added Portuguese debconf templates translation. (closes: #409960)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "interp_defs.h"
 
2
#ifdef HQ2X
 
3
#  include "hq2x_defs.h"
 
4
#else
 
5
#  include "lq2x_defs.h"
 
6
#endif
 
7
 
 
8
#define XQ2X_SQUARE_INIT \
 
9
  c[1] = XQ2X_GETPIXEL(src0[-1]); \
 
10
  c[2] = XQ2X_GETPIXEL(src0[ 0]); \
 
11
  c[4] = XQ2X_GETPIXEL(src1[-1]); \
 
12
  c[5] = XQ2X_GETPIXEL(src1[ 0]); \
 
13
  c[7] = XQ2X_GETPIXEL(src2[-1]); \
 
14
  c[8] = XQ2X_GETPIXEL(src2[ 0]);
 
15
 
 
16
#define XQ2X_SQUARE_FILL \
 
17
  c[0] = c[1]; \
 
18
  c[1] = c[2]; \
 
19
  c[2] = XQ2X_GETPIXEL(src0[1]); \
 
20
  c[3] = c[4]; \
 
21
  c[4] = c[5]; \
 
22
  c[5] = XQ2X_GETPIXEL(src1[1]); \
 
23
  c[6] = c[7]; \
 
24
  c[7] = c[8]; \
 
25
  c[8] = XQ2X_GETPIXEL(src2[1]);
 
26
 
 
27
#define XQ2X_LINE_LOOP_BEGIN \
 
28
  interp_uint16 c[9]; \
 
29
  \
 
30
  XQ2X_SQUARE_INIT \
 
31
  \
 
32
  while(src1 < end1) \
 
33
  { \
 
34
    XQ2X_SQUARE_FILL
 
35
 
 
36
 
 
37
#define XQ2X_SQUARE_INIT_SWAP_XY \
 
38
  c[3] = XQ2X_GETPIXEL(src0[-1]); \
 
39
  c[4] = XQ2X_GETPIXEL(src1[-1]); \
 
40
  c[5] = XQ2X_GETPIXEL(src2[-1]); \
 
41
  c[6] = XQ2X_GETPIXEL(src0[0]); \
 
42
  c[7] = XQ2X_GETPIXEL(src1[0]); \
 
43
  c[8] = XQ2X_GETPIXEL(src2[0]);
 
44
 
 
45
#define XQ2X_SQUARE_FILL_SWAP_XY \
 
46
  c[0] = c[3]; \
 
47
  c[1] = c[4]; \
 
48
  c[2] = c[5]; \
 
49
  c[3] = c[6]; \
 
50
  c[4] = c[7]; \
 
51
  c[5] = c[8]; \
 
52
  c[6] = XQ2X_GETPIXEL(src0[1]); \
 
53
  c[7] = XQ2X_GETPIXEL(src1[1]); \
 
54
  c[8] = XQ2X_GETPIXEL(src2[1]);
 
55
 
 
56
#define XQ2X_LINE_LOOP_BEGIN_SWAP_XY \
 
57
  interp_uint16 c[9]; \
 
58
  \
 
59
  XQ2X_SQUARE_INIT_SWAP_XY \
 
60
  \
 
61
  while(src1 < end1) \
 
62
  { \
 
63
    XQ2X_SQUARE_FILL_SWAP_XY
 
64
 
 
65
 
 
66
#define XQ2X_LINE_LOOP_END \
 
67
    src0++; \
 
68
    src1++; \
 
69
    src2++; \
 
70
  }