/*
 * cutils - Color Conversion Utilities
 * Copyright(c) 2002-2004 of wave++ (Yuri D'Elia) <wavexx@thregr.org>
 * Distributed under GNU LGPL without ANY warranty.
 */

#ifndef _cutils_h
#define _cutils_h

/* system headers */
#include <inttypes.h>


/* YUV color conversion routines */
void cuRgbYuv3f(float r, float g, float b, float* y, float* u, float* v);
void cuYuvRgb3f(float y, float u, float v, float* r, float* g, float* b);

void cuRgbYuv3c(uint8_t r, uint8_t g, uint8_t b, uint8_t* y, uint8_t* u, uint8_t* v);
void cuYuvRgb3c(uint8_t y, uint8_t u, uint8_t v, uint8_t* r, uint8_t* g, uint8_t* b);

void cuRgbYuv3fv(const float rgb[3], float yuv[3]);
void cuYuvRgb3fv(const float yuv[3], float rgb[3]);

void cuRgbYuv3cv(const uint8_t rgb[3], uint8_t yuv[3]);
void cuYuvRgb3cv(const uint8_t yuv[3], uint8_t rgb[3]);

#endif
