<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:large;color:#073763">Great explanation Christian.</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:large;color:#073763"><ul><li>Actually I am using only the pixel shader file.<br></li><li>The source is successfully entered from gstreamer to the shader.<br></li><li>SourceSize and first red are in the vertex shader which I am not using.</li></ul></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:large;color:#073763">Question :</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:large;color:#073763"><ul><li>Is it necessary, for the debayering to work, to use both files (vertex and pixel shader). If yes, is it possible to have them both in one file so I can deal with input parameters statically.</li></ul><div>thanks.</div><div><br></div><div>Best,</div><div>Hamdi</div></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:large;color:#073763"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 19, 2015 at 12:15 PM, Christian Sell <span dir="ltr"><<a href="mailto:christian@gsvitec.com" target="_blank">christian@gsvitec.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div><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="margin-left:0px;padding-left:10px;border-left:solid 1px blue">Hamdi Rakkez <<a href="mailto:hamdi.rakez.selotec@gmail.com" target="_blank">hamdi.rakez.selotec@gmail.com</a>> hat am 19. August 2015 um 12:06 geschrieben:<div><div class="h5"><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" target="_blank">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></div></div>
_______________________________________________<br>gstreamer-devel mailing list<br><a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br><a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote></div><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>