[Phission-cvs] phission/base/include ImageConversions.h,1.25,1.26
Brought to you by:
pthoren
From: Philip T. <pt...@us...> - 2007-07-17 23:54:42
|
Update of /cvsroot/phission/phission/base/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13259/base/include Modified Files: ImageConversions.h Log Message: Working on the fixed point stuff, not working quite yet though, the colors are washed out. Index: ImageConversions.h =================================================================== RCS file: /cvsroot/phission/phission/base/include/ImageConversions.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** ImageConversions.h 17 Jul 2007 22:17:42 -0000 1.25 --- ImageConversions.h 17 Jul 2007 23:39:56 -0000 1.26 *************** *** 149,152 **** --- 149,164 ---- */ #define phImageCONVERT_FAIL phFAIL + + /** + * This function checks to see if there is a conversion function available to + * convert from \a in_format to \a out_format. + * + * \param[in] in_format The input format. + * \param[in] out_format The output format. + * \retval 0 The conversion is unavailable. + * \retval 1 The conversion is available. + */ + PHAPI(int) ph_convert_supported( uint32_t in_format, uint32_t out_format ); + /** * The following functions are used to encapsulate conversions from one *************** *** 505,508 **** --- 517,536 ---- #define phYUV_CalcU_CCIR601(r,g,b) (((-0.169) * r) - (0.332 * g) + (0.500 * b) + 128) #define phYUV_CalcV_CCIR601(r,g,b) ((0.500 * r) - (0.419 * g) - (0.0813* b) + 128) + + /* -------------------------------------------------------------------------- */ + #define phYUV_CalcR_CCIR601_fixed(y,v) \ + (y + (( (23060 * (v-128)))>>14)) + #define phYUV_CalcG_CCIR601_fixed(y,u,v)\ + (y - (( ( 5660 *(u-128)) - (11745 * (v-128)))>>14)) + #define phYUV_CalcB_CCIR601_fixed(y,u) \ + (y + (( (29147 *(u-128)) )>>14)) + + #define phYUV_CalcY_CCIR601_fixed(r,g,b)\ + (((4898 * r) + (9617 * g) + (1867 * b) )>>14) + #define phYUV_CalcU_CCIR601_fixed(r,g,b)\ + ((((-2768) * r) - (5439 * g) + (8192 * b) + 2097152)>>14) + #define phYUV_CalcV_CCIR601_fixed(r,g,b)\ + (((8192 * r) - (6864 * g) - (1332 * b) + 2097152)>>14) + /* -------------------------------------------------------------------------- */ /** |