diff options
author | 2015-11-06 16:27:58 -0800 | |
---|---|---|
committer | 2015-11-06 16:27:58 -0800 | |
commit | f41959ccb2d9d4c722fe8fc3351401d53bcf4900 (patch) | |
tree | ef0ca22cb2a5ac4bdec9d080d8e0788a53ed496d /tensorflow/examples/android/jni/yuv2rgb.h |
TensorFlow: Initial commit of TensorFlow library.
TensorFlow is an open source software library for numerical computation
using data flow graphs.
Base CL: 107276108
Diffstat (limited to 'tensorflow/examples/android/jni/yuv2rgb.h')
-rw-r--r-- | tensorflow/examples/android/jni/yuv2rgb.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tensorflow/examples/android/jni/yuv2rgb.h b/tensorflow/examples/android/jni/yuv2rgb.h new file mode 100644 index 0000000000..698da415f5 --- /dev/null +++ b/tensorflow/examples/android/jni/yuv2rgb.h @@ -0,0 +1,37 @@ +// This is a collection of routines which converts various YUV image formats +// to (A)RGB. + +#ifndef ORG_TENSORFLOW_JNI_IMAGEUTILS_YUV2RGB_H_ +#define ORG_TENSORFLOW_JNI_IMAGEUTILS_YUV2RGB_H_ + +#include "tensorflow/core/platform/port.h" + +using namespace tensorflow; + +#ifdef __cplusplus +extern "C" { +#endif + +// Converts YUV420 semi-planar data to ARGB 8888 data using the supplied width +// and height. The input and output must already be allocated and non-null. +// For efficiency, no error checking is performed. +void ConvertYUV420SPToARGB8888(const uint8* const pY, const uint8* const pUV, + uint32* const output, const int width, + const int height); + +// The same as above, but downsamples each dimension to half size. +void ConvertYUV420SPToARGB8888HalfSize(const uint8* const input, + uint32* const output, + int width, int height); + +// Converts YUV420 semi-planar data to RGB 565 data using the supplied width +// and height. The input and output must already be allocated and non-null. +// For efficiency, no error checking is performed. +void ConvertYUV420SPToRGB565(const uint8* const input, uint16* const output, + const int width, const int height); + +#ifdef __cplusplus +} +#endif + +#endif // ORG_TENSORFLOW_JNI_IMAGEUTILS_YUV2RGB_H_ |