20 for (
auto& t : tempBuffers) {
27 fieldType = fieldType_;
35 template <
typename Pixel>
36 const Pixel* FrameSource::blendLines(
37 const Pixel* line1,
const Pixel* line2,
unsigned width)
const
42 blend(line1, line2, out, width);
46 template <
typename Pixel>
50 return getLinePtr<Pixel>(line, 320);
53 const Pixel* line1 = getLinePtr<Pixel>(2 * line + 0, 320);
54 const Pixel* line2 = getLinePtr<Pixel>(2 * line + 1, 320);
55 return blendLines(line1, line2, 320);
59 template <
typename Pixel>
63 return getLinePtr<Pixel>(line, 640);
66 return getLinePtr<Pixel>(line / 2, 640);
70 template <
typename Pixel>
74 unsigned l2 = (2 * line) / 3;
75 const Pixel* line0 = getLinePtr<Pixel>(l2 + 0, 960);
76 if ((line % 3) == 1) {
77 const Pixel* line1 = getLinePtr<Pixel>(l2 + 1, 960);
78 return blendLines(line0, line1, 960);
84 return getLinePtr<Pixel>(line / 3, 960);
90 if (tempCounter == tempBuffers.size()) {
91 unsigned size = 1280 * pixelFormat.BytesPerPixel;
93 tempBuffers.push_back(buf);
95 return tempBuffers[tempCounter++];
103 template <
typename Pixel>
104 const Pixel* FrameSource::scaleLine(
105 const Pixel* in,
unsigned inWidth,
unsigned outWidth)
const
114 memset(out, outWidth, in[0]);
125 scale(in, out, outWidth);
129 Scale_1on2<Pixel, false> scale;
130 scale(in, out, outWidth);
134 Scale_1on3<Pixel> scale;
135 scale(in, out, outWidth);
139 Scale_1on4<Pixel> scale;
140 scale(in, out, outWidth);
144 Scale_2on9<Pixel> scale(pixelOps);
145 scale(in, out, outWidth);
149 Scale_1on6<Pixel> scale;
150 scale(in, out, outWidth);
163 Scale_3on2<Pixel> scale(pixelOps);
164 scale(in, out, outWidth);
170 Scale_3on4<Pixel> scale(pixelOps);
171 scale(in, out, outWidth);
175 Scale_1on2<Pixel, false> scale;
176 scale(in, out, outWidth);
180 Scale_3on8<Pixel> scale(pixelOps);
181 scale(in, out, outWidth);
185 Scale_1on3<Pixel> scale;
186 scale(in, out, outWidth);
190 Scale_1on4<Pixel> scale;
191 scale(in, out, outWidth);
204 Scale_2on1<Pixel> scale(pixelOps);
205 scale(in, out, outWidth);
209 Scale_4on3<Pixel> scale(pixelOps);
210 scale(in, out, outWidth);
216 Scale_2on3<Pixel> scale(pixelOps);
217 scale(in, out, outWidth);
221 Scale_1on2<Pixel, false> scale;
222 scale(in, out, outWidth);
226 Scale_4on9<Pixel> scale(pixelOps);
227 scale(in, out, outWidth);
231 Scale_1on3<Pixel> scale;
232 scale(in, out, outWidth);
245 Scale_3on1<Pixel> scale(pixelOps);
246 scale(in, out, outWidth);
250 Scale_2on1<Pixel> scale(pixelOps);
251 scale(in, out, outWidth);
255 Scale_3on2<Pixel> scale(pixelOps);
256 scale(in, out, outWidth);
262 Scale_3on4<Pixel> scale(pixelOps);
263 scale(in, out, outWidth);
267 Scale_2on3<Pixel> scale(pixelOps);
268 scale(in, out, outWidth);
272 Scale_1on2<Pixel, false> scale;
273 scale(in, out, outWidth);
286 Scale_4on1<Pixel> scale(pixelOps);
287 scale(in, out, outWidth);
291 Scale_8on3<Pixel> scale(pixelOps);
292 scale(in, out, outWidth);
296 Scale_2on1<Pixel> scale(pixelOps);
297 scale(in, out, outWidth);
301 Scale_4on3<Pixel> scale(pixelOps);
302 scale(in, out, outWidth);
308 Scale_8on9<Pixel> scale(pixelOps);
309 scale(in, out, outWidth);
313 Scale_2on3<Pixel> scale(pixelOps);
314 scale(in, out, outWidth);
327 Scale_6on1<Pixel> scale(pixelOps);
328 scale(in, out, outWidth);
332 Scale_4on1<Pixel> scale(pixelOps);
333 scale(in, out, outWidth);
337 Scale_3on1<Pixel> scale(pixelOps);
338 scale(in, out, outWidth);
342 Scale_2on1<Pixel> scale(pixelOps);
343 scale(in, out, outWidth);
347 Scale_3on2<Pixel> scale(pixelOps);
348 scale(in, out, outWidth);
352 Scale_4on3<Pixel> scale(pixelOps);
353 scale(in, out, outWidth);
372 template const word* FrameSource::getLinePtr320_240<word>(unsigned)
const;
373 template const word* FrameSource::getLinePtr640_480<word>(unsigned)
const;
374 template const word* FrameSource::getLinePtr960_720<word>(unsigned)
const;
375 template const word* FrameSource::scaleLine<word>(
const word*, unsigned, unsigned)
const;
377 #if HAVE_32BPP || COMPONENT_GL
378 template const unsigned* FrameSource::getLinePtr320_240<unsigned>(unsigned)
const;
379 template const unsigned* FrameSource::getLinePtr640_480<unsigned>(unsigned)
const;
380 template const unsigned* FrameSource::getLinePtr960_720<unsigned>(unsigned)
const;
381 template const unsigned* FrameSource::scaleLine<unsigned>(
const unsigned*, unsigned, unsigned)
const;