*/}}
YimingWu 4 ヶ月 前
コミット
85c4b7c6e1
3 ファイル変更8 行追加0 行削除
  1. 2 0
      la_kernel.c
  2. 1 0
      la_tns.h
  3. 5 0
      la_tns_kernel.c

+ 2 - 0
la_kernel.c

@@ -1358,6 +1358,8 @@ int laGetReadyWith(laInitArguments* ia){
     la_RegenerateWireColors();
 
     laAnimationRegisterHolderPath("tns.world.root_objects_as_root");
+    
+    if(MAIN.InitArgs.EnableLogStdOut){ MAIN.EnableLogStdOut=1; }
 
     logPrintNew("Initialization Completed\n");
     MAIN.InitDone=1;

+ 1 - 0
la_tns.h

@@ -1504,6 +1504,7 @@ void tnsHCY2RGB(real *hcy, real *rgb);
 void tnsRGB2HCY(real *rgb, real *hcy);
 void tnsRGB2HSL(real *rgb, real *hsl);
 void tnsHSL2RGB(real *hsl, real *rgb);
+void tnsYUV2RGB(real* yuv,real* rgb);
 
 #ifdef __cplusplus
 extern "C"{

+ 5 - 0
la_tns_kernel.c

@@ -4943,6 +4943,11 @@ void tnsHSL2RGB(real *hsl, real *rgb) {
     rgb[2] = hue2rgb(p, q, hsl[0] - 1./3);
   }
 }
+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;
+}
 
 void tnsClearAll(){
     glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT);