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 av_unused dst_type *dst1_1, *dst1_2, *dst2_1, *dst2_2; \
151 av_unused dst_type *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 av_unused const uint8_t *pu_1 = src[1] + (y >> !yuv422) * srcStride[1]; \
155 av_unused const uint8_t *pv_1 = src[2] + (y >> !yuv422) * srcStride[2]; \
156 av_unused const uint8_t *pu_2, *pv_2; \
157 av_unused const uint8_t *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 av_unused int 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 av_unused int 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
579 "No accelerated colorspace conversion found from %s to %s.\n",
583 switch (
c->opts.dst_format) {
586 return yuv422p_bgr48_c;
589 return yuv422p_rgb48_c;
592 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->opts.src_format))
593 return yuva422p_argb_c;
597 return (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->opts.src_format)) ? yuva422p_rgba_c : yuv422p_rgb32_c;
599 return yuv422p_rgb24_c;
601 return yuv422p_bgr24_c;
606 return yuv422p_bgr16;
611 return yuv422p_bgr15;
614 return yuv422p_bgr12;
623 return yuv422p_bgr4_byte;
625 return yuv2rgb_c_1_ordered_dither;
627 return yuv422p_gbrp_c;
630 switch (
c->opts.dst_format) {
633 return yuv2rgb_c_bgr48;
639 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->opts.src_format))
644 return (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->opts.src_format)) ? yuva2rgba_c : yuv2rgb_c_32;
646 return yuv2rgb_c_24_rgb;
648 return yuv2rgb_c_24_bgr;
653 return yuv2rgb_c_16_ordered_dither;
658 return yuv2rgb_c_15_ordered_dither;
661 return yuv2rgb_c_12_ordered_dither;
664 return yuv2rgb_c_8_ordered_dither;
667 return yuv2rgb_c_4_ordered_dither;
670 return yuv2rgb_c_4b_ordered_dither;
672 return yuv2rgb_c_1_ordered_dither;
674 return yuv420p_gbrp_c;
684 uint8_t *y_table = y_tab;
686 y_table -= elemsize * (
inc >> 9);
690 table[
i] = y_table + elemsize * (
cb >> 16);
697 int off = -(
inc >> 9);
701 table[
i] = elemsize * (off + (
cb >> 16));
705 static uint16_t roundToInt16(
int64_t f)
707 int r = (
f + (1 << 15)) >> 16;
718 int fullRange,
int brightness,
736 const int isNotNe =
c->opts.dst_format ==
AV_PIX_FMT_NE(RGB565LE, RGB565BE) ||
744 const int bpp =
c->dstFormatBpp;
761 cy = (cy * 255) / 219;
764 crv = (crv * 224) / 255;
765 cbu = (cbu * 224) / 255;
766 cgu = (cgu * 224) / 255;
767 cgv = (cgv * 224) / 255;
770 cy = (cy * contrast) >> 16;
775 oy -= 256LL * brightness;
777 c->uOffset = 0x0400040004000400LL;
778 c->vOffset = 0x0400040004000400LL;
779 c->yCoeff = roundToInt16(cy * (1 << 13)) * 0x0001000100010001ULL;
780 c->vrCoeff = roundToInt16(crv * (1 << 13)) * 0x0001000100010001ULL;
781 c->ubCoeff = roundToInt16(cbu * (1 << 13)) * 0x0001000100010001ULL;
782 c->vgCoeff = roundToInt16(cgv * (1 << 13)) * 0x0001000100010001ULL;
783 c->ugCoeff = roundToInt16(cgu * (1 << 13)) * 0x0001000100010001ULL;
784 c->yOffset = roundToInt16(oy * (1 << 3)) * 0x0001000100010001ULL;
786 c->yuv2rgb_y_coeff = (int16_t)roundToInt16(cy * (1 << 13));
787 c->yuv2rgb_y_offset = (int16_t)roundToInt16(oy * (1 << 9));
788 c->yuv2rgb_v2r_coeff = (int16_t)roundToInt16(crv * (1 << 13));
789 c->yuv2rgb_v2g_coeff = (int16_t)roundToInt16(cgv * (1 << 13));
790 c->yuv2rgb_u2g_coeff = (int16_t)roundToInt16(cgu * (1 << 13));
791 c->yuv2rgb_u2b_coeff = (int16_t)roundToInt16(cbu * (1 << 13));
794 crv = ((crv * (1 << 16)) + 0x8000) /
FFMAX(cy, 1);
795 cbu = ((cbu * (1 << 16)) + 0x8000) /
FFMAX(cy, 1);
796 cgu = ((cgu * (1 << 16)) + 0x8000) /
FFMAX(cy, 1);
797 cgv = ((cgv * (1 << 16)) + 0x8000) /
FFMAX(cy, 1);
801 #define ALLOC_YUV_TABLE(x) \
802 c->yuvTable = av_malloc(x); \
804 return AVERROR(ENOMEM);
808 y_table =
c->yuvTable;
810 for (
i = 0;
i < table_plane_size - 110;
i++) {
814 fill_table(
c->table_gU, 1, cgu, y_table + yoffs);
815 fill_gv_table(
c->table_gV, 1, cgv);
819 rbase = isRgb ? 3 : 0;
821 bbase = isRgb ? 0 : 3;
823 y_table =
c->yuvTable;
825 for (
i = 0;
i < table_plane_size - 110;
i++) {
827 y_table[
i + 110] = (yval >> 7) << rbase;
828 y_table[
i + 37 + table_plane_size] = ((yval + 43) / 85) << gbase;
829 y_table[
i + 110 + 2*table_plane_size] = (yval >> 7) << bbase;
832 fill_table(
c->table_rV, 1, crv, y_table + yoffs);
833 fill_table(
c->table_gU, 1, cgu, y_table + yoffs + table_plane_size);
834 fill_table(
c->table_bU, 1, cbu, y_table + yoffs + 2*table_plane_size);
835 fill_gv_table(
c->table_gV, 1, cgv);
838 rbase = isRgb ? 5 : 0;
839 gbase = isRgb ? 2 : 3;
840 bbase = isRgb ? 0 : 6;
842 y_table =
c->yuvTable;
844 for (
i = 0;
i < table_plane_size - 38;
i++) {
846 y_table[
i + 16] = ((yval + 18) / 36) << rbase;
847 y_table[
i + 16 + table_plane_size] = ((yval + 18) / 36) << gbase;
848 y_table[
i + 37 + 2*table_plane_size] = ((yval + 43) / 85) << bbase;
851 fill_table(
c->table_rV, 1, crv, y_table + yoffs);
852 fill_table(
c->table_gU, 1, cgu, y_table + yoffs + table_plane_size);
853 fill_table(
c->table_bU, 1, cbu, y_table + yoffs + 2*table_plane_size);
854 fill_gv_table(
c->table_gV, 1, cgv);
857 rbase = isRgb ? 8 : 0;
859 bbase = isRgb ? 0 : 8;
861 y_table16 =
c->yuvTable;
863 for (
i = 0;
i < table_plane_size;
i++) {
865 y_table16[
i] = (yval >> 4) << rbase;
866 y_table16[
i + table_plane_size] = (yval >> 4) << gbase;
867 y_table16[
i + 2*table_plane_size] = (yval >> 4) << bbase;
871 for (
i = 0;
i < table_plane_size * 3;
i++)
873 fill_table(
c->table_rV, 2, crv, y_table16 + yoffs);
874 fill_table(
c->table_gU, 2, cgu, y_table16 + yoffs + table_plane_size);
875 fill_table(
c->table_bU, 2, cbu, y_table16 + yoffs + 2*table_plane_size);
876 fill_gv_table(
c->table_gV, 2, cgv);
880 rbase = isRgb ? bpp - 5 : 0;
882 bbase = isRgb ? 0 : (bpp - 5);
884 y_table16 =
c->yuvTable;
886 for (
i = 0;
i < table_plane_size;
i++) {
888 y_table16[
i] = (yval >> 3) << rbase;
889 y_table16[
i + table_plane_size] = (yval >> (18 - bpp)) << gbase;
890 y_table16[
i + 2*table_plane_size] = (yval >> 3) << bbase;
894 for (
i = 0;
i < table_plane_size * 3;
i++)
896 fill_table(
c->table_rV, 2, crv, y_table16 + yoffs);
897 fill_table(
c->table_gU, 2, cgu, y_table16 + yoffs + table_plane_size);
898 fill_table(
c->table_bU, 2, cbu, y_table16 + yoffs + 2*table_plane_size);
899 fill_gv_table(
c->table_gV, 2, cgv);
904 y_table =
c->yuvTable;
906 for (
i = 0;
i < table_plane_size;
i++) {
910 fill_table(
c->table_rV, 1, crv, y_table + yoffs);
911 fill_table(
c->table_gU, 1, cgu, y_table + yoffs);
912 fill_table(
c->table_bU, 1, cbu, y_table + yoffs);
913 fill_gv_table(
c->table_gV, 1, cgv);
916 rbase = isRgb ? 20 : 0;
918 bbase = isRgb ? 0 : 20;
919 needAlpha = CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->opts.src_format);
923 y_table32 =
c->yuvTable;
925 for (
i = 0;
i < table_plane_size;
i++) {
927 y_table32[
i]= (yval << rbase) + (needAlpha ? 0 : (255
u << abase));
928 y_table32[
i + table_plane_size] = yval << gbase;
929 y_table32[
i + 2 * table_plane_size] = yval << bbase;
933 for (
i = 0;
i < table_plane_size * 3;
i++)
936 fill_table(
c->table_rV, 4, crv, y_table32 + yoffs);
937 fill_table(
c->table_gU, 4, cgu, y_table32 + yoffs + table_plane_size);
938 fill_table(
c->table_bU, 4, cbu, y_table32 + yoffs + 2 * table_plane_size);
939 fill_gv_table(
c->table_gV, 4, cgv);
945 rbase =
base + (isRgb ? 16 : 0);
947 bbase =
base + (isRgb ? 0 : 16);
948 needAlpha = CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->opts.src_format);
950 abase = (
base + 24) & 31;
952 y_table32 =
c->yuvTable;
954 for (
i = 0;
i < table_plane_size;
i++) {
956 y_table32[
i] = (yval << rbase) +
957 (needAlpha ? 0 : (255
u << abase));
958 y_table32[
i + table_plane_size] = yval << gbase;
959 y_table32[
i + 2*table_plane_size] = yval << bbase;
962 fill_table(
c->table_rV, 4, crv, y_table32 + yoffs);
963 fill_table(
c->table_gU, 4, cgu, y_table32 + yoffs + table_plane_size);
964 fill_table(
c->table_bU, 4, cbu, y_table32 + yoffs + 2*table_plane_size);
965 fill_gv_table(
c->table_gV, 4, cgv);
968 if(!
isPlanar(
c->opts.dst_format) || bpp <= 24)