| OLD | NEW |
| 1 // Copyright 2010 Google Inc. All Rights Reserved. | 1 // Copyright 2010 Google Inc. All Rights Reserved. |
| 2 // | 2 // |
| 3 // This code is licensed under the same terms as WebM: | 3 // Use of this source code is governed by a BSD-style license |
| 4 // Software License Agreement: http://www.webmproject.org/license/software/ | 4 // that can be found in the COPYING file in the root of the source |
| 5 // Additional IP Rights Grant: http://www.webmproject.org/license/additional/ | 5 // tree. An additional intellectual property rights grant can be found |
| 6 // in the file PATENTS. All contributing project authors may |
| 7 // be found in the AUTHORS file in the root of the source tree. |
| 6 // ----------------------------------------------------------------------------- | 8 // ----------------------------------------------------------------------------- |
| 7 // | 9 // |
| 8 // inline YUV<->RGB conversion function | 10 // inline YUV<->RGB conversion function |
| 9 // | 11 // |
| 10 // The exact naming is Y'CbCr, following the ITU-R BT.601 standard. | 12 // The exact naming is Y'CbCr, following the ITU-R BT.601 standard. |
| 11 // More information at: http://en.wikipedia.org/wiki/YCbCr | 13 // More information at: http://en.wikipedia.org/wiki/YCbCr |
| 12 // Y = 0.2569 * R + 0.5044 * G + 0.0979 * B + 16 | 14 // Y = 0.2569 * R + 0.5044 * G + 0.0979 * B + 16 |
| 13 // U = -0.1483 * R - 0.2911 * G + 0.4394 * B + 128 | 15 // U = -0.1483 * R - 0.2911 * G + 0.4394 * B + 128 |
| 14 // V = 0.4394 * R - 0.3679 * G - 0.0715 * B + 128 | 16 // V = 0.4394 * R - 0.3679 * G - 0.0715 * B + 128 |
| 15 // We use 16bit fixed point operations for RGB->YUV conversion. | 17 // We use 16bit fixed point operations for RGB->YUV conversion. |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 return VP8ClipUV(v); | 275 return VP8ClipUV(v); |
| 274 } | 276 } |
| 275 | 277 |
| 276 #endif // USE_YUVj | 278 #endif // USE_YUVj |
| 277 | 279 |
| 278 #if defined(__cplusplus) || defined(c_plusplus) | 280 #if defined(__cplusplus) || defined(c_plusplus) |
| 279 } // extern "C" | 281 } // extern "C" |
| 280 #endif | 282 #endif |
| 281 | 283 |
| 282 #endif /* WEBP_DSP_YUV_H_ */ | 284 #endif /* WEBP_DSP_YUV_H_ */ |
| OLD | NEW |