Skip to content

feat(pentax): decode CameraSettings (0x0205) via a generated BITMASK-aware table - #435

Merged
swackhamer merged 1 commit into
mainfrom
feat/pentax-camerasettings-bitmask
Aug 2, 2026
Merged

feat(pentax): decode CameraSettings (0x0205) via a generated BITMASK-aware table#435
swackhamer merged 1 commit into
mainfrom
feat/pentax-camerasettings-bitmask

Conversation

@swackhamer

Copy link
Copy Markdown
Collaborator

Summary

  • Teaches codegen_subdirs.py ExifTool's hash-with-BITMASK PrintConv shape: 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, per ExifTool's dispatch (ExifTool.pm:3614-3618). A PrintConv carrying both OTHER and BITMASK still raises Unsupported.
  • Pentax 0x0205 CameraSettings (count<25 layout, Pentax.pm:2784-2797, including its table-level ByteOrder => 'BigEndian' override) is now decoded from the generated table, replacing the hand-written partial decoder in pentax.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.
  • New hand-written conversion ports (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

  • Regeneration check: dump_tables.pl (pinned ExifTool 13.59) → codegen_subdirs.py --allow-skip reproduces subdir_tables.rs byte-identically after rustfmt — the committed tables are pure generator output, no hand edits.
  • PentaxEv/DecodeBits ports 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

…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>
@swackhamer
swackhamer merged commit feff0dd into main Aug 2, 2026
5 checks passed
@swackhamer
swackhamer deleted the feat/pentax-camerasettings-bitmask branch August 2, 2026 17:31
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.

1 participant