48 { 104597, 132201, 25675, 53279 },
49 { 117489, 138438, 13975, 34925 },
50 { 104597, 132201, 25675, 53279 },
51 { 104597, 132201, 25675, 53279 },
52 { 104448, 132798, 24759, 53109 },
53 { 104597, 132201, 25675, 53279 },
54 { 104597, 132201, 25675, 53279 },
55 { 117579, 136230, 16907, 35559 },
57 { 110013, 140363, 12277, 42626 },
58 { 110013, 140363, 12277, 42626 },
63 if (colorspace > 10 || colorspace < 0 || colorspace == 8)
68 #define LOADCHROMA(l, i) \
71 r = (void *)c->table_rV[V+YUVRGB_TABLE_HEADROOM]; \
72 g = (void *)(c->table_gU[U+YUVRGB_TABLE_HEADROOM] + c->table_gV[V+YUVRGB_TABLE_HEADROOM]); \
73 b = (void *)c->table_bU[U+YUVRGB_TABLE_HEADROOM];
75 #define PUTRGB(l, i, abase) \
77 dst_##l[2 * i] = r[Y] + g[Y] + b[Y]; \
78 Y = py_##l[2 * i + 1]; \
79 dst_##l[2 * i + 1] = r[Y] + g[Y] + b[Y];
81 #define PUTRGB24(l, i, abase) \
83 dst_##l[6 * i + 0] = r[Y]; \
84 dst_##l[6 * i + 1] = g[Y]; \
85 dst_##l[6 * i + 2] = b[Y]; \
86 Y = py_##l[2 * i + 1]; \
87 dst_##l[6 * i + 3] = r[Y]; \
88 dst_##l[6 * i + 4] = g[Y]; \
89 dst_##l[6 * i + 5] = b[Y];
91 #define PUTBGR24(l, i, abase) \
93 dst_##l[6 * i + 0] = b[Y]; \
94 dst_##l[6 * i + 1] = g[Y]; \
95 dst_##l[6 * i + 2] = r[Y]; \
96 Y = py_##l[2 * i + 1]; \
97 dst_##l[6 * i + 3] = b[Y]; \
98 dst_##l[6 * i + 4] = g[Y]; \
99 dst_##l[6 * i + 5] = r[Y];
101 #define PUTRGBA(l, i, abase) \
103 dst_##l[2 * i] = r[Y] + g[Y] + b[Y] + ((uint32_t)(pa_##l[2 * i]) << abase); \
104 Y = py_##l[2 * i + 1]; \
105 dst_##l[2 * i + 1] = r[Y] + g[Y] + b[Y] + ((uint32_t)(pa_##l[2 * i + 1]) << abase);
107 #define PUTRGB48(l, i, abase) \
108 Y = py_##l[ 2 * i]; \
109 dst_##l[12 * i + 0] = dst_##l[12 * i + 1] = r[Y]; \
110 dst_##l[12 * i + 2] = dst_##l[12 * i + 3] = g[Y]; \
111 dst_##l[12 * i + 4] = dst_##l[12 * i + 5] = b[Y]; \
112 Y = py_##l[ 2 * i + 1]; \
113 dst_##l[12 * i + 6] = dst_##l[12 * i + 7] = r[Y]; \
114 dst_##l[12 * i + 8] = dst_##l[12 * i + 9] = g[Y]; \
115 dst_##l[12 * i + 10] = dst_##l[12 * i + 11] = b[Y];
117 #define PUTBGR48(l, i, abase) \
119 dst_##l[12 * i + 0] = dst_##l[12 * i + 1] = b[Y]; \
120 dst_##l[12 * i + 2] = dst_##l[12 * i + 3] = g[Y]; \
121 dst_##l[12 * i + 4] = dst_##l[12 * i + 5] = r[Y]; \
122 Y = py_##l[2 * i + 1]; \
123 dst_##l[12 * i + 6] = dst_##l[12 * i + 7] = b[Y]; \
124 dst_##l[12 * i + 8] = dst_##l[12 * i + 9] = g[Y]; \
125 dst_##l[12 * i + 10] = dst_##l[12 * i + 11] = r[Y];
127 #define PUTGBRP(l, i, abase) \
129 dst_##l [2 * i + 0] = g[Y]; \
130 dst1_##l[2 * i + 0] = b[Y]; \
131 dst2_##l[2 * i + 0] = r[Y]; \
132 Y = py_##l[2 * i + 1]; \
133 dst_##l [2 * i + 1] = g[Y]; \
134 dst1_##l[2 * i + 1] = b[Y]; \
135 dst2_##l[2 * i + 1] = r[Y];
137 #define YUV2RGBFUNC(func_name, dst_type, alpha, yuv422, nb_dst_planes) \
138 static int func_name(SwsInternal *c, const uint8_t *const src[], \
139 const int srcStride[], int srcSliceY, int srcSliceH, \
140 uint8_t *const dst[], const int dstStride[]) \
144 for (y = 0; y < srcSliceH; y += 2) { \
145 int yd = y + srcSliceY; \
147 (dst_type *)(dst[0] + (yd) * dstStride[0]); \
149 (dst_type *)(dst[0] + (yd + 1) * dstStride[0]); \
150 dst_type av_unused *dst1_1, *dst1_2, *dst2_1, *dst2_2; \
151 dst_type av_unused *r, *g, *b; \
152 const uint8_t *py_1 = src[0] + y * srcStride[0]; \
153 const uint8_t *py_2 = py_1 + srcStride[0]; \
154 const uint8_t av_unused *pu_1 = src[1] + (y >> !yuv422) * srcStride[1]; \
155 const uint8_t av_unused *pv_1 = src[2] + (y >> !yuv422) * srcStride[2]; \
156 const uint8_t av_unused *pu_2, *pv_2; \
157 const uint8_t av_unused *pa_1, *pa_2; \
158 unsigned int h_size = c->opts.dst_w >> 3; \
159 if (nb_dst_planes > 1) { \
160 dst1_1 = (dst_type *)(dst[1] + (yd) * dstStride[1]); \
161 dst1_2 = (dst_type *)(dst[1] + (yd + 1) * dstStride[1]); \
162 dst2_1 = (dst_type *)(dst[2] + (yd) * dstStride[2]); \
163 dst2_2 = (dst_type *)(dst[2] + (yd + 1) * dstStride[2]); \
166 pu_2 = pu_1 + srcStride[1]; \
167 pv_2 = pv_1 + srcStride[2]; \
170 pa_1 = src[3] + y * srcStride[3]; \
171 pa_2 = pa_1 + srcStride[3]; \
174 int av_unused U, V, Y; \
176 #define ENDYUV2RGBLINE(dst_delta, ss, alpha, yuv422, nb_dst_planes) \
189 dst_1 += dst_delta >> ss; \
190 dst_2 += dst_delta >> ss; \
191 if (nb_dst_planes > 1) { \
192 dst1_1 += dst_delta >> ss; \
193 dst1_2 += dst_delta >> ss; \
194 dst2_1 += dst_delta >> ss; \
195 dst2_2 += dst_delta >> ss; \
198 if (c->opts.dst_w & (4 >> ss)) { \
199 int av_unused Y, U, V; \
201 #define ENDYUV2RGBFUNC() \
207 #define YUV420FUNC(func_name, dst_type, alpha, abase, PUTFUNC, dst_delta, nb_dst_planes) \
208 YUV2RGBFUNC(func_name, dst_type, alpha, 0, nb_dst_planes) \
210 PUTFUNC(1, 0, abase); \
211 PUTFUNC(2, 0, abase); \
214 PUTFUNC(2, 1, abase); \
215 PUTFUNC(1, 1, abase); \
218 PUTFUNC(1, 2, abase); \
219 PUTFUNC(2, 2, abase); \
222 PUTFUNC(2, 3, abase); \
223 PUTFUNC(1, 3, abase); \
224 ENDYUV2RGBLINE(dst_delta, 0, alpha, 0, nb_dst_planes) \
226 PUTFUNC(1, 0, abase); \
227 PUTFUNC(2, 0, abase); \
230 PUTFUNC(2, 1, abase); \
231 PUTFUNC(1, 1, abase); \
232 ENDYUV2RGBLINE(dst_delta, 1, alpha, 0, nb_dst_planes) \
234 PUTFUNC(1, 0, abase); \
235 PUTFUNC(2, 0, abase); \
238 #define YUV422FUNC(func_name, dst_type, alpha, abase, PUTFUNC, dst_delta, nb_dst_planes) \
239 YUV2RGBFUNC(func_name, dst_type, alpha, 1, nb_dst_planes) \
241 PUTFUNC(1, 0, abase); \
244 PUTFUNC(2, 0, abase); \
247 PUTFUNC(2, 1, abase); \
250 PUTFUNC(1, 1, abase); \
253 PUTFUNC(1, 2, abase); \
256 PUTFUNC(2, 2, abase); \
259 PUTFUNC(2, 3, abase); \
262 PUTFUNC(1, 3, abase); \
263 ENDYUV2RGBLINE(dst_delta, 0, alpha, 1, nb_dst_planes) \
265 PUTFUNC(1, 0, abase); \
268 PUTFUNC(2, 0, abase); \
271 PUTFUNC(2, 1, abase); \
274 PUTFUNC(1, 1, abase); \
275 ENDYUV2RGBLINE(dst_delta, 1, alpha, 1, nb_dst_planes) \
277 PUTFUNC(1, 0, abase); \
280 PUTFUNC(2, 0, abase); \
283 #define YUV420FUNC_DITHER(func_name, dst_type, LOADDITHER, PUTFUNC, dst_delta) \
284 YUV2RGBFUNC(func_name, dst_type, 0, 0, 1) \
289 PUTFUNC(2, 0, 0 + 8); \
292 PUTFUNC(2, 1, 2 + 8); \
297 PUTFUNC(2, 2, 4 + 8); \
300 PUTFUNC(2, 3, 6 + 8); \
302 ENDYUV2RGBLINE(dst_delta, 0, 0, 0, 1) \
307 PUTFUNC(2, 0, 0 + 8); \
310 PUTFUNC(2, 1, 2 + 8); \
312 ENDYUV2RGBLINE(dst_delta, 1, 0, 0, 1) \
317 PUTFUNC(2, 0, 0 + 8); \
320 #define YUV422FUNC_DITHER(func_name, dst_type, LOADDITHER, PUTFUNC, dst_delta) \
321 YUV2RGBFUNC(func_name, dst_type, 0, 1, 1) \
328 PUTFUNC(2, 0, 0 + 8); \
331 PUTFUNC(2, 1, 2 + 8); \
340 PUTFUNC(2, 2, 4 + 8); \
343 PUTFUNC(2, 3, 6 + 8); \
347 ENDYUV2RGBLINE(dst_delta, 0, 0, 1, 1) \
354 PUTFUNC(2, 0, 0 + 8); \
357 PUTFUNC(2, 1, 2 + 8); \
361 ENDYUV2RGBLINE(dst_delta, 1, 0, 1, 1) \
368 PUTFUNC(2, 0, 0 + 8); \
371 #define LOADDITHER16 \
372 const uint8_t *d16 = ff_dither_2x2_8[y & 1]; \
373 const uint8_t *e16 = ff_dither_2x2_4[y & 1]; \
374 const uint8_t *f16 = ff_dither_2x2_8[(y & 1)^1];
376 #define PUTRGB16(l, i, o) \
378 dst_##l[2 * i] = r[Y + d16[0 + o]] + \
379 g[Y + e16[0 + o]] + \
381 Y = py_##l[2 * i + 1]; \
382 dst_##l[2 * i + 1] = r[Y + d16[1 + o]] + \
383 g[Y + e16[1 + o]] + \
386 #define LOADDITHER15 \
387 const uint8_t *d16 = ff_dither_2x2_8[y & 1]; \
388 const uint8_t *e16 = ff_dither_2x2_8[(y & 1)^1];
390 #define PUTRGB15(l, i, o) \
392 dst_##l[2 * i] = r[Y + d16[0 + o]] + \
393 g[Y + d16[1 + o]] + \
395 Y = py_##l[2 * i + 1]; \
396 dst_##l[2 * i + 1] = r[Y + d16[1 + o]] + \
397 g[Y + d16[0 + o]] + \
400 #define LOADDITHER12 \
401 const uint8_t *d16 = ff_dither_4x4_16[y & 3];
403 #define PUTRGB12(l, i, o) \
405 dst_##l[2 * i] = r[Y + d16[0 + o]] + \
406 g[Y + d16[0 + o]] + \
408 Y = py_##l[2 * i + 1]; \
409 dst_##l[2 * i + 1] = r[Y + d16[1 + o]] + \
410 g[Y + d16[1 + o]] + \
413 #define LOADDITHER8 \
414 const uint8_t *d32 = ff_dither_8x8_32[yd & 7]; \
415 const uint8_t *d64 = ff_dither_8x8_73[yd & 7];
417 #define PUTRGB8(l, i, o) \
419 dst_##l[2 * i] = r[Y + d32[0 + o]] + \
420 g[Y + d32[0 + o]] + \
422 Y = py_##l[2 * i + 1]; \
423 dst_##l[2 * i + 1] = r[Y + d32[1 + o]] + \
424 g[Y + d32[1 + o]] + \
427 #define LOADDITHER4D \
428 const uint8_t * d64 = ff_dither_8x8_73[yd & 7]; \
429 const uint8_t *d128 = ff_dither_8x8_220[yd & 7]; \
432 #define PUTRGB4D(l, i, o) \
434 acc = r[Y + d128[0 + o]] + \
435 g[Y + d64[0 + o]] + \
436 b[Y + d128[0 + o]]; \
437 Y = py_##l[2 * i + 1]; \
438 acc |= (r[Y + d128[1 + o]] + \
439 g[Y + d64[1 + o]] + \
440 b[Y + d128[1 + o]]) << 4; \
443 #define LOADDITHER4DB \
444 const uint8_t *d64 = ff_dither_8x8_73[yd & 7]; \
445 const uint8_t *d128 = ff_dither_8x8_220[yd & 7];
447 #define PUTRGB4DB(l, i, o) \
449 dst_##l[2 * i] = r[Y + d128[0 + o]] + \
450 g[Y + d64[0 + o]] + \
451 b[Y + d128[0 + o]]; \
452 Y = py_##l[2 * i + 1]; \
453 dst_##l[2 * i + 1] = r[Y + d128[1 + o]] + \
454 g[Y + d64[1 + o]] + \
457 YUV2RGBFUNC(yuv2rgb_c_1_ordered_dither, uint8_t, 0, 0, 1)
462 #define PUTRGB1(out, src, i, o) \
464 out += out + g[Y + d128[0 + o]]; \
465 Y = src[2 * i + 1]; \
466 out += out + g[Y + d128[1 + o]];
488 if (
c->opts.dst_w & 7) {
490 int pixels_left =
c->opts.dst_w & 7;
495 #define PUTRGB1_OR00(out, src, i, o) \
497 PUTRGB1(out, src, i, o) \
569 #elif ARCH_LOONGARCH64
577 "No accelerated colorspace conversion found from %s to %s.\n",
581 switch (
c->opts.dst_format) {
584 return yuv422p_bgr48_c;
587 return yuv422p_rgb48_c;
590 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->opts.src_format))
591 return yuva422p_argb_c;
594 return (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->opts.src_format)) ? yuva422p_rgba_c : yuv422p_rgb32_c;
596 return yuv422p_rgb24_c;
598 return yuv422p_bgr24_c;
601 return yuv422p_bgr16;
604 return yuv422p_bgr15;
607 return yuv422p_bgr12;
616 return yuv422p_bgr4_byte;
618 return yuv2rgb_c_1_ordered_dither;
620 return yuv422p_gbrp_c;
623 switch (
c->opts.dst_format) {
626 return yuv2rgb_c_bgr48;
632 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->opts.src_format))
636 return (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->opts.src_format)) ? yuva2rgba_c : yuv2rgb_c_32;
638 return yuv2rgb_c_24_rgb;
640 return yuv2rgb_c_24_bgr;
643 return yuv2rgb_c_16_ordered_dither;
646 return yuv2rgb_c_15_ordered_dither;
649 return yuv2rgb_c_12_ordered_dither;
652 return yuv2rgb_c_8_ordered_dither;
655 return yuv2rgb_c_4_ordered_dither;
658 return yuv2rgb_c_4b_ordered_dither;
660 return yuv2rgb_c_1_ordered_dither;
662 return yuv420p_gbrp_c;
672 uint8_t *y_table = y_tab;
674 y_table -= elemsize * (
inc >> 9);
678 table[
i] = y_table + elemsize * (
cb >> 16);
685 int off = -(
inc >> 9);
689 table[
i] = elemsize * (off + (
cb >> 16));
693 static uint16_t roundToInt16(
int64_t f)
695 int r = (
f + (1 << 15)) >> 16;
706 int fullRange,
int brightness,
724 const int isNotNe =
c->opts.dst_format ==
AV_PIX_FMT_NE(RGB565LE, RGB565BE) ||
732 const int bpp =
c->dstFormatBpp;
749 cy = (cy * 255) / 219;
752 crv = (crv * 224) / 255;
753 cbu = (cbu * 224) / 255;
754 cgu = (cgu * 224) / 255;
755 cgv = (cgv * 224) / 255;
758 cy = (cy * contrast) >> 16;
763 oy -= 256LL * brightness;
765 c->uOffset = 0x0400040004000400LL;
766 c->vOffset = 0x0400040004000400LL;
767 c->yCoeff = roundToInt16(cy * (1 << 13)) * 0x0001000100010001ULL;
768 c->vrCoeff = roundToInt16(crv * (1 << 13)) * 0x0001000100010001ULL;
769 c->ubCoeff = roundToInt16(cbu * (1 << 13)) * 0x0001000100010001ULL;
770 c->vgCoeff = roundToInt16(cgv * (1 << 13)) * 0x0001000100010001ULL;
771 c->ugCoeff = roundToInt16(cgu * (1 << 13)) * 0x0001000100010001ULL;
772 c->yOffset = roundToInt16(oy * (1 << 3)) * 0x0001000100010001ULL;
774 c->yuv2rgb_y_coeff = (int16_t)roundToInt16(cy * (1 << 13));
775 c->yuv2rgb_y_offset = (int16_t)roundToInt16(oy * (1 << 9));
776 c->yuv2rgb_v2r_coeff = (int16_t)roundToInt16(crv * (1 << 13));
777 c->yuv2rgb_v2g_coeff = (int16_t)roundToInt16(cgv * (1 << 13));
778 c->yuv2rgb_u2g_coeff = (int16_t)roundToInt16(cgu * (1 << 13));
779 c->yuv2rgb_u2b_coeff = (int16_t)roundToInt16(cbu * (1 << 13));
782 crv = ((crv * (1 << 16)) + 0x8000) /
FFMAX(cy, 1);
783 cbu = ((cbu * (1 << 16)) + 0x8000) /
FFMAX(cy, 1);
784 cgu = ((cgu * (1 << 16)) + 0x8000) /
FFMAX(cy, 1);
785 cgv = ((cgv * (1 << 16)) + 0x8000) /
FFMAX(cy, 1);
789 #define ALLOC_YUV_TABLE(x) \
790 c->yuvTable = av_malloc(x); \
792 return AVERROR(ENOMEM);
796 y_table =
c->yuvTable;
798 for (
i = 0;
i < table_plane_size - 110;
i++) {
802 fill_table(
c->table_gU, 1, cgu, y_table + yoffs);
803 fill_gv_table(
c->table_gV, 1, cgv);
807 rbase = isRgb ? 3 : 0;
809 bbase = isRgb ? 0 : 3;
811 y_table =
c->yuvTable;
813 for (
i = 0;
i < table_plane_size - 110;
i++) {
815 y_table[
i + 110] = (yval >> 7) << rbase;
816 y_table[
i + 37 + table_plane_size] = ((yval + 43) / 85) << gbase;
817 y_table[
i + 110 + 2*table_plane_size] = (yval >> 7) << bbase;
820 fill_table(
c->table_rV, 1, crv, y_table + yoffs);
821 fill_table(
c->table_gU, 1, cgu, y_table + yoffs + table_plane_size);
822 fill_table(
c->table_bU, 1, cbu, y_table + yoffs + 2*table_plane_size);
823 fill_gv_table(
c->table_gV, 1, cgv);
826 rbase = isRgb ? 5 : 0;
827 gbase = isRgb ? 2 : 3;
828 bbase = isRgb ? 0 : 6;
830 y_table =
c->yuvTable;
832 for (
i = 0;
i < table_plane_size - 38;
i++) {
834 y_table[
i + 16] = ((yval + 18) / 36) << rbase;
835 y_table[
i + 16 + table_plane_size] = ((yval + 18) / 36) << gbase;
836 y_table[
i + 37 + 2*table_plane_size] = ((yval + 43) / 85) << bbase;
839 fill_table(
c->table_rV, 1, crv, y_table + yoffs);
840 fill_table(
c->table_gU, 1, cgu, y_table + yoffs + table_plane_size);
841 fill_table(
c->table_bU, 1, cbu, y_table + yoffs + 2*table_plane_size);
842 fill_gv_table(
c->table_gV, 1, cgv);
845 rbase = isRgb ? 8 : 0;
847 bbase = isRgb ? 0 : 8;
849 y_table16 =
c->yuvTable;
851 for (
i = 0;
i < table_plane_size;
i++) {
853 y_table16[
i] = (yval >> 4) << rbase;
854 y_table16[
i + table_plane_size] = (yval >> 4) << gbase;
855 y_table16[
i + 2*table_plane_size] = (yval >> 4) << bbase;
859 for (
i = 0;
i < table_plane_size * 3;
i++)
861 fill_table(
c->table_rV, 2, crv, y_table16 + yoffs);
862 fill_table(
c->table_gU, 2, cgu, y_table16 + yoffs + table_plane_size);
863 fill_table(
c->table_bU, 2, cbu, y_table16 + yoffs + 2*table_plane_size);
864 fill_gv_table(
c->table_gV, 2, cgv);
868 rbase = isRgb ? bpp - 5 : 0;
870 bbase = isRgb ? 0 : (bpp - 5);
872 y_table16 =
c->yuvTable;
874 for (
i = 0;
i < table_plane_size;
i++) {
876 y_table16[
i] = (yval >> 3) << rbase;
877 y_table16[
i + table_plane_size] = (yval >> (18 - bpp)) << gbase;
878 y_table16[
i + 2*table_plane_size] = (yval >> 3) << bbase;
882 for (
i = 0;
i < table_plane_size * 3;
i++)
884 fill_table(
c->table_rV, 2, crv, y_table16 + yoffs);
885 fill_table(
c->table_gU, 2, cgu, y_table16 + yoffs + table_plane_size);
886 fill_table(
c->table_bU, 2, cbu, y_table16 + yoffs + 2*table_plane_size);
887 fill_gv_table(
c->table_gV, 2, cgv);
892 y_table =
c->yuvTable;
894 for (
i = 0;
i < table_plane_size;
i++) {
898 fill_table(
c->table_rV, 1, crv, y_table + yoffs);
899 fill_table(
c->table_gU, 1, cgu, y_table + yoffs);
900 fill_table(
c->table_bU, 1, cbu, y_table + yoffs);
901 fill_gv_table(
c->table_gV, 1, cgv);
904 rbase = isRgb ? 20 : 0;
906 bbase = isRgb ? 0 : 20;
907 needAlpha = CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->opts.src_format);
911 y_table32 =
c->yuvTable;
913 for (
i = 0;
i < table_plane_size;
i++) {
915 y_table32[
i]= (yval << rbase) + (needAlpha ? 0 : (255
u << abase));
916 y_table32[
i + table_plane_size] = yval << gbase;
917 y_table32[
i + 2 * table_plane_size] = yval << bbase;
921 for (
i = 0;
i < table_plane_size * 3;
i++)
924 fill_table(
c->table_rV, 4, crv, y_table32 + yoffs);
925 fill_table(
c->table_gU, 4, cgu, y_table32 + yoffs + table_plane_size);
926 fill_table(
c->table_bU, 4, cbu, y_table32 + yoffs + 2 * table_plane_size);
927 fill_gv_table(
c->table_gV, 4, cgv);
933 rbase =
base + (isRgb ? 16 : 0);
935 bbase =
base + (isRgb ? 0 : 16);
936 needAlpha = CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->opts.src_format);
938 abase = (
base + 24) & 31;
940 y_table32 =
c->yuvTable;
942 for (
i = 0;
i < table_plane_size;
i++) {
944 y_table32[
i] = (yval << rbase) +
945 (needAlpha ? 0 : (255
u << abase));
946 y_table32[
i + table_plane_size] = yval << gbase;
947 y_table32[
i + 2*table_plane_size] = yval << bbase;
950 fill_table(
c->table_rV, 4, crv, y_table32 + yoffs);
951 fill_table(
c->table_gU, 4, cgu, y_table32 + yoffs + table_plane_size);
952 fill_table(
c->table_bU, 4, cbu, y_table32 + yoffs + 2*table_plane_size);
953 fill_gv_table(
c->table_gV, 4, cgv);
956 if(!
isPlanar(
c->opts.dst_format) || bpp <= 24)