Skip to content

Improve burst-level HDR bracketing with flicker-safe capture - #183

Open
matthew777777 wants to merge 4 commits into
eszdman:devfrom
matthew777777:pr-to-upstream12
Open

Improve burst-level HDR bracketing with flicker-safe capture#183
matthew777777 wants to merge 4 commits into
eszdman:devfrom
matthew777777:pr-to-upstream12

Conversation

@matthew777777

Copy link
Copy Markdown
Contributor

Description

This PR replaces the repeating three-frame bracketing pattern with a capture plan built once per burst.

Changes

  • Uses the existing Bracketing dropdown as the user control.

  • Captures base-exposure reference frames first, then adds shadow frames according to the selected mode:

    • HDR: one final 4× frame.
    • Deep shadows: one final 8× frame.
    • Motion-safe shadows: two final 4× frames.
  • Preserves at least one base reference and one shadow frame when removing shaky frames before merge.

  • Implements flicker-safe exposure logic that aligns shutter speeds with detected 50Hz/60Hz mains frequency while compensating with ISO.

  • Enables automatic AE antibanding in the preview request builder.

  • Add's updatePreviewFlicker to track scene flicker statistics from the camera HAL.

  • Keeps the actual exposure ratio metadata-driven in HDRX processing.

  • Renames the dropdown from “Exposure Bracketing” to “Bracketing.”

Validation

  • :app:compileDebugJavaWithJavac passes.
  • git diff --check passes.

Follow-up

Preview-histogram-based automatic bracketing are intentionally out of scope for this PR.

matthew777777 and others added 4 commits August 29, 2026 17:24
- Introduce new bracketing profiles: HDR (1x, 4x), Deep Shadows (1x, 8x), and Motion-safe shadows (1x, 4x, 4x).
- Refactor bracketing strategy to capture long-exposure frames at the end of a burst, preserving base frames for alignment.
- Implement flicker-safe exposure logic that aligns shutter speeds with detected 50Hz/60Hz mains frequency while compensating with ISO.
- Update `HdrxProcessor` to ensure shadow frames are preserved during burst filtering and deghosting.
- Enable automatic AE antibanding in the preview request builder.
- Add `updatePreviewFlicker` to track scene flicker statistics from the camera HAL.
- Update UI labels and settings entries for the new bracketing modes.
HdrxProcessor now:

  - Finds the measured 0 EV frame from the requested bracket.
  - Classifies exposures relative to that frame:
      - Below base → Low
      - Approximately base → Normal
      - Above base → High

  - Uses a 5% tolerance for camera HAL exposure rounding.
  - Preserves at least one frame from every exposure class during motion-based pruning.
  - Continues normalizing GPU exposure multipliers against the darkest frame, as required by the current shaders.
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