<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head><body style=""><div>Hello,</div>
<div> </div>
<div>I am not sure how the glshader element works, but I do know how that shader program works, because we are successfully using it. Actually, we are using the GL variant for client-side debayering (outside of gstreamer, immediately before the data is displayed) and the CL variant for debayering inside the gstreamer pipeline with a custom element.</div>
<div> </div>
<div>There are 2 things I am doubtful with regard to the glshader element:</div>
<div> </div>
<div>1. the debayering code consists of a vertex and a pixel (aka fragment) shader. How are these integrated into glshader?</div>
<div>2. the code expects several parameters to be set from the outside, namely "source" (input buffer), "sourceSize" (an array with values width, height, 1/width, 1/height) and "firstRed" (a 0/1 combination describing the bayer pattern in use)</div>
<div> </div>
<div>I dont see how these prerequistes would be met by glshader..</div>
<div> </div>
<div>regards,</div>
<div>Chris</div>
<div> </div>
<blockquote type="cite" style="position: relative; margin-left: 0px; padding-left: 10px; border-left: solid 1px blue;">Hamdi Rakkez <hamdi.rakez.selotec@gmail.com> hat am 19. August 2015 um 12:06 geschrieben:<br><br>
<div dir="ltr">
<div class="gmail_default" style="font-family: trebuchet ms,sans-serif; font-size: large; color: #073763;">Hi,</div>
<div class="gmail_default" style="font-family: trebuchet ms,sans-serif; font-size: large; color: #073763;"> </div>
<div class="gmail_default" style="font-family: trebuchet ms,sans-serif; font-size: large; color: #073763;">I am trying to use <strong>shaders</strong> to decode <strong>bayer</strong> images to <strong>RGB</strong> images.</div>
<div class="gmail_default" style="font-family: trebuchet ms,sans-serif; font-size: large; color: #073763;"> </div>
<div class="gmail_default" style="font-family: trebuchet ms,sans-serif; font-size: large; color: #073763;">I don't want to use the <strong>bayer2rgb</strong> element.</div>
<div class="gmail_default" style="font-family: trebuchet ms,sans-serif; font-size: large; color: #073763;"> </div>
<div class="gmail_default" style="font-family: trebuchet ms,sans-serif; font-size: large; color: #073763;">So, according to this <em><a href="http://graphics.cs.williams.edu/papers/BayerJGT09/#shaders">http://graphics.cs.williams.edu/papers/BayerJGT09/#shaders</a></em> it is possible to user gl shaders for demosaicing a bayer image.</div>
<div class="gmail_default" style="font-family: trebuchet ms,sans-serif; font-size: large; color: #073763;"> </div>
<div class="gmail_default" style="font-family: trebuchet ms,sans-serif; font-size: large; color: #073763;">I have used the shader file along with glshader in a pipeline like this :</div>
<div class="gmail_default" style="font-family: trebuchet ms,sans-serif; font-size: large; color: #073763;"> </div>
<blockquote style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: #cccccc; border-left-style: solid; padding-left: 1ex;"><span style="color: #073763; font-family: trebuchet ms,sans-serif;">gst-launch-1.0 -v filesrc location=bayer_file.avi ! avidemux ! glupload ! glshader location=bayerRGB.GLSL ! glimagesink</span></blockquote>
<div> </div>
<div> </div>
<div class="gmail_default" style="font-family: 'trebuchet ms',sans-serif; font-size: large; color: #073763;">But, I have a very noisy result, and an image of the result is attached to this Email.</div>
<div class="gmail_default" style="font-family: 'trebuchet ms',sans-serif; font-size: large; color: #073763;"> </div>
<div class="gmail_default" style="font-family: 'trebuchet ms',sans-serif; font-size: large; color: #073763;">Any ideas why such behavior.</div>
<div class="gmail_default" style="font-family: 'trebuchet ms',sans-serif; font-size: large; color: #073763;"> </div>
<div class="gmail_default" style="font-family: 'trebuchet ms',sans-serif; font-size: large; color: #073763;">Thank you</div>
</div>
_______________________________________________<br>gstreamer-devel mailing list<br>gstreamer-devel@lists.freedesktop.org<br>http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</blockquote></body></html>