• Home
  • Raw
  • Download

Lines Matching refs:b2a

632 static bool read_mft_common(const mft_CommonLayout* mftTag, skcms_B2A* b2a) {  in read_mft_common()  argument
634 b2a->matrix_channels = 0; in read_mft_common()
635 b2a-> input_channels = mftTag-> input_channels[0]; in read_mft_common()
636 b2a->output_channels = mftTag->output_channels[0]; in read_mft_common()
640 if (b2a->input_channels != ARRAY_COUNT(b2a->input_curves)) { in read_mft_common()
643 if (b2a->output_channels < 3 || b2a->output_channels > ARRAY_COUNT(b2a->output_curves)) { in read_mft_common()
648 for (uint32_t i = 0; i < b2a->input_channels; ++i) { in read_mft_common()
649 b2a->grid_points[i] = mftTag->grid_points[0]; in read_mft_common()
651 if (b2a->grid_points[0] < 2) { in read_mft_common()
929 static bool read_tag_mba(const skcms_ICCTag* tag, skcms_B2A* b2a, bool pcs_is_xyz) { in read_tag_mba() argument
936 b2a->input_channels = mBATag->input_channels[0]; in read_tag_mba()
937 b2a->output_channels = mBATag->output_channels[0]; in read_tag_mba()
940 if (b2a->input_channels != ARRAY_COUNT(b2a->input_curves)) { in read_tag_mba()
943 if (b2a->output_channels < 3 || b2a->output_channels > ARRAY_COUNT(b2a->output_curves)) { in read_tag_mba()
958 if (!read_curves(tag->buf, tag->size, b_curve_offset, b2a->input_channels, in read_tag_mba()
959 b2a->input_curves)) { in read_tag_mba()
968 b2a->matrix_channels = b2a->input_channels; in read_tag_mba()
970 if (!read_curves(tag->buf, tag->size, m_curve_offset, b2a->matrix_channels, in read_tag_mba()
971 b2a->matrix_curves)) { in read_tag_mba()
980 b2a->matrix.vals[0][0] = encoding_factor * read_big_fixed(mtx_buf + 0); in read_tag_mba()
981 b2a->matrix.vals[0][1] = encoding_factor * read_big_fixed(mtx_buf + 4); in read_tag_mba()
982 b2a->matrix.vals[0][2] = encoding_factor * read_big_fixed(mtx_buf + 8); in read_tag_mba()
983 b2a->matrix.vals[1][0] = encoding_factor * read_big_fixed(mtx_buf + 12); in read_tag_mba()
984 b2a->matrix.vals[1][1] = encoding_factor * read_big_fixed(mtx_buf + 16); in read_tag_mba()
985 b2a->matrix.vals[1][2] = encoding_factor * read_big_fixed(mtx_buf + 20); in read_tag_mba()
986 b2a->matrix.vals[2][0] = encoding_factor * read_big_fixed(mtx_buf + 24); in read_tag_mba()
987 b2a->matrix.vals[2][1] = encoding_factor * read_big_fixed(mtx_buf + 28); in read_tag_mba()
988 b2a->matrix.vals[2][2] = encoding_factor * read_big_fixed(mtx_buf + 32); in read_tag_mba()
989 b2a->matrix.vals[0][3] = encoding_factor * read_big_fixed(mtx_buf + 36); in read_tag_mba()
990 b2a->matrix.vals[1][3] = encoding_factor * read_big_fixed(mtx_buf + 40); in read_tag_mba()
991 b2a->matrix.vals[2][3] = encoding_factor * read_big_fixed(mtx_buf + 44); in read_tag_mba()
996 b2a->matrix_channels = 0; in read_tag_mba()
1005 if (!read_curves(tag->buf, tag->size, a_curve_offset, b2a->output_channels, in read_tag_mba()
1006 b2a->output_curves)) { in read_tag_mba()
1016 b2a->grid_8 = clut->variable; in read_tag_mba()
1017 b2a->grid_16 = nullptr; in read_tag_mba()
1019 b2a->grid_8 = nullptr; in read_tag_mba()
1020 b2a->grid_16 = clut->variable; in read_tag_mba()
1025 uint64_t grid_size = b2a->output_channels * clut->grid_byte_width[0]; in read_tag_mba()
1026 for (uint32_t i = 0; i < b2a->input_channels; ++i) { in read_tag_mba()
1027 b2a->grid_points[i] = clut->grid_points[i]; in read_tag_mba()
1028 if (b2a->grid_points[i] < 2) { in read_tag_mba()
1031 grid_size *= b2a->grid_points[i]; in read_tag_mba()
1041 if (b2a->input_channels != b2a->output_channels) { in read_tag_mba()
1046 b2a->output_channels = 0; in read_tag_mba()
1147 static bool read_b2a(const skcms_ICCTag* tag, skcms_B2A* b2a, bool pcs_is_xyz) { in read_b2a() argument
1149 if (tag->type == skcms_Signature_mft1) { ok = read_tag_mft1(tag, b2a); } in read_b2a()
1150 if (tag->type == skcms_Signature_mft2) { ok = read_tag_mft2(tag, b2a); } in read_b2a()
1151 if (tag->type == skcms_Signature_mBA ) { ok = read_tag_mba(tag, b2a, pcs_is_xyz); } in read_b2a()
1156 if (b2a->input_channels > 0) { canonicalize_identity(b2a->input_curves + 0); } in read_b2a()
1157 if (b2a->input_channels > 1) { canonicalize_identity(b2a->input_curves + 1); } in read_b2a()
1158 if (b2a->input_channels > 2) { canonicalize_identity(b2a->input_curves + 2); } in read_b2a()
1160 if (b2a->matrix_channels > 0) { canonicalize_identity(b2a->matrix_curves + 0); } in read_b2a()
1161 if (b2a->matrix_channels > 1) { canonicalize_identity(b2a->matrix_curves + 1); } in read_b2a()
1162 if (b2a->matrix_channels > 2) { canonicalize_identity(b2a->matrix_curves + 2); } in read_b2a()
1164 if (b2a->output_channels > 0) { canonicalize_identity(b2a->output_curves + 0); } in read_b2a()
1165 if (b2a->output_channels > 1) { canonicalize_identity(b2a->output_curves + 1); } in read_b2a()
1166 if (b2a->output_channels > 2) { canonicalize_identity(b2a->output_curves + 2); } in read_b2a()
1167 if (b2a->output_channels > 3) { canonicalize_identity(b2a->output_curves + 3); } in read_b2a()