| OLD | NEW |
| 1 // Copyright 2011 Google Inc. All Rights Reserved. | 1 // Copyright 2011 Google Inc. All Rights Reserved. |
| 2 // | 2 // |
| 3 // This code is licensed under the same terms as WebM: | 3 // This code is licensed under the same terms as WebM: |
| 4 // Software License Agreement: http://www.webmproject.org/license/software/ | 4 // Software License Agreement: http://www.webmproject.org/license/software/ |
| 5 // Additional IP Rights Grant: http://www.webmproject.org/license/additional/ | 5 // Additional IP Rights Grant: http://www.webmproject.org/license/additional/ |
| 6 // ----------------------------------------------------------------------------- | 6 // ----------------------------------------------------------------------------- |
| 7 // | 7 // |
| 8 // Quantize levels for specified number of quantization-levels ([2, 256]). | 8 // Quantize levels for specified number of quantization-levels ([2, 256]). |
| 9 // Min and max values are preserved (usual 0 and 255 for alpha plane). | 9 // Min and max values are preserved (usual 0 and 255 for alpha plane). |
| 10 // | 10 // |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 data[n] = map[data[n]]; | 133 data[n] = map[data[n]]; |
| 134 } | 134 } |
| 135 } | 135 } |
| 136 End: | 136 End: |
| 137 // Store sum of squared error if needed. | 137 // Store sum of squared error if needed. |
| 138 if (sse != NULL) *sse = (uint64_t)err; | 138 if (sse != NULL) *sse = (uint64_t)err; |
| 139 | 139 |
| 140 return 1; | 140 return 1; |
| 141 } | 141 } |
| 142 | 142 |
| 143 int DequantizeLevels(uint8_t* const data, int width, int height) { | |
| 144 if (data == NULL || width <= 0 || height <= 0) return 0; | |
| 145 // TODO(skal): implement gradient smoothing. | |
| 146 (void)data; | |
| 147 (void)width; | |
| 148 (void)height; | |
| 149 return 1; | |
| 150 } | |
| 151 | |
| 152 #if defined(__cplusplus) || defined(c_plusplus) | 143 #if defined(__cplusplus) || defined(c_plusplus) |
| 153 } // extern "C" | 144 } // extern "C" |
| 154 #endif | 145 #endif |
| OLD | NEW |