OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 // the 3, g to the 3, r to the 3 and a to the 3. The values are summed and | 274 // the 3, g to the 3, r to the 3 and a to the 3. The values are summed and |
275 // result clamped to 0 to 255. | 275 // result clamped to 0 to 255. |
276 // A polynomial approximation can be dirived using software such as 'R'. | 276 // A polynomial approximation can be dirived using software such as 'R'. |
277 | 277 |
278 LIBYUV_API | 278 LIBYUV_API |
279 int ARGBPolynomial(const uint8* src_argb, int src_stride_argb, | 279 int ARGBPolynomial(const uint8* src_argb, int src_stride_argb, |
280 uint8* dst_argb, int dst_stride_argb, | 280 uint8* dst_argb, int dst_stride_argb, |
281 const float* poly, | 281 const float* poly, |
282 int width, int height); | 282 int width, int height); |
283 | 283 |
| 284 // Convert plane of 16 bit shorts to half floats. |
| 285 // Source values are multiplied by scale before storing as half float. |
| 286 LIBYUV_API |
| 287 int HalfFloatPlane(const uint16* src_y, int src_stride_y, |
| 288 uint16* dst_y, int dst_stride_y, |
| 289 float scale, |
| 290 int width, int height); |
| 291 |
284 // Quantize a rectangle of ARGB. Alpha unaffected. | 292 // Quantize a rectangle of ARGB. Alpha unaffected. |
285 // scale is a 16 bit fractional fixed point scaler between 0 and 65535. | 293 // scale is a 16 bit fractional fixed point scaler between 0 and 65535. |
286 // interval_size should be a value between 1 and 255. | 294 // interval_size should be a value between 1 and 255. |
287 // interval_offset should be a value between 0 and 255. | 295 // interval_offset should be a value between 0 and 255. |
288 LIBYUV_API | 296 LIBYUV_API |
289 int ARGBQuantize(uint8* dst_argb, int dst_stride_argb, | 297 int ARGBQuantize(uint8* dst_argb, int dst_stride_argb, |
290 int scale, int interval_size, int interval_offset, | 298 int scale, int interval_size, int interval_offset, |
291 int x, int y, int width, int height); | 299 int x, int y, int width, int height); |
292 | 300 |
293 // Copy ARGB to ARGB. | 301 // Copy ARGB to ARGB. |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 int ARGBSobelXY(const uint8* src_argb, int src_stride_argb, | 520 int ARGBSobelXY(const uint8* src_argb, int src_stride_argb, |
513 uint8* dst_argb, int dst_stride_argb, | 521 uint8* dst_argb, int dst_stride_argb, |
514 int width, int height); | 522 int width, int height); |
515 | 523 |
516 #ifdef __cplusplus | 524 #ifdef __cplusplus |
517 } // extern "C" | 525 } // extern "C" |
518 } // namespace libyuv | 526 } // namespace libyuv |
519 #endif | 527 #endif |
520 | 528 |
521 #endif // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ | 529 #endif // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ |
OLD | NEW |