feat(pentax): decode CameraSettings (0x0205) via a generated BITMASK-aware table - #435
Merged
Merged
Conversation
…aware table Teaches codegen_subdirs.py ExifTool's hash-with-BITMASK PrintConv shape: an exact-value match against the direct keys first, then DecodeBits (ExifTool.pm:6385) bit by bit -- set bits print their label or [n], joined ', ', with '(none)' when no bits are set (ExifTool.pm:3614-3618 dispatch). A PrintConv carrying both OTHER and BITMASK still raises Unsupported. Pentax 0x0205 CameraSettings (count<25 layout, Pentax.pm:2784-2797, with its table-level BigEndian override) replaces the hand-written partial decoder in pentax.rs; the regenerated subdir_tables.rs is byte-identical to a fresh codegen_subdirs.py run against the pinned ExifTool 13.59 dump. New hand-written ports (PentaxEv, ISOFloor/Tv/Av/BaseExposureCompensation value convs, three PrintConv sprintf ports) each cite their Pentax.pm line and are registered in the generator's expression registries. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
codegen_subdirs.pyExifTool's hash-with-BITMASKPrintConv shape: exact-value match against the direct keys first, thenDecodeBits(ExifTool.pm:6385) bit by bit — set bits print their label or[n], joined with', ',(none)when no bits are set, per ExifTool's dispatch (ExifTool.pm:3614-3618). A PrintConv carrying bothOTHERandBITMASKstill raisesUnsupported.0x0205CameraSettings (count<25 layout, Pentax.pm:2784-2797, including its table-levelByteOrder => 'BigEndian'override) is now decoded from the generated table, replacing the hand-written partial decoder inpentax.rs(which covered only a few fields of the count<25 layout).CameraSettingsUnknown(count≥25) is intentionally not transcribed — ExifTool names no tags from it either.PentaxEv, the ISOFloor/Tv/Av/BaseExposureCompensation ValueConvs, three sprintf PrintConv ports) each cite their Pentax.pm line and are registered in the generator's expression registries.Verification
dump_tables.pl(pinned ExifTool 13.59) →codegen_subdirs.py --allow-skipreproducessubdir_tables.rsbyte-identically afterrustfmt— the committed tables are pure generator output, no hand edits.PentaxEv/DecodeBitsports verified line-by-line against the pinned 13.59 source.cargo test --lib— 3477 passed, 0 failed;cargo test --test integration pentax— 7 passed;cargo clippy --lib --bins -- -D warnings— clean.Salvaged from an interrupted session's worktree (uncommitted, base was #428).
🤖 Generated with Claude Code