Skip to content

jpeg: Extended jpeg support#353

Open
feliwir wants to merge 4 commits intoetemesi254:devfrom
feliwir:extended-jpeg
Open

jpeg: Extended jpeg support#353
feliwir wants to merge 4 commits intoetemesi254:devfrom
feliwir:extended-jpeg

Conversation

@feliwir
Copy link

@feliwir feliwir commented Feb 9, 2026

This builds on #352

This adds support for process 4 of the JPEG specification (12-bit support). The decoding routines are similar to the existing 8-bit decoding routines, however i made the bitdepth a generic parameter. In theory everything in mcu_ext.rs could be applied to the functions in mcu.rs and then we could remove the duplicate code

For testing i added some publicly available DICOM files, provided by the standard committe. These files are publicly available here: ftp://medical.nema.org/MEDICAL/Dicom/DataSets/WG04/
It contains both extended jpeg (JPLY) files and lossless jpeg (JPLSS)

To access the pixeldata from these files i added https://github.com/Enet4/dicom-rs as a dev dependency

  • Profile if the generic variants of the scalar IDCT calculation are equally fast and replace the non-generic variants
  • Stop generating PPM image files in the tests. How to validate correct decoding?

@feliwir
Copy link
Author

feliwir commented Feb 10, 2026

I made the IDCT functions generic. I think for the other functions we could do the same, but i am not sure how much generic usage you're a fan of

@feliwir feliwir changed the title Extended jpeg support jpeg: Extended jpeg support Feb 10, 2026
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