Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phase One P25+ support #704

Merged
merged 1 commit into from
Apr 1, 2024
Merged

Conversation

kmilos
Copy link
Contributor

@kmilos kmilos commented Mar 31, 2024

@kmilos kmilos requested a review from LebedevRI as a code owner March 31, 2024 14:56
@LebedevRI LebedevRI merged commit 6364c6a into darktable-org:develop Apr 1, 2024
57 checks passed
@LebedevRI
Copy link
Member

@kmilos thank you!
Crop needed serious adjustment though, the usual "glitchy pixels at the edge thing" was visible.

@kmilos
Copy link
Contributor Author

kmilos commented Apr 1, 2024

Crop needed serious adjustment though, the usual "glitchy pixels at the edge thing" was visible.

That's still unfortunate, this was not too far off (maybe 2px on each side) from the vendor embedded crop...

@kmilos kmilos deleted the kmilos/phase_p25+ branch April 1, 2024 07:58
@LebedevRI
Copy link
Member

By this, do you mean the one in your diff, or the correct one?
If former, ouch. If latter, i always round up to a full CFA and overcrop by one full CFA.

@kmilos
Copy link
Contributor Author

kmilos commented Apr 1, 2024

The one in my original patch - vendor has 26,21 for top left, I started w/ 26,20 (tightest possible). So 26,22 or 28,22 should've worked in theory (w/ -12,-12 bottom right instead of my tight -10,-10)...

Could have something to do w/ native portrait readout of the sensor? Border artifacts still there if you bypass the orientation module?

Otherwise I guess we could still open a tracking issue for dt demosaic (or whatever module in the pipeline)?

@LebedevRI
Copy link
Member

Could have something to do w/ native portrait readout of the sensor? Border artifacts still there if you bypass the orientation module?

At least here demosaic happens first, so that can't be it.

Otherwise I guess we could still open a tracking issue for dt demosaic (or whatever module in the pipeline)?

Since tighter crop fixes it, and rawprepare actually resizes the image and drops cropped-off pixels,
i don't really see how this could be a demosaicer bug...

@kmilos
Copy link
Contributor Author

kmilos commented Apr 1, 2024

Since tighter crop fixes it, and rawprepare actually resizes the image and drops cropped-off pixels,
i don't really see how this could be a demosaicer bug...

And I don't really see why supplying all the valid pixels wouldn't work either, unless there is something funny going on w/ border processing somewhere... (E.g. related to stride, vector length etc.) @jenshannoschwalm again, sorry

@LebedevRI
Copy link
Member

Since tighter crop fixes it, and rawprepare actually resizes the image and drops cropped-off pixels,
i don't really see how this could be a demosaicer bug...

And I don't really see why supplying all the valid pixels wouldn't work either, unless there is something funny going on w/ border processing somewhere...

But how do we know that all the pixels as specified by that vendor tag are the valid pixels?
Perhaps the tag is just wrong, or perhaps we are missing some custom "opcode" handling.

Since tighter crop fixes it, and rawprepare actually resizes the image and drops cropped-off pixels,
i don't really see how this could be a demosaicer bug...

And I don't really see why supplying all the valid pixels wouldn't work either, unless there is something funny going on w/ border processing somewhere... (E.g. related to stride, vector length etc.) @jenshannoschwalm again, sorry

But again, if there was a bug, i don't really see why tightening the crop would magically fix it.
(rawprepare actually does crop the buffer, unless it no longer doesn't)

@kmilos
Copy link
Contributor Author

kmilos commented Apr 1, 2024

But how do we know that all the pixels as specified by that vendor tag are the valid pixels?

Dump from rstest or LibRaw's unprocessed_raw, inspect w/ some contrast stretch/histogram equalisation. I.e. bypass rawprepare and demosaic in dt itself.

i don't really see why tightening the crop would magically fix it.
(rawprepare actually does crop the buffer, unless it no longer doesn't)

As mentioned, changes stride?

@LebedevRI
Copy link
Member

i don't really see why tightening the crop would magically fix it.
(rawprepare actually does crop the buffer, unless it no longer doesn't)

As mentioned, changes stride?

In all 8 demosaic algos, including passthrough?

@kmilos
Copy link
Contributor Author

kmilos commented Apr 1, 2024

In all 8 demosaic algos, including passthrough?

Could also be elsewhere in the pipeline as I said, not necessarily demosaic... Some underlying tiling/LOD logic?

Anyhow, just find it weird this keeps popping back.

If you're happy w/ the workaround of tweaking the crop, we'll just keep doing that.

@jenshannoschwalm
Copy link
Contributor

I will have a close look after this has landed in dt master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Phase One DF with P25+
3 participants