-
Notifications
You must be signed in to change notification settings - Fork 282
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
Update canon tags 2 #2087
Update canon tags 2 #2087
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2087 +/- ##
==========================================
+ Coverage 63.19% 63.75% +0.55%
==========================================
Files 96 96
Lines 19204 19202 -2
Branches 9797 9798 +1
==========================================
+ Hits 12136 12242 +106
+ Misses 4762 4658 -104
+ Partials 2306 2302 -4
Continue to review full report at Codecov.
|
@@ -32,7 +32,7 @@ class CanonAfInfoTest(metaclass=CaseMeta): | |||
Exif.Canon.AFPointsInFocus Short 1 4 | |||
Exif.Canon.AFPointsSelected Short 1 8 | |||
Exif.Canon.AFPointsUnusable Short 1 (none) | |||
Exif.Canon.AFInfo Short 273 546 2 63 61 6720 4480 6720 4480 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 0 0 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 0 0 65200 64790 64435 64099 63764 336 0 65200 64099 63764 1772 1437 1101 746 336 0 1437 1101 746 336 0 65200 64790 64435 336 0 65200 64790 64435 64099 63764 1772 64790 64435 64099 63764 1772 1437 1101 746 63764 1772 1437 1101 746 336 0 65200 1101 746 336 0 65200 64790 64435 64099 336 0 65200 1772 1437 0 0 547 625 625 625 625 821 821 821 308 308 625 625 625 625 547 547 308 308 308 274 274 274 308 308 0 0 0 0 0 0 0 308 65228 65228 65228 65228 0 0 0 0 64911 65228 65228 65228 65228 65262 65262 65262 64911 64911 64989 64989 64989 64911 64911 64911 64715 64715 64715 64911 64911 0 0 0 512 0 0 0 512 0 0 0 0 0 0 65535 | |||
""" , """Exif.Canon.AFInfo Short 273 546 2 63 61 6720 4480 6720 4480 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 0 0 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 218 0 0 65200 64790 64435 64099 63764 336 0 65200 64099 63764 1772 1437 1101 746 336 0 1437 1101 746 336 0 65200 64790 64435 336 0 65200 64790 64435 64099 63764 1772 64790 64435 64099 63764 1772 1437 1101 746 63764 1772 1437 1101 746 336 0 65200 1101 746 336 0 65200 64790 64435 64099 336 0 65200 1772 1437 0 0 547 625 625 625 625 821 821 821 308 308 625 625 625 625 547 547 308 308 308 274 274 274 308 308 0 0 0 0 0 0 0 308 65228 65228 65228 65228 0 0 0 0 64911 65228 65228 65228 65228 65262 65262 65262 64911 64911 64989 64989 64989 64911 64911 64911 64715 64715 64715 64911 64911 0 0 0 512 0 0 0 512 0 0 0 0 0 0 65535 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀 how is possible that this was working previously?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The Canon.AFxxx behaviour is unchanged since 0.27.3. I modified the test slightly because a couple of new fields were add Exif.Canon.AFMicroAdj
and Exif.Canon.AFConfig
. I don't know the genesis of these fields. @piponazo @alexvanderberkel @hassec and @neheb get a mention in the blame listing:
AFConfig
534 rmills@rmillsm1:~/gnu/github/exiv2/main $ git blame src/canonmn_int.cpp | grep AFConfig
bdd8a386b src/canonmn_int.cpp (Christoph Hasse 2021-06-08 21:56:04 +0200 637) {0x4028, "AFConfig", N_("AFConfig"), N_("AFConfig"), canonId, makerTags, unsignedShort, -1, printValue},
ff2ffb190 src/canonmn_int.cpp (Alex Esseling 2021-01-12 20:55:29 +0100 1230) //Canon AFConfig Tags
6da49fd29 src/canonmn_int.cpp (Rosen Penev 2021-05-17 16:54:53 -0700 1232) {0x0001, "AFConfigTool", N_("AF Config Tool"), N_("AF Config Tool"), canonAfCId, makerTags, signedLong, -1, printValue},
AFMicroAdj
535 rmills@rmillsm1:~/gnu/github/exiv2/main $ git blame src/canonmn_int.cpp | grep AFMicroAdj
bdd8a386b src/canonmn_int.cpp (Christoph Hasse 2021-06-08 21:56:04 +0200 628) {0x4013, "AFMicroAdj", N_("AFMicroAdj"), N_("AFMicroAdj"), canonId, makerTags, unsignedShort, -1, printValue},
ff2ffb190 src/canonmn_int.cpp (Alex Esseling 2021-01-12 20:55:29 +0100 906) // Canon AFMicroAdjMode Quality Info, tag 0x0001
6da49fd29 src/canonmn_int.cpp (Rosen Penev 2021-05-17 16:54:53 -0700 907) constexpr TagDetails canonAFMicroAdjMode[] = {
bdd8a386b src/canonmn_int.cpp (Christoph Hasse 2021-06-08 21:56:04 +0200 914) // Canon AFMicroAdj Info Tag
6da49fd29 src/canonmn_int.cpp (Rosen Penev 2021-05-17 16:54:53 -0700 916) {0x0001, "AFMicroAdjMode", N_("AFMicroAdjMode"), N_("AFMicroAdjMode"), canonAfMiAdjId, makerTags, signedLong, -1, EXV_PRINT_TAG(canonAFMicroAdjMode)},
bdd8a386b src/canonmn_int.cpp (Christoph Hasse 2021-06-08 21:56:04 +0200 917) {0x0002, "AFMicroAdjValue", N_("AF Micro Adj Value"), N_("AF Micro Adj Value"), canonAfMiAdjId, makerTags, signedRational, -1, printValue},
de036b2b2 src/canonmn_int.cpp (Luis Díaz Más 2022-02-09 23:00:03 +0100 918) {0xffff, "(UnknownCanonAFMicroAdjTag)", "(UnknownCanonAFMicroAdjTag)", N_("Unknown Canon AFMicroAdj tag"), canonAfMiAdjId, makerTags, signedShort, 1, printValue}
536 rmills@rmillsm1:~/gnu/github/exiv2/main $
Great to see the tests finally passing! Good team work 💪 @alexvanderberkel @clanmills . Is the work in this branch finished? Or do you have plans to keep working here? |
Thanks @clanmills for helping me out on the last meters to let the CI pass! As always I enjoy working with you. @piponazo I would rather stop working on this PR and do cosmetic work in different PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small points right now.
The code correctly reads LensSerialNumber on the attached ExifTool test file.
The code also successfully modifies LensSerialNumber
The code also successfully creates a .EXV file which can be read:
|
I think we are actually done with the PR or have I missed anything? |
…tput Key has correctly changed. The type and value are wrong. ```bash 730 rmills@rmillsmm-local:~/gnu/github/exiv2/update_canon_tags_2/build $ env DYLD_LIBRARY_PATH=$PWD/lib bin/exiv2 -g InfoSize ../test/data/*981*a.exv Exif.CanonAf2Id.AFInfoSize SLong 1 131168 731 rmills@rmillsmm-local:~/gnu/github/exiv2/update_canon_tags_2/build $ exiv2 -g InfoSize ../test/data/*981*a.exv Exif.Canon.AFInfoSize SShort 1 96 732 rmills@rmillsmm-local:~/gnu/github/exiv2/update_canon_tags_2/build $ ```
…nonAFInfo to handle this tag. Minor changes to test script. Cosmetic code changes.
5c385b5
to
0aa34c3
Compare
Gentlemen: I believe this is working and can be merged. @alexvanderberkel. We should have a bug report to justify those changes. I believe lots of new tags have been introduced and it would be good to have a bug report that says "Please provide support for the following Canon MakerNote Tags" and provide a list. Before merging and closing this PR, it would be good to see evidence that:
@1div0. Can you help @alex with this? Obtaining the ExifTool test images is documented in my book: https://exiv2.org/book/index.html#8-6 |
However many of the CI jobs are failing. Until all the relevant CI jobs are passing we should not merge this PR. |
Crap. I don't see that. The last time I looked, they were green. @alexvanderberkel is kind of busy. This PR has been hanging about for 6 months. How are we going to get this done? |
I can try to take a quick look tonight and check if is something easy to fix (hopefully just some wrong expectations in the tests). I would also love to see this merged soon. I do not like to have nice contributions blocked due to small details. |
I'll investigate this CI failures. @alexvanderberkel Can you please submit a bug report enumerating the keys to be supported. When the CI is green, perhaps @1div0 and/or @sridharb1 can contribute to getting this tested. |
it's just the new tests that are failing because they were created without the new output of this MR. But the test automatically creates new reference files with the changes and stores them in a tmp folder. This is reported in the ouput:
So I'd suggest that someone should just run the test locally, copy the new references from Then we can all have a look together if the diff makes sense and then hopefully merge 🎉 |
Thanks @hassec for the explanation. And Thanks @postscript-dev for your web/documentation changes. Q. How did regressionTest get into this PR? It hadn't been invented when we were working on this PR last week. It is regression that's failing on macOS (and presumably everywhere else). I'll fix and update this PR. |
…t/data/test_reference_files/`
It must be Christmas. All the lights have turned Green!. |
@clanmills: For some reason I couldn't reply to the review above, so have done so here.
I have only started using Canon files recently but I see that Canon adds more than one lens related tag. For example, in this file from #2057, there are:
(note: In #2057, I am going to fix the The two values that you found in src/canonmn_int.cpp are from the I looked at some of the lens lists in other makernotes and I didn't see the |
Ah right, thanks @postscript-dev. Lens recognition is horrible. You're right. That string should probably not be localised. Strings pass unchanged if not translated. I'm happy with your explanation that CanonCs and CanonFi are different families (and probably mutually exclusive). If I have sufficient permission, I'll mark this "change request blocker" as resolved. I hope than @alexvanderberkel will provide an issue report to enumerate the tags which are intended to be modified/recognised in this PR. If there are no further "blockers" and the CI is green I hope somebody will approve and merge this PR. |
We still have "1 change requested". I can't find the outstanding request. |
This super-cedes #1628. Test 981 is failing because the output from Exif.CanonAF2Id tags have the wrong type/value.