VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/shaders/cconvYUY2.c@ 22883

最後變更 在這個檔案從22883是 22883,由 vboxsync 提交於 15 年 前

fideo hw accel: fix for ATI + small optimizations

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 521 位元組
 
1#extension GL_ARB_texture_rectangle : enable
2uniform sampler2DRect uSrcTex;
3void vboxCConvApplyAYUV(vec4 color);
4void vboxCConv()
5{
6 vec2 srcCoord = vec2(gl_TexCoord[0]);
7 float x = srcCoord.x;
8 vec4 srcClr = texture2DRect(uSrcTex, vec2(x, srcCoord.y));
9 float u = srcClr.g;
10 float v = srcClr.a;
11 int pix = int(x);
12 float part = x - float(pix);
13 float y;
14 if(part < 0.5)
15 {
16 y = srcClr.b;
17 }
18 else
19 {
20 y = srcClr.r;
21 }
22 vboxCConvApplyAYUV(vec4(u, y, 0.0, v));
23}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette