To pass some time in a train yesterday, I've copy'n'pasted my recent GPU ISP into Millipixels' postprocessing code to see how it compares with what was already there. Before/after:

@dos I tried to do something similar -- using good, external debayer, then attempting to use GPU pipeline. I attempted to use texture mode than 8200 pictures wide, and GPU did not like that. Rest can be seen in tui/ccam. Pass --cmd:convert, but clearly more work needs to be done there. If you have your code somewhere, I can try to play with it.
Follow

@pavel ??? Full 13MP is still well within GL texture limits. The code just works as-is.

@dos I wanted to do high-quality debayering, which turns 13Mpix into 52Mpix image if I want to pass it to existing shaders. Doing high quality debayer in the shaders would solve that. Really advanced debayer is probably too hard to do on GPU, but it should be possible to do better than current debayer-and-downscale.

@pavel That's not how it works. A 4-channel 13Mpix image remains a 13Mpix image and still fits within limits.

@dos Do you have code to share? :-). My version is a tui/ccam. I reformatted debayered RGB data back into RGGB bayer format to feed it into shaders easily, and hit the limit.

@pavel Just take a step back and think a bit about what you just wrote and you won't need any code 😜

@dos It is too late for a bit of thinking, I'm afraid. I wanted to experiment with "good" debayering, and I have code that is unsuitable for GPU. I thought putting it back into RGGB format would be easy way to pass it through the shaders. Well, it was not :-).

@pavel I'd rather give the shader RGB values than rebayer debayered data so it can debayer it again if I wanted "easy", but that's just me.

@dos Yeah, you are clearly more comfortable modifying shader code than me :-).

@pavel How comfortable does one need to be to replace a single line that calls a function called "debayer"? 🤔

@dos Well, deleting that line was simple. Replacing it seems to be more difficult. Plus img_attrs need to be modified to be RGB888, if I understand things correctly.
@dos Ok, so after a bit of fight, I got it to work. As usual, problem was elsewhere than I was looking: gl_init(), not shader.
Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml