annotate libmpcodecs/vf_2xsai.c @ 14282:2188637c0e8f

replaced deprecated FE_GET_EVENT with FE_READ_STATUS (only for DVB_HEAD); added a workaround for drivers that don't support FE_TIMEDOUT
author nicodvb
date Fri, 31 Dec 2004 11:40:01 +0000
parents e9a2af584986
children 6ff3379a0862
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7919
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
1 #include <stdio.h>
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
2 #include <stdlib.h>
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
3 #include <string.h>
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
4 #include <inttypes.h>
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
5
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
6 #include "../config.h"
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
7 #include "../mp_msg.h"
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
8
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
9 #include "img_format.h"
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
10 #include "mp_image.h"
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
11 #include "vf.h"
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
12
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
13 //===========================================================================//
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
14
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
15 #define uint32 unsigned long
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
16 #define uint16 unsigned short
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
17 #define uint8 unsigned char
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
18
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
19 static uint32 colorMask = 0xF7DEF7DE;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
20 static uint32 lowPixelMask = 0x08210821;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
21 static uint32 qcolorMask = 0xE79CE79C;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
22 static uint32 qlowpixelMask = 0x18631863;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
23 static uint32 redblueMask = 0xF81F;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
24 static uint32 greenMask = 0x7E0;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
25 static int PixelsPerMask = 2;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
26 static int xsai_depth = 0;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
27
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
28 #define makecol(r,g,b) (r+(g<<8)+(b<<16))
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
29 #define makecol_depth(d,r,g,b) (r+(g<<8)+(b<<16))
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
30
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
31 int Init_2xSaI(int d)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
32 {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
33
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
34 int minr = 0, ming = 0, minb = 0;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
35 int i;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
36
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
37 // if (d != 15 && d != 16 && d != 24 && d != 32)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
38 // return -1;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
39
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
40 /* Get lowest color bit */
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
41 for (i = 0; i < 255; i++) {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
42 if (!minr)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
43 minr = makecol(i, 0, 0);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
44 if (!ming)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
45 ming = makecol(0, i, 0);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
46 if (!minb)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
47 minb = makecol(0, 0, i);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
48 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
49
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
50 colorMask = (makecol_depth(d, 255, 0, 0) - minr) | (makecol_depth(d, 0, 255, 0) - ming) | (makecol_depth(d, 0, 0, 255) - minb);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
51 lowPixelMask = minr | ming | minb;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
52 qcolorMask = (makecol_depth(d, 255, 0, 0) - 3 * minr) | (makecol_depth(d, 0, 255, 0) - 3 * ming) | (makecol_depth(d, 0, 0, 255) - 3 * minb);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
53 qlowpixelMask = (minr * 3) | (ming * 3) | (minb * 3);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
54 redblueMask = makecol_depth(d, 255, 0, 255);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
55 greenMask = makecol_depth(d, 0, 255, 0);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
56
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
57 PixelsPerMask = (d <= 16) ? 2 : 1;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
58
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
59 if (PixelsPerMask == 2) {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
60 colorMask |= (colorMask << 16);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
61 qcolorMask |= (qcolorMask << 16);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
62 lowPixelMask |= (lowPixelMask << 16);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
63 qlowpixelMask |= (qlowpixelMask << 16);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
64 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
65
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
66 // TRACE("Color Mask: 0x%lX\n", colorMask);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
67 // TRACE("Low Pixel Mask: 0x%lX\n", lowPixelMask);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
68 // TRACE("QColor Mask: 0x%lX\n", qcolorMask);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
69 // TRACE("QLow Pixel Mask: 0x%lX\n", qlowpixelMask);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
70
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
71 xsai_depth = d;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
72
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
73 return 0;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
74 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
75
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
76
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
77 static int GetResult1(uint32 A, uint32 B, uint32 C, uint32 D)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
78 {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
79 int x = 0;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
80 int y = 0;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
81 int r = 0;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
82 if (A == C)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
83 x += 1;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
84 else if (B == C)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
85 y += 1;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
86 if (A == D)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
87 x += 1;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
88 else if (B == D)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
89 y += 1;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
90 if (x <= 1)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
91 r += 1;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
92 if (y <= 1)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
93 r -= 1;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
94 return r;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
95 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
96
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
97 static int GetResult2(uint32 A, uint32 B, uint32 C, uint32 D, uint32 E)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
98 {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
99 int x = 0;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
100 int y = 0;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
101 int r = 0;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
102 if (A == C)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
103 x += 1;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
104 else if (B == C)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
105 y += 1;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
106 if (A == D)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
107 x += 1;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
108 else if (B == D)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
109 y += 1;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
110 if (x <= 1)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
111 r -= 1;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
112 if (y <= 1)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
113 r += 1;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
114 return r;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
115 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
116
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
117
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
118 #define GET_RESULT(A, B, C, D) ((A != C || A != D) - (B != C || B != D))
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
119
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
120 #define INTERPOLATE(A, B) (((A & colorMask) >> 1) + ((B & colorMask) >> 1) + (A & B & lowPixelMask))
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
121
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
122 #define Q_INTERPOLATE(A, B, C, D) ((A & qcolorMask) >> 2) + ((B & qcolorMask) >> 2) + ((C & qcolorMask) >> 2) + ((D & qcolorMask) >> 2) \
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
123 + ((((A & qlowpixelMask) + (B & qlowpixelMask) + (C & qlowpixelMask) + (D & qlowpixelMask)) >> 2) & qlowpixelMask)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
124
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
125
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
126 static unsigned char *src_line[4];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
127 static unsigned char *dst_line[2];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
128
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
129 void Super2xSaI_ex(uint8 *src, uint32 src_pitch,
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
130 uint8 *dst, uint32 dst_pitch,
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
131 uint32 width, uint32 height, int sbpp) {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
132
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
133 unsigned int x, y;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
134 unsigned long color[16];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
135
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
136 /* Point to the first 3 lines. */
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
137 src_line[0] = src;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
138 src_line[1] = src;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
139 src_line[2] = src + src_pitch;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
140 src_line[3] = src + src_pitch * 2;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
141
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
142 x = 0, y = 0;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
143
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
144 if (PixelsPerMask == 2) {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
145 unsigned short *sbp;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
146 sbp = (unsigned short*)src_line[0];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
147 color[0] = *sbp; color[1] = color[0]; color[2] = color[0]; color[3] = color[0];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
148 color[4] = color[0]; color[5] = color[0]; color[6] = *(sbp + 1); color[7] = *(sbp + 2);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
149 sbp = (unsigned short*)src_line[2];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
150 color[8] = *sbp; color[9] = color[8]; color[10] = *(sbp + 1); color[11] = *(sbp + 2);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
151 sbp = (unsigned short*)src_line[3];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
152 color[12] = *sbp; color[13] = color[12]; color[14] = *(sbp + 1); color[15] = *(sbp + 2);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
153 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
154 else {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
155 unsigned long *lbp;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
156 lbp = (unsigned long*)src_line[0];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
157 color[0] = *lbp; color[1] = color[0]; color[2] = color[0]; color[3] = color[0];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
158 color[4] = color[0]; color[5] = color[0]; color[6] = *(lbp + 1); color[7] = *(lbp + 2);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
159 lbp = (unsigned long*)src_line[2];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
160 color[8] = *lbp; color[9] = color[8]; color[10] = *(lbp + 1); color[11] = *(lbp + 2);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
161 lbp = (unsigned long*)src_line[3];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
162 color[12] = *lbp; color[13] = color[12]; color[14] = *(lbp + 1); color[15] = *(lbp + 2);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
163 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
164
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
165 for (y = 0; y < height; y++) {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
166
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
167 dst_line[0] = dst + dst_pitch*2*y;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
168 dst_line[1] = dst + dst_pitch*(2*y+1);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
169
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
170 /* Todo: x = width - 2, x = width - 1 */
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
171
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
172 for (x = 0; x < width; x++) {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
173 unsigned long product1a, product1b, product2a, product2b;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
174
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
175 //--------------------------------------- B0 B1 B2 B3 0 1 2 3
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
176 // 4 5* 6 S2 -> 4 5* 6 7
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
177 // 1 2 3 S1 8 9 10 11
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
178 // A0 A1 A2 A3 12 13 14 15
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
179 //--------------------------------------
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
180 if (color[9] == color[6] && color[5] != color[10]) {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
181 product2b = color[9];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
182 product1b = product2b;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
183 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
184 else if (color[5] == color[10] && color[9] != color[6]) {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
185 product2b = color[5];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
186 product1b = product2b;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
187 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
188 else if (color[5] == color[10] && color[9] == color[6]) {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
189 int r = 0;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
190
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
191 r += GET_RESULT(color[6], color[5], color[8], color[13]);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
192 r += GET_RESULT(color[6], color[5], color[4], color[1]);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
193 r += GET_RESULT(color[6], color[5], color[14], color[11]);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
194 r += GET_RESULT(color[6], color[5], color[2], color[7]);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
195
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
196 if (r > 0)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
197 product1b = color[6];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
198 else if (r < 0)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
199 product1b = color[5];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
200 else
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
201 product1b = INTERPOLATE(color[5], color[6]);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
202
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
203 product2b = product1b;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
204
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
205 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
206 else {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
207 if (color[6] == color[10] && color[10] == color[13] && color[9] != color[14] && color[10] != color[12])
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
208 product2b = Q_INTERPOLATE(color[10], color[10], color[10], color[9]);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
209 else if (color[5] == color[9] && color[9] == color[14] && color[13] != color[10] && color[9] != color[15])
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
210 product2b = Q_INTERPOLATE(color[9], color[9], color[9], color[10]);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
211 else
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
212 product2b = INTERPOLATE(color[9], color[10]);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
213
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
214 if (color[6] == color[10] && color[6] == color[1] && color[5] != color[2] && color[6] != color[0])
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
215 product1b = Q_INTERPOLATE(color[6], color[6], color[6], color[5]);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
216 else if (color[5] == color[9] && color[5] == color[2] && color[1] != color[6] && color[5] != color[3])
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
217 product1b = Q_INTERPOLATE(color[6], color[5], color[5], color[5]);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
218 else
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
219 product1b = INTERPOLATE(color[5], color[6]);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
220 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
221
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
222 if (color[5] == color[10] && color[9] != color[6] && color[4] == color[5] && color[5] != color[14])
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
223 product2a = INTERPOLATE(color[9], color[5]);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
224 else if (color[5] == color[8] && color[6] == color[5] && color[4] != color[9] && color[5] != color[12])
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
225 product2a = INTERPOLATE(color[9], color[5]);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
226 else
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
227 product2a = color[9];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
228
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
229 if (color[9] == color[6] && color[5] != color[10] && color[8] == color[9] && color[9] != color[2])
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
230 product1a = INTERPOLATE(color[9], color[5]);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
231 else if (color[4] == color[9] && color[10] == color[9] && color[8] != color[5] && color[9] != color[0])
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
232 product1a = INTERPOLATE(color[9], color[5]);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
233 else
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
234 product1a = color[5];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
235
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
236 if (PixelsPerMask == 2) {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
237 *((unsigned long *) (&dst_line[0][x * 4])) = product1a | (product1b << 16);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
238 *((unsigned long *) (&dst_line[1][x * 4])) = product2a | (product2b << 16);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
239 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
240 else {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
241 *((unsigned long *) (&dst_line[0][x * 8])) = product1a;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
242 *((unsigned long *) (&dst_line[0][x * 8 + 4])) = product1b;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
243 *((unsigned long *) (&dst_line[1][x * 8])) = product2a;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
244 *((unsigned long *) (&dst_line[1][x * 8 + 4])) = product2b;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
245 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
246
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
247 /* Move color matrix forward */
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
248 color[0] = color[1]; color[4] = color[5]; color[8] = color[9]; color[12] = color[13];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
249 color[1] = color[2]; color[5] = color[6]; color[9] = color[10]; color[13] = color[14];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
250 color[2] = color[3]; color[6] = color[7]; color[10] = color[11]; color[14] = color[15];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
251
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
252 if (x < width - 3) {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
253 x += 3;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
254 if (PixelsPerMask == 2) {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
255 color[3] = *(((unsigned short*)src_line[0]) + x);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
256 color[7] = *(((unsigned short*)src_line[1]) + x);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
257 color[11] = *(((unsigned short*)src_line[2]) + x);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
258 color[15] = *(((unsigned short*)src_line[3]) + x);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
259 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
260 else {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
261 color[3] = *(((unsigned long*)src_line[0]) + x);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
262 color[7] = *(((unsigned long*)src_line[1]) + x);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
263 color[11] = *(((unsigned long*)src_line[2]) + x);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
264 color[15] = *(((unsigned long*)src_line[3]) + x);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
265 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
266 x -= 3;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
267 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
268 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
269
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
270 /* We're done with one line, so we shift the source lines up */
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
271 src_line[0] = src_line[1];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
272 src_line[1] = src_line[2];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
273 src_line[2] = src_line[3];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
274
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
275 /* Read next line */
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
276 if (y + 3 >= height)
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
277 src_line[3] = src_line[2];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
278 else
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
279 src_line[3] = src_line[2] + src_pitch;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
280
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
281 /* Then shift the color matrix up */
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
282 if (PixelsPerMask == 2) {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
283 unsigned short *sbp;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
284 sbp = (unsigned short*)src_line[0];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
285 color[0] = *sbp; color[1] = color[0]; color[2] = *(sbp + 1); color[3] = *(sbp + 2);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
286 sbp = (unsigned short*)src_line[1];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
287 color[4] = *sbp; color[5] = color[4]; color[6] = *(sbp + 1); color[7] = *(sbp + 2);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
288 sbp = (unsigned short*)src_line[2];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
289 color[8] = *sbp; color[9] = color[9]; color[10] = *(sbp + 1); color[11] = *(sbp + 2);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
290 sbp = (unsigned short*)src_line[3];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
291 color[12] = *sbp; color[13] = color[12]; color[14] = *(sbp + 1); color[15] = *(sbp + 2);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
292 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
293 else {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
294 unsigned long *lbp;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
295 lbp = (unsigned long*)src_line[0];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
296 color[0] = *lbp; color[1] = color[0]; color[2] = *(lbp + 1); color[3] = *(lbp + 2);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
297 lbp = (unsigned long*)src_line[1];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
298 color[4] = *lbp; color[5] = color[4]; color[6] = *(lbp + 1); color[7] = *(lbp + 2);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
299 lbp = (unsigned long*)src_line[2];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
300 color[8] = *lbp; color[9] = color[9]; color[10] = *(lbp + 1); color[11] = *(lbp + 2);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
301 lbp = (unsigned long*)src_line[3];
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
302 color[12] = *lbp; color[13] = color[12]; color[14] = *(lbp + 1); color[15] = *(lbp + 2);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
303 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
304
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
305 } // y loop
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
306
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
307 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
308
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
309
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
310 //===========================================================================//
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
311
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
312 static int config(struct vf_instance_s* vf,
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
313 int width, int height, int d_width, int d_height,
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
314 unsigned int flags, unsigned int outfmt){
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
315
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
316 Init_2xSaI(outfmt&255);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
317
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
318 return vf_next_config(vf,2*width,2*height,2*d_width,2*d_height,flags,outfmt);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
319 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
320
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
321 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
322 mp_image_t *dmpi;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
323
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
324 // hope we'll get DR buffer:
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
325 dmpi=vf_get_image(vf->next,mpi->imgfmt,
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
326 MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
327 2*mpi->w, 2*mpi->h);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
328
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
329 Super2xSaI_ex(mpi->planes[0], mpi->stride[0],
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
330 dmpi->planes[0], dmpi->stride[0],
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
331 mpi->w, mpi->h, mpi->bpp/8);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
332
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
333 return vf_next_put_image(vf,dmpi);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
334 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
335
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
336 //===========================================================================//
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
337
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
338 static int query_format(struct vf_instance_s* vf, unsigned int fmt){
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
339 switch(fmt){
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
340 // case IMGFMT_BGR15:
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
341 // case IMGFMT_BGR16:
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
342 case IMGFMT_BGR32:
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
343 return vf_next_query_format(vf,fmt);
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
344 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
345 return 0;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
346 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
347
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
348 static int open(vf_instance_t *vf, char* args){
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
349 vf->config=config;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
350 vf->put_image=put_image;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
351 vf->query_format=query_format;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
352 return 1;
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
353 }
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
354
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
355 vf_info_t vf_info_2xsai = {
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
356 "2xSai BGR bitmap 2x scaler",
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
357 "2xsai",
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
358 "A'rpi",
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
359 "http://elektron.its.tudelft.nl/~dalikifa/",
9593
e9a2af584986 Add the new -vf option wich is the same as vop in reverse order.
albeu
parents: 8123
diff changeset
360 open,
e9a2af584986 Add the new -vf option wich is the same as vop in reverse order.
albeu
parents: 8123
diff changeset
361 NULL
7919
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
362 };
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
363
b8acdbfd0882 2xSai filter... just for fun, imho useless
arpi
parents:
diff changeset
364 //===========================================================================//