1 #include "cmodel_permutation.h"
2 #include "colormodels.h"
3 #include "workarounds.h"
5 // ********************************** RGB FLOAT -> *******************************
9 static inline void transfer_RGB_FLOAT_to_RGB8(unsigned char *(*output
), float *input
)
11 unsigned char r
, g
, b
;
12 r
= (unsigned char)(CLIP(input
[0], 0, 1) * 0x3);
13 g
= (unsigned char)(CLIP(input
[1], 0, 1) * 0x7);
14 b
= (unsigned char)(CLIP(input
[2], 0, 1) * 0x3);
16 *(*output
) = (r
<< 6) +
22 static inline void transfer_RGB_FLOAT_to_BGR565(unsigned char *(*output
), float *input
)
24 unsigned char r
, g
, b
;
25 r
= (unsigned char)(CLIP(input
[0], 0, 1) * 0x1f);
26 g
= (unsigned char)(CLIP(input
[1], 0, 1) * 0x3f);
27 b
= (unsigned char)(CLIP(input
[2], 0, 1) * 0x1f);
29 *(uint16_t*)(*output
) = (b
<< 11) |
35 static inline void transfer_RGB_FLOAT_to_RGB565(unsigned char *(*output
), float *input
)
37 unsigned char r
, g
, b
;
38 r
= (unsigned char)(CLIP(input
[0], 0, 1) * 0x1f);
39 g
= (unsigned char)(CLIP(input
[1], 0, 1) * 0x3f);
40 b
= (unsigned char)(CLIP(input
[2], 0, 1) * 0x1f);
42 *(uint16_t*)(*output
) = (r
<< 11) |
48 static inline void transfer_RGB_FLOAT_to_BGR888(unsigned char *(*output
),
51 unsigned char r
= (unsigned char)(CLIP(input
[0], 0, 1) * 0xff);
52 unsigned char g
= (unsigned char)(CLIP(input
[1], 0, 1) * 0xff);
53 unsigned char b
= (unsigned char)(CLIP(input
[2], 0, 1) * 0xff);
59 static inline void transfer_RGB_FLOAT_to_RGB888(unsigned char *(*output
),
62 unsigned char r
= (unsigned char)(CLIP(input
[0], 0, 1) * 0xff);
63 unsigned char g
= (unsigned char)(CLIP(input
[1], 0, 1) * 0xff);
64 unsigned char b
= (unsigned char)(CLIP(input
[2], 0, 1) * 0xff);
70 static inline void transfer_RGB_FLOAT_to_RGBA8888(unsigned char *(*output
),
73 unsigned char r
= (unsigned char)(CLIP(input
[0], 0, 1) * 0xff);
74 unsigned char g
= (unsigned char)(CLIP(input
[1], 0, 1) * 0xff);
75 unsigned char b
= (unsigned char)(CLIP(input
[2], 0, 1) * 0xff);
82 static inline void transfer_RGB_FLOAT_to_ARGB8888(unsigned char *(*output
),
85 unsigned char r
= (unsigned char)(CLIP(input
[0], 0, 1) * 0xff);
86 unsigned char g
= (unsigned char)(CLIP(input
[1], 0, 1) * 0xff);
87 unsigned char b
= (unsigned char)(CLIP(input
[2], 0, 1) * 0xff);
94 static inline void transfer_RGB_FLOAT_to_RGBA_FLOAT(float *(*output
),
97 *(*output
)++ = input
[0];
98 *(*output
)++ = input
[1];
99 *(*output
)++ = input
[2];
103 static inline void transfer_RGB_FLOAT_to_BGR8888(unsigned char *(*output
),
106 unsigned char r
= (unsigned char)(CLIP(input
[0], 0, 1) * 0xff);
107 unsigned char g
= (unsigned char)(CLIP(input
[1], 0, 1) * 0xff);
108 unsigned char b
= (unsigned char)(CLIP(input
[2], 0, 1) * 0xff);
115 static inline void transfer_RGB_FLOAT_to_YUV888(unsigned char *(*output
),
118 int y
, u
, v
, r
, g
, b
;
119 r
= (int)(CLIP(input
[0], 0, 1) * 0xffff);
120 g
= (int)(CLIP(input
[1], 0, 1) * 0xffff);
121 b
= (int)(CLIP(input
[2], 0, 1) * 0xffff);
123 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
125 *(*output
)++ = y
>> 8;
126 *(*output
)++ = u
>> 8;
127 *(*output
)++ = v
>> 8;
130 static inline void transfer_RGB_FLOAT_to_YUVA8888(unsigned char *(*output
),
133 int y
, u
, v
, r
, g
, b
;
135 r
= (int)(CLIP(input
[0], 0, 1) * 0xffff);
136 g
= (int)(CLIP(input
[1], 0, 1) * 0xffff);
137 b
= (int)(CLIP(input
[2], 0, 1) * 0xffff);
139 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
141 *(*output
)++ = y
>> 8;
142 *(*output
)++ = u
>> 8;
143 *(*output
)++ = v
>> 8;
147 static inline void transfer_RGB_FLOAT_to_YUV161616(uint16_t *(*output
),
150 int y
, u
, v
, r
, g
, b
;
151 r
= (int)(CLIP(input
[0], 0, 1) * 0xffff);
152 g
= (int)(CLIP(input
[1], 0, 1) * 0xffff);
153 b
= (int)(CLIP(input
[2], 0, 1) * 0xffff);
155 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
157 *(*output
)++ = quicktime_copy(y
);
158 *(*output
)++ = quicktime_copy(u
);
159 *(*output
)++ = quicktime_copy(v
);
162 static inline void transfer_RGB_FLOAT_to_YUVA16161616(uint16_t *(*output
),
165 int y
, u
, v
, r
, g
, b
;
167 r
= (int)(CLIP(input
[0], 0, 1) * 0xffff);
168 g
= (int)(CLIP(input
[1], 0, 1) * 0xffff);
169 b
= (int)(CLIP(input
[2], 0, 1) * 0xffff);
171 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
173 *(*output
)++ = quicktime_copy(y
);
174 *(*output
)++ = quicktime_copy(u
);
175 *(*output
)++ = quicktime_copy(v
);
176 *(*output
)++ = 0xffff;
180 static inline void transfer_RGB_FLOAT_to_YUV101010(unsigned char *(*output
),
186 r
= (int)(CLIP(input
[0], 0, 1) * 0xffff);
187 g
= (int)(CLIP(input
[1], 0, 1) * 0xffff);
188 b
= (int)(CLIP(input
[2], 0, 1) * 0xffff);
189 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
190 WRITE_YUV101010(y
, u
, v
);
193 static inline void transfer_RGB_FLOAT_to_VYU888(unsigned char *(*output
),
196 int y
, u
, v
, r
, g
, b
;
197 r
= (int)(CLIP(input
[0], 0, 1) * 0xffff);
198 g
= (int)(CLIP(input
[1], 0, 1) * 0xffff);
199 b
= (int)(CLIP(input
[2], 0, 1) * 0xffff);
201 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
203 *(*output
)++ = v
>> 8;
204 *(*output
)++ = y
>> 8;
205 *(*output
)++ = u
>> 8;
208 static inline void transfer_RGB_FLOAT_to_UYVA8888(unsigned char *(*output
),
211 int y
, u
, v
, r
, g
, b
;
213 r
= (int)(CLIP(input
[0], 0, 1) * 0xffff);
214 g
= (int)(CLIP(input
[1], 0, 1) * 0xffff);
215 b
= (int)(CLIP(input
[2], 0, 1) * 0xffff);
217 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
219 *(*output
)++ = u
>> 8;
220 *(*output
)++ = y
>> 8;
221 *(*output
)++ = v
>> 8;
226 static inline void transfer_RGB_FLOAT_to_YUV420P_YUV422P(unsigned char *output_y
,
227 unsigned char *output_u
,
228 unsigned char *output_v
,
232 int y
, u
, v
, r
, g
, b
;
233 r
= (int)(CLIP(input
[0], 0, 1) * 0xffff);
234 g
= (int)(CLIP(input
[1], 0, 1) * 0xffff);
235 b
= (int)(CLIP(input
[2], 0, 1) * 0xffff);
237 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
239 output_y
[output_column
] = y
>> 8;
240 output_u
[output_column
/ 2] = u
>> 8;
241 output_v
[output_column
/ 2] = v
>> 8;
244 static inline void transfer_RGB_FLOAT_to_YUV422(unsigned char *(*output
),
248 int y
, u
, v
, r
, g
, b
;
249 r
= (int)(CLIP(input
[0], 0, 1) * 0xffff);
250 g
= (int)(CLIP(input
[1], 0, 1) * 0xffff);
251 b
= (int)(CLIP(input
[2], 0, 1) * 0xffff);
253 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
256 // Store U and V for even pixels only
257 (*output
)[1] = u
>> 8;
258 (*output
)[3] = v
>> 8;
259 (*output
)[0] = y
>> 8;
263 // Store Y and advance output for odd pixels only
264 (*output
)[2] = y
>> 8;
269 static inline void transfer_RGB_FLOAT_to_YUV444P(unsigned char *output_y
,
270 unsigned char *output_u
,
271 unsigned char *output_v
,
275 int y
, u
, v
, r
, g
, b
;
276 r
= (int)(CLIP(input
[0], 0, 1) * 0xffff);
277 g
= (int)(CLIP(input
[1], 0, 1) * 0xffff);
278 b
= (int)(CLIP(input
[2], 0, 1) * 0xffff);
280 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
282 output_y
[output_column
] = y
>> 8;
283 output_u
[output_column
] = u
>> 8;
284 output_v
[output_column
] = v
>> 8;
296 // ****************************** RGBA FLOAT -> *********************************
298 static inline void transfer_RGBA_FLOAT_to_RGB8(unsigned char *(*output
),
302 a
= (uint32_t)(CLIP(input
[3], 0, 1) * 0x10000);
303 r
= (uint32_t)(CLIP(input
[0], 0, 1) * 0xff * a
);
304 g
= (uint32_t)(CLIP(input
[1], 0, 1) * 0xff * a
);
305 b
= (uint32_t)(CLIP(input
[2], 0, 1) * 0xff * a
);
307 *(*output
) = (unsigned char)(((r
& 0xc00000) >> 16) +
308 ((g
& 0xe00000) >> 18) +
309 ((b
& 0xe00000) >> 21));
313 static inline void transfer_RGBA_FLOAT_to_BGR565(unsigned char *(*output
),
317 a
= (uint32_t)(CLIP(input
[3], 0, 1) * 0x10000);
318 r
= (uint32_t)(CLIP(input
[0], 0, 1) * 0xff * a
);
319 g
= (uint32_t)(CLIP(input
[1], 0, 1) * 0xff * a
);
320 b
= (uint32_t)(CLIP(input
[2], 0, 1) * 0xff * a
);
322 *(uint16_t*)(*output
) = (uint16_t)(((b
& 0xf80000) >> 8) +
323 ((g
& 0xfc0000) >> 13) +
324 ((r
& 0xf80000) >> 19));
328 static inline void transfer_RGBA_FLOAT_to_RGB565(unsigned char *(*output
),
332 a
= (uint32_t)(CLIP(input
[3], 0, 1) * 0x10000);
333 r
= (uint32_t)(CLIP(input
[0], 0, 1) * 0xff * a
);
334 g
= (uint32_t)(CLIP(input
[1], 0, 1) * 0xff * a
);
335 b
= (uint32_t)(CLIP(input
[2], 0, 1) * 0xff * a
);
337 *(uint16_t*)(*output
) = (uint16_t)(((r
& 0xf80000) >> 8) +
338 ((g
& 0xfc0000) >> 13) +
339 ((b
& 0xf80000) >> 19));
343 static inline void transfer_RGBA_FLOAT_to_BGR888(unsigned char *(*output
),
347 a
= (uint32_t)(CLIP(input
[3], 0, 1) * 0xff);
348 r
= (uint32_t)(CLIP(input
[0], 0, 1) * a
);
349 g
= (uint32_t)(CLIP(input
[1], 0, 1) * a
);
350 b
= (uint32_t)(CLIP(input
[2], 0, 1) * a
);
352 *(*output
)++ = (unsigned char)b
;
353 *(*output
)++ = (unsigned char)g
;
354 *(*output
)++ = (unsigned char)r
;
357 static inline void transfer_RGBA_FLOAT_to_RGB888(unsigned char *(*output
),
361 a
= (uint32_t)(CLIP(input
[3], 0, 1) * 0xff);
362 r
= (uint32_t)(CLIP(input
[0], 0, 1) * a
);
363 g
= (uint32_t)(CLIP(input
[1], 0, 1) * a
);
364 b
= (uint32_t)(CLIP(input
[2], 0, 1) * a
);
366 *(*output
)++ = (unsigned char)r
;
367 *(*output
)++ = (unsigned char)g
;
368 *(*output
)++ = (unsigned char)b
;
371 static inline void transfer_RGBA_FLOAT_to_RGB_FLOAT(float *(*output
),
377 *(*output
)++ = input
[0] * a
;
378 *(*output
)++ = input
[1] * a
;
379 *(*output
)++ = input
[2] * a
;
383 static inline void transfer_RGBA_FLOAT_to_RGBA8888(unsigned char *(*output
),
386 *(*output
)++ = (unsigned char)(CLIP(input
[0], 0, 1) * 0xff);
387 *(*output
)++ = (unsigned char)(CLIP(input
[1], 0, 1) * 0xff);
388 *(*output
)++ = (unsigned char)(CLIP(input
[2], 0, 1) * 0xff);
389 *(*output
)++ = (unsigned char)(CLIP(input
[3], 0, 1) * 0xff);
392 static inline void transfer_RGBA_FLOAT_to_ARGB8888(unsigned char *(*output
),
395 *(*output
)++ = (unsigned char)(CLIP(input
[3], 0, 1) * 0xff);
396 *(*output
)++ = (unsigned char)(CLIP(input
[0], 0, 1) * 0xff);
397 *(*output
)++ = (unsigned char)(CLIP(input
[1], 0, 1) * 0xff);
398 *(*output
)++ = (unsigned char)(CLIP(input
[2], 0, 1) * 0xff);
402 static inline void transfer_RGBA_FLOAT_to_BGR8888(unsigned char *(*output
),
406 a
= (uint32_t)(CLIP(input
[3], 0, 1) * 0xff);
407 r
= (uint32_t)(CLIP(input
[0], 0, 1) * a
);
408 g
= (uint32_t)(CLIP(input
[1], 0, 1) * a
);
409 b
= (uint32_t)(CLIP(input
[2], 0, 1) * a
);
411 *(*output
)++ = (unsigned char)(b
);
412 *(*output
)++ = (unsigned char)(g
);
413 *(*output
)++ = (unsigned char)(r
);
417 static inline void transfer_RGBA_FLOAT_to_YUV888(unsigned char *(*output
),
420 int y
, u
, v
, r
, g
, b
, a
;
421 a
= (int)(CLIP(input
[3], 0, 1) * 0x101);
422 r
= (int)(CLIP(input
[0], 0, 1) * 0xff * a
);
423 g
= (int)(CLIP(input
[1], 0, 1) * 0xff * a
);
424 b
= (int)(CLIP(input
[2], 0, 1) * 0xff * a
);
426 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
428 *(*output
)++ = y
>> 8;
429 *(*output
)++ = u
>> 8;
430 *(*output
)++ = v
>> 8;
433 static inline void transfer_RGBA_FLOAT_to_YUVA8888(unsigned char *(*output
),
436 int y
, u
, v
, r
, g
, b
, a
;
438 a
= (int)(CLIP(input
[3], 0, 1) * 0xff);
439 r
= (int)(CLIP(input
[0], 0, 1) * 0xffff);
440 g
= (int)(CLIP(input
[1], 0, 1) * 0xffff);
441 b
= (int)(CLIP(input
[2], 0, 1) * 0xffff);
443 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
445 *(*output
)++ = y
>> 8;
446 *(*output
)++ = u
>> 8;
447 *(*output
)++ = v
>> 8;
451 static inline void transfer_RGBA_FLOAT_to_YUV161616(uint16_t *(*output
),
454 int y
, u
, v
, r
, g
, b
, a
;
456 a
= (int)(CLIP(input
[3], 0, 1) * 0x101);
457 r
= (int)(CLIP(input
[0], 0, 1) * 0xff * a
);
458 g
= (int)(CLIP(input
[1], 0, 1) * 0xff * a
);
459 b
= (int)(CLIP(input
[2], 0, 1) * 0xff * a
);
461 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
463 // GCC 3.3 optimization error
464 *(*output
)++ = quicktime_copy(y
);
465 *(*output
)++ = quicktime_copy(u
);
466 *(*output
)++ = quicktime_copy(v
);
469 static inline void transfer_RGBA_FLOAT_to_YUVA16161616(uint16_t *(*output
),
472 int y
, u
, v
, r
, g
, b
, a
;
474 r
= (int)(CLIP(input
[0], 0, 1) * 0xffff);
475 g
= (int)(CLIP(input
[1], 0, 1) * 0xffff);
476 b
= (int)(CLIP(input
[2], 0, 1) * 0xffff);
477 a
= (int)(CLIP(input
[3], 0, 1) * 0xffff);
479 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
481 // GCC 3.3 optimization error
482 *(*output
)++ = quicktime_copy(y
);
483 *(*output
)++ = quicktime_copy(u
);
484 *(*output
)++ = quicktime_copy(v
);
485 *(*output
)++ = quicktime_copy(a
);
488 static inline void transfer_RGBA_FLOAT_to_YUV101010(unsigned char *(*output
),
491 int y
, u
, v
, r
, g
, b
, a
;
493 a
= (int)(CLIP(input
[3], 0, 1) * 0x101);
494 r
= (int)(CLIP(input
[0], 0, 1) * 0xff * a
);
495 g
= (int)(CLIP(input
[1], 0, 1) * 0xff * a
);
496 b
= (int)(CLIP(input
[2], 0, 1) * 0xff * a
);
498 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
499 WRITE_YUV101010(y
, u
, v
);
503 static inline void transfer_RGBA_FLOAT_to_YUV420P_YUV422P(unsigned char *output_y
,
504 unsigned char *output_u
,
505 unsigned char *output_v
,
509 int y
, u
, v
, r
, g
, b
, a
;
510 a
= (int)(CLIP(input
[3], 0, 1) * 0x101);
511 r
= (int)(CLIP(input
[0], 0, 1) * 0xff * a
);
512 g
= (int)(CLIP(input
[1], 0, 1) * 0xff * a
);
513 b
= (int)(CLIP(input
[2], 0, 1) * 0xff * a
);
515 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
517 output_y
[output_column
] = y
>> 8;
518 output_u
[output_column
/ 2] = u
>> 8;
519 output_v
[output_column
/ 2] = v
>> 8;
522 static inline void transfer_RGBA_FLOAT_to_YUV422(unsigned char *(*output
),
526 int y
, u
, v
, r
, g
, b
;
527 float a
= CLIP(input
[3], 0, 1);
528 r
= (int)(CLIP(input
[0], 0, 1) * a
* 0xffff);
529 g
= (int)(CLIP(input
[1], 0, 1) * a
* 0xffff);
530 b
= (int)(CLIP(input
[2], 0, 1) * a
* 0xffff);
532 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
535 // Store U and V for even pixels only
536 (*output
)[1] = u
>> 8;
537 (*output
)[3] = v
>> 8;
538 (*output
)[0] = y
>> 8;
542 // Store Y and advance output for odd pixels only
543 (*output
)[2] = y
>> 8;
549 static inline void transfer_RGBA_FLOAT_to_YUV444P(unsigned char *output_y
,
550 unsigned char *output_u
,
551 unsigned char *output_v
,
555 int y
, u
, v
, r
, g
, b
, a
;
556 a
= (int)(CLIP(input
[3], 0, 1) * 0x101);
557 r
= (int)(CLIP(input
[0], 0, 1) * 0xff * a
);
558 g
= (int)(CLIP(input
[1], 0, 1) * 0xff * a
);
559 b
= (int)(CLIP(input
[2], 0, 1) * 0xff * a
);
561 RGB_TO_YUV16(y
, u
, v
, r
, g
, b
);
563 output_y
[output_column
] = y
>> 8;
564 output_u
[output_column
] = u
>> 8;
565 output_v
[output_column
] = v
>> 8;
582 #define TRANSFER_DEFAULT(output, \
591 switch(in_colormodel) \
594 switch(out_colormodel) \
597 TRANSFER_FRAME_HEAD \
598 transfer_RGB_FLOAT_to_RGB8((output), (float*)(input)); \
599 TRANSFER_FRAME_TAIL \
602 TRANSFER_FRAME_HEAD \
603 transfer_RGB_FLOAT_to_BGR565((output), (float*)(input)); \
604 TRANSFER_FRAME_TAIL \
607 TRANSFER_FRAME_HEAD \
608 transfer_RGB_FLOAT_to_RGB565((output), (float*)(input)); \
609 TRANSFER_FRAME_TAIL \
612 TRANSFER_FRAME_HEAD \
613 transfer_RGB_FLOAT_to_BGR888((output), (float*)(input)); \
614 TRANSFER_FRAME_TAIL \
617 TRANSFER_FRAME_HEAD \
618 transfer_RGB_FLOAT_to_BGR8888((output), (float*)(input)); \
619 TRANSFER_FRAME_TAIL \
622 TRANSFER_FRAME_HEAD \
623 transfer_RGB_FLOAT_to_RGB888((output), (float*)(input)); \
624 TRANSFER_FRAME_TAIL \
627 TRANSFER_FRAME_HEAD \
628 transfer_RGB_FLOAT_to_RGBA8888((output), (float*)(input)); \
629 TRANSFER_FRAME_TAIL \
632 TRANSFER_FRAME_HEAD \
633 transfer_RGB_FLOAT_to_ARGB8888((output), (float*)(input)); \
634 TRANSFER_FRAME_TAIL \
636 case BC_RGBA_FLOAT: \
637 TRANSFER_FRAME_HEAD \
638 transfer_RGB_FLOAT_to_RGBA_FLOAT((float**)(output), (float*)(input)); \
639 TRANSFER_FRAME_TAIL \
642 TRANSFER_FRAME_HEAD \
643 transfer_RGB_FLOAT_to_YUV888((output), (float*)(input)); \
644 TRANSFER_FRAME_TAIL \
647 TRANSFER_FRAME_HEAD \
648 transfer_RGB_FLOAT_to_YUVA8888((output), (float*)(input)); \
649 TRANSFER_FRAME_TAIL \
652 TRANSFER_FRAME_HEAD \
653 transfer_RGB_FLOAT_to_YUV161616((uint16_t**)(output), (float*)(input)); \
654 TRANSFER_FRAME_TAIL \
656 case BC_YUVA16161616: \
657 TRANSFER_FRAME_HEAD \
658 transfer_RGB_FLOAT_to_YUVA16161616((uint16_t**)(output), (float*)(input)); \
659 TRANSFER_FRAME_TAIL \
662 TRANSFER_FRAME_HEAD \
663 transfer_RGB_FLOAT_to_YUV101010((output), (float*)(input)); \
664 TRANSFER_FRAME_TAIL \
667 TRANSFER_YUV420P_OUT_HEAD \
668 transfer_RGB_FLOAT_to_YUV420P_YUV422P(output_y, \
673 TRANSFER_FRAME_TAIL \
676 TRANSFER_YUV422P_OUT_HEAD \
677 transfer_RGB_FLOAT_to_YUV420P_YUV422P(output_y, \
682 TRANSFER_FRAME_TAIL \
685 TRANSFER_FRAME_HEAD \
686 transfer_RGB_FLOAT_to_YUV422((output), \
689 TRANSFER_FRAME_TAIL \
692 TRANSFER_YUV444P_OUT_HEAD \
693 transfer_RGB_FLOAT_to_YUV444P(output_y, \
698 TRANSFER_FRAME_TAIL \
703 case BC_RGBA_FLOAT: \
704 switch(out_colormodel) \
707 TRANSFER_FRAME_HEAD \
708 transfer_RGBA_FLOAT_to_RGB8((output), (float*)(input)); \
709 TRANSFER_FRAME_TAIL \
712 TRANSFER_FRAME_HEAD \
713 transfer_RGBA_FLOAT_to_BGR565((output), (float*)(input)); \
714 TRANSFER_FRAME_TAIL \
717 TRANSFER_FRAME_HEAD \
718 transfer_RGBA_FLOAT_to_RGB565((output), (float*)(input)); \
719 TRANSFER_FRAME_TAIL \
722 TRANSFER_FRAME_HEAD \
723 transfer_RGBA_FLOAT_to_BGR888((output), (float*)(input)); \
724 TRANSFER_FRAME_TAIL \
727 TRANSFER_FRAME_HEAD \
728 transfer_RGBA_FLOAT_to_BGR8888((output), (float*)(input)); \
729 TRANSFER_FRAME_TAIL \
732 TRANSFER_FRAME_HEAD \
733 transfer_RGBA_FLOAT_to_RGB888((output), (float*)(input)); \
734 TRANSFER_FRAME_TAIL \
737 TRANSFER_FRAME_HEAD \
738 transfer_RGBA_FLOAT_to_RGB_FLOAT((float**)(output), (float*)(input)); \
739 TRANSFER_FRAME_TAIL \
742 TRANSFER_FRAME_HEAD \
743 transfer_RGBA_FLOAT_to_RGBA8888((output), (float*)(input)); \
744 TRANSFER_FRAME_TAIL \
747 TRANSFER_FRAME_HEAD \
748 transfer_RGBA_FLOAT_to_ARGB8888((output), (float*)(input)); \
749 TRANSFER_FRAME_TAIL \
752 TRANSFER_FRAME_HEAD \
753 transfer_RGBA_FLOAT_to_YUV888((output), (float*)(input)); \
754 TRANSFER_FRAME_TAIL \
757 TRANSFER_FRAME_HEAD \
758 transfer_RGBA_FLOAT_to_YUVA8888((output), (float*)(input)); \
759 TRANSFER_FRAME_TAIL \
762 TRANSFER_FRAME_HEAD \
763 transfer_RGBA_FLOAT_to_YUV161616((uint16_t**)(output), (float*)(input)); \
764 TRANSFER_FRAME_TAIL \
766 case BC_YUVA16161616: \
767 TRANSFER_FRAME_HEAD \
768 transfer_RGBA_FLOAT_to_YUVA16161616((uint16_t**)(output), (float*)(input)); \
769 TRANSFER_FRAME_TAIL \
772 TRANSFER_FRAME_HEAD \
773 transfer_RGBA_FLOAT_to_YUV101010((output), (float*)(input)); \
774 TRANSFER_FRAME_TAIL \
777 TRANSFER_YUV420P_OUT_HEAD \
778 transfer_RGBA_FLOAT_to_YUV420P_YUV422P(output_y, \
783 TRANSFER_FRAME_TAIL \
786 TRANSFER_YUV422P_OUT_HEAD \
787 transfer_RGBA_FLOAT_to_YUV420P_YUV422P(output_y, \
792 TRANSFER_FRAME_TAIL \
795 TRANSFER_FRAME_HEAD \
796 transfer_RGBA_FLOAT_to_YUV422((output), \
799 TRANSFER_FRAME_TAIL \
802 TRANSFER_YUV444P_OUT_HEAD \
803 transfer_RGBA_FLOAT_to_YUV444P(output_y, \
808 TRANSFER_FRAME_TAIL \
817 void cmodel_float(PERMUTATION_ARGS
)
821 TRANSFER_DEFAULT(&output_row
,
822 input_row
+ column_table
[j
] * in_pixelsize
,
830 TRANSFER_DEFAULT(&output_row
,
831 input_row
+ j
* in_pixelsize
,