summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-02-20 13:33:20 -0500
committerpommicket <pommicket@gmail.com>2025-02-20 13:33:20 -0500
commit72bec683d1c738a882e19fa91cd2c85f6a854cd9 (patch)
tree4c53829b3025489fab7970320c64b67bf054f3c9 /main.c
parent6e46884abd0996b46c61953dd0bcbc5466db427e (diff)
add NV12/21 supoprt
Diffstat (limited to 'main.c')
-rw-r--r--main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/main.c b/main.c
index 9164b83..e29cb9a 100644
--- a/main.c
+++ b/main.c
@@ -1,6 +1,5 @@
/*
TODO
--add support for more pixfmts
-adjustable camera framerate
-view previous pictures (thumbnails)
-click in menus
@@ -440,6 +439,16 @@ void main() {\n\
float cr = texture2D(u_sampler3, tex_coord).x;\n\
color = ycbcr_ITU_R_601_to_rgb(vec3(y,cb,cr));\n\
} break;\n\
+ case 0x3231564e: {// YUV 4:2:0 with a Y plane and a UV plane\n\
+ float y = texture2D(u_sampler, tex_coord).x;\n\
+ vec2 cbcr = texture2D(u_sampler2, tex_coord).xy;\n\
+ color = ycbcr_ITU_R_601_to_rgb(vec3(y,cbcr));\n\
+ } break;\n\
+ case 0x3132564e: {// YVU 4:2:0 with a Y plane and a VU plane\n\
+ float y = texture2D(u_sampler, tex_coord).x;\n\
+ vec2 cbcr = texture2D(u_sampler2, tex_coord).yx;\n\
+ color = ycbcr_ITU_R_601_to_rgb(vec3(y,cbcr));\n\
+ } break;\n\
default:\n\
color = texture2D(u_sampler, tex_coord).xyz;\n\
break;\n\