Just as a tip for all Video/ Visual Basic enthousiasts: I found a VERY simple way to deinterlace video:
In fact its simple: stretchblt the interlaced picture into two pictures half the height, where stretchbltmode is 3!
Private Sub DeInterlace(picSRC, picDSTEven, picDSTOdd)
SetStretchBltMode picDSTEven.hdc, 3
SetStretchBltMode picDSTOdd.hdc, 3
picDSTEven.ScaleHeight = picSRC.ScaleHeight / 2
picDSTOdd.ScaleHeight = picSRC.ScaleHeight / 2
StretchBlt picDSTEven.hdc, 0, 0, picDSTEven.ScaleWidth, picDSTEven.ScaleHeight, picSRC.hdc, 0, 0, picSRC.ScaleWidth, picSRC.ScaleHeight - 1, &HCC0020
StretchBlt picDSTOdd.hdc, 0, 0, picDSTOdd.ScaleWidth, picDSTOdd.ScaleHeight, picSRC.hdc, 0, 1, picSRC.ScaleWidth, picSRC.ScaleHeight - 1, &HCC0020
picDSTEven.Refresh
picDSTOdd.Refresh
SetStretchBltMode picDSTEven.hdc, 1
SetStretchBltMode picDSTOdd.hdc, 1
End Sub
The opposite, so reinterlace, is even simpler than that. If you are interested, please let me know, I will then also put this on tek-tips!
Hope this helps anyone!
Hans
In fact its simple: stretchblt the interlaced picture into two pictures half the height, where stretchbltmode is 3!
Private Sub DeInterlace(picSRC, picDSTEven, picDSTOdd)
SetStretchBltMode picDSTEven.hdc, 3
SetStretchBltMode picDSTOdd.hdc, 3
picDSTEven.ScaleHeight = picSRC.ScaleHeight / 2
picDSTOdd.ScaleHeight = picSRC.ScaleHeight / 2
StretchBlt picDSTEven.hdc, 0, 0, picDSTEven.ScaleWidth, picDSTEven.ScaleHeight, picSRC.hdc, 0, 0, picSRC.ScaleWidth, picSRC.ScaleHeight - 1, &HCC0020
StretchBlt picDSTOdd.hdc, 0, 0, picDSTOdd.ScaleWidth, picDSTOdd.ScaleHeight, picSRC.hdc, 0, 1, picSRC.ScaleWidth, picSRC.ScaleHeight - 1, &HCC0020
picDSTEven.Refresh
picDSTOdd.Refresh
SetStretchBltMode picDSTEven.hdc, 1
SetStretchBltMode picDSTOdd.hdc, 1
End Sub
The opposite, so reinterlace, is even simpler than that. If you are interested, please let me know, I will then also put this on tek-tips!
Hope this helps anyone!
Hans