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

EOS focusing code improvements #1036

Merged
merged 2 commits into from
Oct 7, 2024
Merged

EOS focusing code improvements #1036

merged 2 commits into from
Oct 7, 2024

Conversation

axxel
Copy link
Contributor

@axxel axxel commented Oct 2, 2024

No description provided.

I believe this was broken since
gphoto@99dceba

With my 5Ds the datasize and size are always equal (which is how I would
expect it to be). Hence I always got a "bad size" value back.
camlibs/ptp2/ptp-pack.c Fixed Show fixed Hide fixed
With the re-enabled FocusInfoEx, the 5Ds spams the log and the
--wait-event console output with a 64 entry long focus info list.
Assuming no tooling is dependent on the particular string format of the
FocusInfoEx value, since it seems to only ever contain a no-empty
set of selected AF-points at the beginning of the capture process, where
the event is 'swollowed' by the focus detection code. This changeset
strips it down to only contain the list of selected AF-points, meaning
without focus, we now get a simple "{}".

Furthermore, the olcmask 0x0100 (FocusInfo) data of the 5Ds, R8 and R5m2
has been analyzed and the in-focus detection code during trigger_capture
has been improved. See code comments for details.
@axxel
Copy link
Contributor Author

axxel commented Oct 3, 2024

A quick double check with a recent released version showed that my conclusion regarding how long the FocusInfoEx parsing was broken, was wrong. Turns out this bounds checking fix from me triggered the wrong internal bounds check in ptp_unpack_EOS_FocusInfoEx and thereby 'broke' the feature.

I'd argue that this does not change my analysis of the potential harm for client code, caused by my suggested change
from

eosversion=8,size=8688x5792,size2=8688x5792,points={{-435,652,283,283},{-966,652,283,283},{-1425,652,283,283},
{-1860,652,283,283},{-2295,652,283,283},{435,978,283,283},{0,978,283,283},{-435,978,283,283},{-1860,326,283,283},
{-2295,326,283,283},{2295,652,283,283},{1860,652,283,283},{1425,652,283,283},{966,652,283,283},{435,652,283,283},
{0,652,283,283},{1860,326,283,283},{1425,326,283,283},{966,326,283,283},{435,326,283,283},{0,326,283,283},
{-435,326,283,283},{-966,326,283,283},{-1425,326,283,283},{435,0,283,283},{0,0,283,283},{-435,0,283,283},{-966,0,283,283},
{-1425,0,283,283},{-1860,0,283,283},{-2295,0,283,283},{2295,326,283,283},{-966,-326,283,283},{-1425,-326,283,283},
{-1860,-326,283,283},{-2295,-326,283,283},{2295,0,283,283},{1860,0,283,283},{1425,0,283,283},{966,0,283,283},
{-2295,-652,283,283},{2295,-326,283,283},{1860,-326,283,283},{1425,-326,283,283},{966,-326,283,283},{435,-326,283,283},
{0,-326,283,283},{-435,-326,283,283},{1425,-652,283,283},{966,-652,283,283},{435,-652,283,283},{0,-652,283,283},
{-435,-652,283,283},{-966,-652,283,283},{-1425,-652,283,283},{-1860,-652,283,283},{435,-978,283,283},{0,-978,283,283},
{-435,-978,283,283},{2295,-652,283,283},{1860,-652,283,283}},
select={20,},unknown={0080380200000000fc1f01c01c07c11fffff}

to

{{0,326,283,283}}

as I explained in the just updated commit log. If, however, you think differently, I can restore the old string content, while still keeping the improved olc-focus-info evaluation.

@msmeissn msmeissn merged commit a0c45bd into gphoto:master Oct 7, 2024
5 checks passed
@axxel axxel deleted the eos-focusing branch October 7, 2024 15:27
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.

2 participants