Skip to content

refactor: Replace picojpeg with jpegdec#2

Open
jpirnay wants to merge 1 commit intopablohc:feat/home-cover-settingsfrom
jpirnay:refactor/remove-picojpeg
Open

refactor: Replace picojpeg with jpegdec#2
jpirnay wants to merge 1 commit intopablohc:feat/home-cover-settingsfrom
jpirnay:refactor/remove-picojpeg

Conversation

@jpirnay
Copy link
Copy Markdown

@jpirnay jpirnay commented Mar 28, 2026

Summary

  • What is the goal of this PR? Replace the in-tree picojpeg library with the JPEGDEC library (already a declared dependency) to align this branch with the main repo's refactor-remove-picojpeg refactor.
  • What changes are included?
    • Delete lib/picojpeg/ (picojpeg.c + picojpeg.h, ~2200 lines)
    • Rewrite JpegToBmpConverter to use JPEGDEC's callback-based decoder instead of picojpeg
    • Adds progressive JPEG support (via patch_jpegdec.py, already present in this branch)
    • Preserves the deadline parameter introduced in this branch: stored in BmpConvertCtx and checked inside the JPEGDEC draw callback — equivalent to the per-MCU-row check in the picojpeg version

Additional Context

This is a mechanical port of jpirnay/crosspoint-reader#refactor-remove-picojpeg on top of this branch. The deadline behaviour is functionally identical to the picojpeg version; only the check site moves from an explicit for (mcuY...) loop to the JPEGDEC draw callback.


AI Usage

Did you use AI tools to help write this code? YES — Claude Code was used to apply the refactoring and adapt the deadline check to JPEGDEC's callback architecture.

- Delete lib/picojpeg/ (picojpeg.c + picojpeg.h)
- Rewrite JpegToBmpConverter to use JPEGDEC (callback-based decoder)
  instead of picojpeg; adds progressive JPEG support via patch_jpegdec.py
- Preserve the deadline parameter introduced in this branch:
  store it in BmpConvertCtx and check it in the JPEGDEC draw callback
  (equivalent to the per-MCU-row check in the picojpeg version)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jpirnay jpirnay changed the title Replace picojpeg with jpegdec refactor: Replace picojpeg with jpegdec Mar 28, 2026
@pablohc pablohc force-pushed the feat/home-cover-settings branch 2 times, most recently from 5fcc5ea to f385cbf Compare March 28, 2026 21:03
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