|
@@ -4944,9 +4944,11 @@ void tnsHSL2RGB(real *hsl, real *rgb) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
void tnsYUV2RGB(real* yuv,real* rgb){
|
|
void tnsYUV2RGB(real* yuv,real* rgb){
|
|
- rgb[0] = (yuv[0] + 1.28033 * yuv[2]) * 0.2126;
|
|
|
|
- rgb[1] = (yuv[0] - 0.21482 * yuv[1] - 0.38059 * yuv[2]) * 0.7152;
|
|
|
|
- rgb[2] = (yuv[0] + 2.12798 * yuv[1]) * 0.0722;
|
|
|
|
|
|
+ yuv[0]=1.1643*(yuv[0]-0.0625);
|
|
|
|
+ yuv[1]-=0.5; yuv[2]-=0.5;
|
|
|
|
+ rgb[0] = (yuv[0] + 1.28033 * yuv[2]);
|
|
|
|
+ rgb[1] = (yuv[0] - 0.21482 * yuv[1] - 0.38059 * yuv[2]);
|
|
|
|
+ rgb[2] = (yuv[0] + 2.12798 * yuv[1]);
|
|
}
|
|
}
|
|
|
|
|
|
void tnsClearAll(){
|
|
void tnsClearAll(){
|