{"id":17429783,"url":"https://github.com/marph91/pico-png","last_synced_at":"2025-04-15T22:30:53.842Z","repository":{"id":54627304,"uuid":"260877427","full_name":"marph91/pico-png","owner":"marph91","description":"PNG encoder, implemented in VHDL","archived":false,"fork":false,"pushed_at":"2024-03-30T11:43:32.000Z","size":179,"stargazers_count":23,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T03:41:32.975Z","etag":null,"topics":["deflate","fpga","hardware","huffman","lzss","png","png-encoder","python","vhdl"],"latest_commit_sha":null,"homepage":"","language":"VHDL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marph91.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-05-03T10:06:34.000Z","updated_at":"2024-12-02T07:50:41.000Z","dependencies_parsed_at":"2024-10-21T12:07:04.078Z","dependency_job_id":null,"html_url":"https://github.com/marph91/pico-png","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marph91%2Fpico-png","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marph91%2Fpico-png/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marph91%2Fpico-png/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marph91%2Fpico-png/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marph91","download_url":"https://codeload.github.com/marph91/pico-png/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249165885,"owners_count":21223343,"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":["deflate","fpga","hardware","huffman","lzss","png","png-encoder","python","vhdl"],"created_at":"2024-10-17T07:09:07.892Z","updated_at":"2025-04-15T22:30:53.111Z","avatar_url":"https://github.com/marph91.png","language":"VHDL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pico-png\n\n[![testsuite](https://github.com/marph91/pico-png/workflows/tests/badge.svg)](https://github.com/marph91/pico-png/actions?query=workflow%3Atests)\n[![synthesis](https://github.com/marph91/pico-png/workflows/synthesis/badge.svg)](https://github.com/marph91/pico-png/actions?query=workflow%3Asynthesis)\n\n`pico-png` is a VHDL implementation of a PNG encoder, as specified in [ISO/IEC 15948:2003](https://www.w3.org/TR/2003/REC-PNG-20031110/). It includes a deflate compression according to [RFC1950](https://www.ietf.org/rfc/rfc1950.txt) and [RFC1951](https://www.ietf.org/rfc/rfc1951.txt).\n\n## Features\n\n- Row filter types: no filter, subtraction filter\n- Color types: gray, RGB, gray + alpha, RGBA\n- Zlib compression: fixed huffman tables\n\nFor details about the configuration, see [here](doc/toplevel_interface.md).\n\n## Limitations\n\n- Fixed huffman tables only\n- Small input and search buffers (LZSS)\n- Only the first match is considered (LZSS)\n\n## Architecture overview\n\n![architecture_overview](doc/images/overview.svg)\n\n## Stats\n\n### Comparison with IPB-PNG-E\n\n[IPB-PNG-E](https://ipbloq.files.wordpress.com/2017/09/ipb-png-e-pb.pdf) is a commercial IP-Core to encode an raw image to PNG. It is the only one I could find with some stats for comparison. If there are any other cores with stats, please contact me.\n\n|Property|IPB-PNG-E|pico-png|\n|:-|:-:|:-:|\n|Image size|800x480 pixel|800x480 pixel|\n|Color type|24-bit RGB|24-bit RGB|\n|Row filter type|?|no filter|\n|Zlib compression|fixed huffman tables|fixed huffman tables|\n|Latency|12.5 ms|53.2 ms at 100 MHz|\n|Target FPGA|Kintex-7|Kintex-7|\n|Slices|3490|507 (1577 LUT, 741 FF)|\n|BRAM|2 Mbit|-|\n|DSP|8|-|\n|Worst negative slack|?|0.470 ns|\n\n### Comparison with Imagemagick\n\nFor another comparison, the same input image as above was used. The image data was generated as ones only, which means there should be almost the maximum compression. There were no additional settings. This is the snippet used to create the imagemagick reference:\n\n```bash\npython3 -c 'with open(\"800x480_rgb.raw\", \"wb\") as outfile: outfile.write(bytes([1]*800*480*3))'\nconvert -size 800x480 -depth 8 rgb:800x480_rgb.raw png24:800x480_rgb.png\nwc --bytes 800x480_rgb.raw 800x480_rgb.png\n```\n\nThe image of `pico-png` is a simulation output from `pico-png/sim/png_encoder/gen/test_img_ones_800x480_row_filter_0_color_2_btype_1.png`.\n\n|Property|Imagemagick|pico-png|\n|:-|:-:|:-:|\n|Image size|800x480 pixel|800x480 pixel|\n|Image depth|24-bit RGB|24-bit RGB|\n|Raw image size (kbyte)|1152|1152|\n|Encoded image size (kbyte)|2.4|282.8|\n\nThe encoded image size of imagemagick is much smaller than `pico-png`. This is as expected, because `pico-png` uses only a small window size of 12 values. Imagemagick uses most likely the default window size of 32k values. However, the table shows that a reduced image size is achieved in both cases.\n\n## Tests\n\nTo run the testbench, simply execute `cd sim \u0026\u0026 ./run_all.py -p4`.\n\n## Similar projects and further links\n\n- \u003chttps://github.com/tomtor/HDL-deflate\u003e: Deflate (de)compression in MyHDL.\n- \u003chttps://hal-upec-upem.archives-ouvertes.fr/hal-01305864/document\u003e\n- \u003chttp://www.ece.ualberta.ca/~jhan8/publications/1570528606.pdf\u003e\n- \u003chttps://zenodo.org/record/3679358\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarph91%2Fpico-png","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarph91%2Fpico-png","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarph91%2Fpico-png/lists"}