{"id":17702659,"url":"https://github.com/friendlymatthew/jpeg","last_synced_at":"2025-05-13T03:45:25.917Z","repository":{"id":244716921,"uuid":"804581867","full_name":"friendlymatthew/jpeg","owner":"friendlymatthew","description":"Implements jpeg algorithms using portable SIMD.","archived":false,"fork":false,"pushed_at":"2024-12-27T15:24:33.000Z","size":916,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-20T22:32:36.643Z","etag":null,"topics":["jfif","jpeg","simd"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/friendlymatthew.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-22T21:36:11.000Z","updated_at":"2025-03-21T13:27:57.000Z","dependencies_parsed_at":"2024-06-17T00:26:26.017Z","dependency_job_id":"b83d1b77-54b4-4f8a-b07b-27680056462d","html_url":"https://github.com/friendlymatthew/jpeg","commit_stats":null,"previous_names":["friendlymatthew/jpeg"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friendlymatthew%2Fjpeg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friendlymatthew%2Fjpeg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friendlymatthew%2Fjpeg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friendlymatthew%2Fjpeg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/friendlymatthew","download_url":"https://codeload.github.com/friendlymatthew/jpeg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253870822,"owners_count":21976610,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jfif","jpeg","simd"],"created_at":"2024-10-24T19:08:40.773Z","updated_at":"2025-05-13T03:45:25.899Z","avatar_url":"https://github.com/friendlymatthew.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jpeg-decoder\n\nA decoder following the [ITU-T.81 Specification](https://www.w3.org/Graphics/JPEG/itu-t81.pdf).\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"decode/mike.jpg\" alt=\"Original Mike\" width=\"320\"/\u003e\n    \u003cimg src=\"decode/gray_mike.png\" alt=\"Grayscale Mike\" width=\"320\"/\u003e\n\u003c/p\u003e\n\n```rust\nuse jpeg::prelude::*;\n\nfn main() -\u003e anyhow::Result\u003c()\u003e {\n    let mut decoder = Decoder {\n        mmap: unsafe { Mmap::map(\u0026File::open(\"mike.jpg\")?)? },\n        cursor: 0,\n        encoding: CodingProcess::BaselineDCT,\n    };\n\n    let ycbcrs: Vec\u003cColorSpace\u003e = decoder.decode()?;\n    let rgbs = ColorSpace::convert_ycbcr_to_rgb(ycbcrs);\n\n    Ok(())\n}\n```\n\n## Coding Process\n\nThe decoder uses baseline sequential as its coding process.\nFor other coding processes, see `CODING_PROCESSES.md`.\n\n## Portable SIMD\n\n`jpeg` makes use of portable SIMD throughout various steps of the decoding process, as well as color space conversion\nand grayscaling. For example, consider dequantization:\n\n\u003cimg src=\"decode/dequantization.png\" width =\"400\" align=\"center\"/\u003e\n\nThis can be easily vectorized, simply cast the quantization table and coefficients into `Simd\u003cu8, 64\u003e` and perform a\nlane-multiplication with each other.\n\nSuch trivial cases also exist during coefficient level-shifting and marker segment parsing.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriendlymatthew%2Fjpeg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffriendlymatthew%2Fjpeg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriendlymatthew%2Fjpeg/lists"}