• Home
  • Raw
  • Download

Lines Matching refs:a2b

603 static bool read_mft_common(const mft_CommonLayout* mftTag, skcms_A2B* a2b) {  in read_mft_common()  argument
608 a2b->matrix_channels = 0; in read_mft_common()
609 a2b-> input_channels = mftTag-> input_channels[0]; in read_mft_common()
610 a2b->output_channels = mftTag->output_channels[0]; in read_mft_common()
613 if (a2b->output_channels != ARRAY_COUNT(a2b->output_curves)) { in read_mft_common()
617 if (a2b->input_channels < 1 || a2b->input_channels > ARRAY_COUNT(a2b->input_curves)) { in read_mft_common()
621 for (uint32_t i = 0; i < a2b->input_channels; ++i) { in read_mft_common()
622 a2b->grid_points[i] = mftTag->grid_points[0]; in read_mft_common()
625 if (a2b->grid_points[0] < 2) { in read_mft_common()
802 static bool read_tag_mab(const skcms_ICCTag* tag, skcms_A2B* a2b, bool pcs_is_xyz) { in read_tag_mab() argument
809 a2b->input_channels = mABTag->input_channels[0]; in read_tag_mab()
810 a2b->output_channels = mABTag->output_channels[0]; in read_tag_mab()
813 if (a2b->output_channels != ARRAY_COUNT(a2b->output_curves)) { in read_tag_mab()
817 if (a2b->input_channels > ARRAY_COUNT(a2b->input_curves)) { in read_tag_mab()
832 if (!read_curves(tag->buf, tag->size, b_curve_offset, a2b->output_channels, in read_tag_mab()
833 a2b->output_curves)) { in read_tag_mab()
842 a2b->matrix_channels = a2b->output_channels; in read_tag_mab()
843 if (!read_curves(tag->buf, tag->size, m_curve_offset, a2b->matrix_channels, in read_tag_mab()
844 a2b->matrix_curves)) { in read_tag_mab()
854 a2b->matrix.vals[0][0] = encoding_factor * read_big_fixed(mtx_buf + 0); in read_tag_mab()
855 a2b->matrix.vals[0][1] = encoding_factor * read_big_fixed(mtx_buf + 4); in read_tag_mab()
856 a2b->matrix.vals[0][2] = encoding_factor * read_big_fixed(mtx_buf + 8); in read_tag_mab()
857 a2b->matrix.vals[1][0] = encoding_factor * read_big_fixed(mtx_buf + 12); in read_tag_mab()
858 a2b->matrix.vals[1][1] = encoding_factor * read_big_fixed(mtx_buf + 16); in read_tag_mab()
859 a2b->matrix.vals[1][2] = encoding_factor * read_big_fixed(mtx_buf + 20); in read_tag_mab()
860 a2b->matrix.vals[2][0] = encoding_factor * read_big_fixed(mtx_buf + 24); in read_tag_mab()
861 a2b->matrix.vals[2][1] = encoding_factor * read_big_fixed(mtx_buf + 28); in read_tag_mab()
862 a2b->matrix.vals[2][2] = encoding_factor * read_big_fixed(mtx_buf + 32); in read_tag_mab()
863 a2b->matrix.vals[0][3] = encoding_factor * read_big_fixed(mtx_buf + 36); in read_tag_mab()
864 a2b->matrix.vals[1][3] = encoding_factor * read_big_fixed(mtx_buf + 40); in read_tag_mab()
865 a2b->matrix.vals[2][3] = encoding_factor * read_big_fixed(mtx_buf + 44); in read_tag_mab()
870 a2b->matrix_channels = 0; in read_tag_mab()
878 if (!read_curves(tag->buf, tag->size, a_curve_offset, a2b->input_channels, in read_tag_mab()
879 a2b->input_curves)) { in read_tag_mab()
889 a2b->grid_8 = clut->variable; in read_tag_mab()
890 a2b->grid_16 = nullptr; in read_tag_mab()
892 a2b->grid_8 = nullptr; in read_tag_mab()
893 a2b->grid_16 = clut->variable; in read_tag_mab()
898 uint64_t grid_size = a2b->output_channels * clut->grid_byte_width[0]; // the payload in read_tag_mab()
899 for (uint32_t i = 0; i < a2b->input_channels; ++i) { in read_tag_mab()
900 a2b->grid_points[i] = clut->grid_points[i]; in read_tag_mab()
902 if (a2b->grid_points[i] < 2) { in read_tag_mab()
905 grid_size *= a2b->grid_points[i]; in read_tag_mab()
916 if (a2b->input_channels != a2b->output_channels) { in read_tag_mab()
921 a2b->input_channels = 0; in read_tag_mab()
1122 static bool read_a2b(const skcms_ICCTag* tag, skcms_A2B* a2b, bool pcs_is_xyz) { in read_a2b() argument
1124 if (tag->type == skcms_Signature_mft1) { ok = read_tag_mft1(tag, a2b); } in read_a2b()
1125 if (tag->type == skcms_Signature_mft2) { ok = read_tag_mft2(tag, a2b); } in read_a2b()
1126 if (tag->type == skcms_Signature_mAB ) { ok = read_tag_mab(tag, a2b, pcs_is_xyz); } in read_a2b()
1131 if (a2b->input_channels > 0) { canonicalize_identity(a2b->input_curves + 0); } in read_a2b()
1132 if (a2b->input_channels > 1) { canonicalize_identity(a2b->input_curves + 1); } in read_a2b()
1133 if (a2b->input_channels > 2) { canonicalize_identity(a2b->input_curves + 2); } in read_a2b()
1134 if (a2b->input_channels > 3) { canonicalize_identity(a2b->input_curves + 3); } in read_a2b()
1136 if (a2b->matrix_channels > 0) { canonicalize_identity(a2b->matrix_curves + 0); } in read_a2b()
1137 if (a2b->matrix_channels > 1) { canonicalize_identity(a2b->matrix_curves + 1); } in read_a2b()
1138 if (a2b->matrix_channels > 2) { canonicalize_identity(a2b->matrix_curves + 2); } in read_a2b()
1140 if (a2b->output_channels > 0) { canonicalize_identity(a2b->output_curves + 0); } in read_a2b()
1141 if (a2b->output_channels > 1) { canonicalize_identity(a2b->output_curves + 1); } in read_a2b()
1142 if (a2b->output_channels > 2) { canonicalize_identity(a2b->output_curves + 2); } in read_a2b()