Hi,
Did you find a solution to your problem? I am experiencing a similar problem. I have developed a program that draws video to an opengl texture based on teh example code provided by BlackMagic Design. I have a problem of receiving interlaced video when using the example glsl shader. I have tried to modify the shader to do deinterlacing but have run into problem iterating through the lines of the texture.
Below is an example of what I am trying to get to wok combined with the YUVtoRGB shader:
void main()
{
/* Get default texel read position (s,t): s is column, t is row of image. */
vec2 readpos = gl_TexCoord[0].st;
if (bool(mod(floor(readpos.t + UseOddField), 2.0))) {
/* This row is to be replaced by the average of its neighbour rows: */
gl_FragColor = 0.5*(texture2DRect(Image1, readpos – vec2(0.0, 1.0)) + texture2DRect(Image1, readpos + vec2(0.0, 1.0)));
}
else {
/* This row is to be used: */
gl_FragColor = texture2DRect(Image1, readpos);
}
}