Lines Matching refs:comps

113     upb = (int)img->comps[0].prec;  in sycc444_to_rgb()
117 maxw = (size_t)img->comps[0].w; in sycc444_to_rgb()
118 maxh = (size_t)img->comps[0].h; in sycc444_to_rgb()
121 y = img->comps[0].data; in sycc444_to_rgb()
122 cb = img->comps[1].data; in sycc444_to_rgb()
123 cr = img->comps[2].data; in sycc444_to_rgb()
142 opj_image_data_free(img->comps[0].data); in sycc444_to_rgb()
143 img->comps[0].data = d0; in sycc444_to_rgb()
144 opj_image_data_free(img->comps[1].data); in sycc444_to_rgb()
145 img->comps[1].data = d1; in sycc444_to_rgb()
146 opj_image_data_free(img->comps[2].data); in sycc444_to_rgb()
147 img->comps[2].data = d2; in sycc444_to_rgb()
165 upb = (int)img->comps[0].prec; in sycc422_to_rgb()
169 maxw = (size_t)img->comps[0].w; in sycc422_to_rgb()
170 maxh = (size_t)img->comps[0].h; in sycc422_to_rgb()
173 y = img->comps[0].data; in sycc422_to_rgb()
174 cb = img->comps[1].data; in sycc422_to_rgb()
175 cr = img->comps[2].data; in sycc422_to_rgb()
225 opj_image_data_free(img->comps[0].data); in sycc422_to_rgb()
226 img->comps[0].data = d0; in sycc422_to_rgb()
227 opj_image_data_free(img->comps[1].data); in sycc422_to_rgb()
228 img->comps[1].data = d1; in sycc422_to_rgb()
229 opj_image_data_free(img->comps[2].data); in sycc422_to_rgb()
230 img->comps[2].data = d2; in sycc422_to_rgb()
232 img->comps[1].w = img->comps[2].w = img->comps[0].w; in sycc422_to_rgb()
233 img->comps[1].h = img->comps[2].h = img->comps[0].h; in sycc422_to_rgb()
234 img->comps[1].dx = img->comps[2].dx = img->comps[0].dx; in sycc422_to_rgb()
235 img->comps[1].dy = img->comps[2].dy = img->comps[0].dy; in sycc422_to_rgb()
253 upb = (int)img->comps[0].prec; in sycc420_to_rgb()
257 maxw = (size_t)img->comps[0].w; in sycc420_to_rgb()
258 maxh = (size_t)img->comps[0].h; in sycc420_to_rgb()
261 y = img->comps[0].data; in sycc420_to_rgb()
262 cb = img->comps[1].data; in sycc420_to_rgb()
263 cr = img->comps[2].data; in sycc420_to_rgb()
383 opj_image_data_free(img->comps[0].data); in sycc420_to_rgb()
384 img->comps[0].data = d0; in sycc420_to_rgb()
385 opj_image_data_free(img->comps[1].data); in sycc420_to_rgb()
386 img->comps[1].data = d1; in sycc420_to_rgb()
387 opj_image_data_free(img->comps[2].data); in sycc420_to_rgb()
388 img->comps[2].data = d2; in sycc420_to_rgb()
390 img->comps[1].w = img->comps[2].w = img->comps[0].w; in sycc420_to_rgb()
391 img->comps[1].h = img->comps[2].h = img->comps[0].h; in sycc420_to_rgb()
392 img->comps[1].dx = img->comps[2].dx = img->comps[0].dx; in sycc420_to_rgb()
393 img->comps[1].dy = img->comps[2].dy = img->comps[0].dy; in sycc420_to_rgb()
410 if ((img->comps[0].dx == 1) in color_sycc_to_rgb()
411 && (img->comps[1].dx == 2) in color_sycc_to_rgb()
412 && (img->comps[2].dx == 2) in color_sycc_to_rgb()
413 && (img->comps[0].dy == 1) in color_sycc_to_rgb()
414 && (img->comps[1].dy == 2) in color_sycc_to_rgb()
415 && (img->comps[2].dy == 2)) { /* horizontal and vertical sub-sample */ in color_sycc_to_rgb()
417 } else if ((img->comps[0].dx == 1) in color_sycc_to_rgb()
418 && (img->comps[1].dx == 2) in color_sycc_to_rgb()
419 && (img->comps[2].dx == 2) in color_sycc_to_rgb()
420 && (img->comps[0].dy == 1) in color_sycc_to_rgb()
421 && (img->comps[1].dy == 1) in color_sycc_to_rgb()
422 && (img->comps[2].dy == 1)) { /* horizontal sub-sample only */ in color_sycc_to_rgb()
424 } else if ((img->comps[0].dx == 1) in color_sycc_to_rgb()
425 && (img->comps[1].dx == 1) in color_sycc_to_rgb()
426 && (img->comps[2].dx == 1) in color_sycc_to_rgb()
427 && (img->comps[0].dy == 1) in color_sycc_to_rgb()
428 && (img->comps[1].dy == 1) in color_sycc_to_rgb()
429 && (img->comps[2].dy == 1)) { /* no sub-sample */ in color_sycc_to_rgb()
484 max_w = image->comps[0].w; in color_apply_icc_profile()
485 max_h = image->comps[0].h; in color_apply_icc_profile()
486 prec = (int)image->comps[0].prec; in color_apply_icc_profile()
499 if (image->comps[0].dx != image->comps[i].dx) { in color_apply_icc_profile()
503 if (image->comps[0].dy != image->comps[i].dy) { in color_apply_icc_profile()
507 if (image->comps[0].prec != image->comps[i].prec) { in color_apply_icc_profile()
511 if (image->comps[0].sgnd != image->comps[i].sgnd) { in color_apply_icc_profile()
608 if ((image->comps[0].w == image->comps[1].w && in color_apply_icc_profile()
609 image->comps[0].w == image->comps[2].w) && in color_apply_icc_profile()
610 (image->comps[0].h == image->comps[1].h && in color_apply_icc_profile()
611 image->comps[0].h == image->comps[2].h)) { in color_apply_icc_profile()
624 r = image->comps[0].data; in color_apply_icc_profile()
625 g = image->comps[1].data; in color_apply_icc_profile()
626 b = image->comps[2].data; in color_apply_icc_profile()
636 r = image->comps[0].data; in color_apply_icc_profile()
637 g = image->comps[1].data; in color_apply_icc_profile()
638 b = image->comps[2].data; in color_apply_icc_profile()
662 r = image->comps[0].data; in color_apply_icc_profile()
663 g = image->comps[1].data; in color_apply_icc_profile()
664 b = image->comps[2].data; in color_apply_icc_profile()
674 r = image->comps[0].data; in color_apply_icc_profile()
675 g = image->comps[1].data; in color_apply_icc_profile()
676 b = image->comps[2].data; in color_apply_icc_profile()
711 new_comps = (opj_image_comp_t*)realloc(image->comps, in color_apply_icc_profile()
718 image->comps = new_comps; in color_apply_icc_profile()
721 image->comps[3] = image->comps[1]; in color_apply_icc_profile()
724 image->comps[1] = image->comps[0]; in color_apply_icc_profile()
725 image->comps[2] = image->comps[0]; in color_apply_icc_profile()
727 image->comps[1].data = g; in color_apply_icc_profile()
728 image->comps[2].data = b; in color_apply_icc_profile()
732 r = image->comps[0].data; in color_apply_icc_profile()
739 r = image->comps[0].data; in color_apply_icc_profile()
740 g = image->comps[1].data; in color_apply_icc_profile()
741 b = image->comps[2].data; in color_apply_icc_profile()
771 new_comps = (opj_image_comp_t*)realloc(image->comps, in color_apply_icc_profile()
778 image->comps = new_comps; in color_apply_icc_profile()
781 image->comps[3] = image->comps[1]; in color_apply_icc_profile()
784 image->comps[1] = image->comps[0]; in color_apply_icc_profile()
785 image->comps[2] = image->comps[0]; in color_apply_icc_profile()
787 image->comps[1].data = g; in color_apply_icc_profile()
788 image->comps[2].data = b; in color_apply_icc_profile()
792 r = image->comps[0].data; in color_apply_icc_profile()
799 r = image->comps[0].data; in color_apply_icc_profile()
800 g = image->comps[1].data; in color_apply_icc_profile()
801 b = image->comps[2].data; in color_apply_icc_profile()
834 if (image->comps[0].dx != image->comps[i].dx || in are_comps_same_dimensions()
835 image->comps[0].dy != image->comps[i].dy) { in are_comps_same_dimensions()
902 prec0 = (double)image->comps[0].prec; in color_cielab_to_rgb()
903 prec1 = (double)image->comps[1].prec; in color_cielab_to_rgb()
904 prec2 = (double)image->comps[2].prec; in color_cielab_to_rgb()
924 L = src0 = image->comps[0].data; in color_cielab_to_rgb()
925 a = src1 = image->comps[1].data; in color_cielab_to_rgb()
926 b = src2 = image->comps[2].data; in color_cielab_to_rgb()
928 max = image->comps[0].w * image->comps[0].h; in color_cielab_to_rgb()
967 image->comps[0].data = dst0; in color_cielab_to_rgb()
969 image->comps[1].data = dst1; in color_cielab_to_rgb()
971 image->comps[2].data = dst2; in color_cielab_to_rgb()
974 image->comps[0].prec = 16; in color_cielab_to_rgb()
975 image->comps[1].prec = 16; in color_cielab_to_rgb()
976 image->comps[2].prec = 16; in color_cielab_to_rgb()
1010 w = image->comps[0].w; in color_cmyk_to_rgb()
1011 h = image->comps[0].h; in color_cmyk_to_rgb()
1015 || (image->comps[0].dx != image->comps[1].dx) || in color_cmyk_to_rgb()
1016 (image->comps[0].dx != image->comps[2].dx) || in color_cmyk_to_rgb()
1017 (image->comps[0].dx != image->comps[3].dx) in color_cmyk_to_rgb()
1018 || (image->comps[0].dy != image->comps[1].dy) || in color_cmyk_to_rgb()
1019 (image->comps[0].dy != image->comps[2].dy) || in color_cmyk_to_rgb()
1020 (image->comps[0].dy != image->comps[3].dy) in color_cmyk_to_rgb()
1029 sC = 1.0F / (float)((1 << image->comps[0].prec) - 1); in color_cmyk_to_rgb()
1030 sM = 1.0F / (float)((1 << image->comps[1].prec) - 1); in color_cmyk_to_rgb()
1031 sY = 1.0F / (float)((1 << image->comps[2].prec) - 1); in color_cmyk_to_rgb()
1032 sK = 1.0F / (float)((1 << image->comps[3].prec) - 1); in color_cmyk_to_rgb()
1036 C = (float)(image->comps[0].data[i]) * sC; in color_cmyk_to_rgb()
1037 M = (float)(image->comps[1].data[i]) * sM; in color_cmyk_to_rgb()
1038 Y = (float)(image->comps[2].data[i]) * sY; in color_cmyk_to_rgb()
1039 K = (float)(image->comps[3].data[i]) * sK; in color_cmyk_to_rgb()
1048 image->comps[0].data[i] = (int)(255.0F * C * K); /* R */ in color_cmyk_to_rgb()
1049 image->comps[1].data[i] = (int)(255.0F * M * K); /* G */ in color_cmyk_to_rgb()
1050 image->comps[2].data[i] = (int)(255.0F * Y * K); /* B */ in color_cmyk_to_rgb()
1053 opj_image_data_free(image->comps[3].data); in color_cmyk_to_rgb()
1054 image->comps[3].data = NULL; in color_cmyk_to_rgb()
1055 image->comps[0].prec = 8; in color_cmyk_to_rgb()
1056 image->comps[1].prec = 8; in color_cmyk_to_rgb()
1057 image->comps[2].prec = 8; in color_cmyk_to_rgb()
1062 memcpy(&(image->comps[i]), &(image->comps[i + 1]), sizeof(image->comps[i])); in color_cmyk_to_rgb()
1074 int flip_value = (1 << (image->comps[0].prec - 1)); in color_esycc_to_rgb()
1075 int max_value = (1 << image->comps[0].prec) - 1; in color_esycc_to_rgb()
1079 || (image->comps[0].dx != image->comps[1].dx) || in color_esycc_to_rgb()
1080 (image->comps[0].dx != image->comps[2].dx) in color_esycc_to_rgb()
1081 || (image->comps[0].dy != image->comps[1].dy) || in color_esycc_to_rgb()
1082 (image->comps[0].dy != image->comps[2].dy) in color_esycc_to_rgb()
1089 w = image->comps[0].w; in color_esycc_to_rgb()
1090 h = image->comps[0].h; in color_esycc_to_rgb()
1092 sign1 = (int)image->comps[1].sgnd; in color_esycc_to_rgb()
1093 sign2 = (int)image->comps[2].sgnd; in color_esycc_to_rgb()
1099 y = image->comps[0].data[i]; in color_esycc_to_rgb()
1100 cb = image->comps[1].data[i]; in color_esycc_to_rgb()
1101 cr = image->comps[2].data[i]; in color_esycc_to_rgb()
1119 image->comps[0].data[i] = val; in color_esycc_to_rgb()
1130 image->comps[1].data[i] = val; in color_esycc_to_rgb()
1141 image->comps[2].data[i] = val; in color_esycc_to_rgb()