Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: third_party/qcms/src/transform_util.c

Issue 1920253003: Revert of Reland: [qcms] Fix build_output_lut to return correct data for parametric curves (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/qcms/src/tests/qcms_test_util.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/qcms/src/transform_util.c
diff --git a/third_party/qcms/src/transform_util.c b/third_party/qcms/src/transform_util.c
index 3d84716ed553a5db9205bf560d03dfa4f0f64b1c..fc19b650f4013400ce1239dd5e974c005afca80e 100644
--- a/third_party/qcms/src/transform_util.c
+++ b/third_party/qcms/src/transform_util.c
@@ -600,8 +600,6 @@
float gamma_table[256];
uint16_t i;
uint16_t *output = malloc(sizeof(uint16_t)*256);
- uint16_t *inverted;
- int inverted_size = 256;
if (!output) {
*output_gamma_lut = NULL;
@@ -609,24 +607,11 @@
}
compute_curve_gamma_table_type_parametric(gamma_table, trc->parameter, trc->count);
-
+ *output_gamma_lut_length = 256;
for(i = 0; i < 256; i++) {
output[i] = (uint16_t)(gamma_table[i] * 65535);
}
-
- //XXX: the choice of a minimum of 256 here is not backed by any theory,
- // measurement or data, however it is what lcms uses.
- // the maximum number we would need is 65535 because that's the
- // accuracy used for computing the pre cache table
- if (inverted_size < 256)
- inverted_size = 256;
-
- inverted = invert_lut(output, 256, inverted_size);
- if (!inverted)
- return;
- *output_gamma_lut = inverted;
- *output_gamma_lut_length = inverted_size;
- free(output);
+ *output_gamma_lut = output;
} else {
if (trc->count == 0) {
*output_gamma_lut = build_linear_table(4096);
« no previous file with comments | « third_party/qcms/src/tests/qcms_test_util.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698