{"id":21076199,"url":"https://github.com/rust-av/av1-grain","last_synced_at":"2026-04-06T03:09:46.352Z","repository":{"id":48141955,"uuid":"516587606","full_name":"rust-av/av1-grain","owner":"rust-av","description":"Helpers for generating and parsing AV1 film grain data","archived":false,"fork":false,"pushed_at":"2024-04-01T16:15:47.000Z","size":110,"stargazers_count":8,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-12T22:47:45.418Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-av.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-22T02:47:17.000Z","updated_at":"2024-08-26T10:10:50.000Z","dependencies_parsed_at":"2022-08-12T19:40:28.497Z","dependency_job_id":null,"html_url":"https://github.com/rust-av/av1-grain","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-av%2Fav1-grain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-av%2Fav1-grain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-av%2Fav1-grain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-av%2Fav1-grain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-av","download_url":"https://codeload.github.com/rust-av/av1-grain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225028959,"owners_count":17409615,"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":[],"created_at":"2024-11-19T19:27:17.500Z","updated_at":"2026-04-06T03:09:46.339Z","avatar_url":"https://github.com/rust-av.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# av1-grain\n\n[![docs.rs](https://img.shields.io/docsrs/av1-grain?style=for-the-badge)](https://docs.rs/av1-grain)\n[![Crates.io](https://img.shields.io/crates/v/av1-grain?style=for-the-badge)](https://crates.io/crates/av1-grain)\n[![LICENSE](https://img.shields.io/crates/l/av1-grain?style=for-the-badge)](https://github.com/rust-av/av1-grain/blob/main/LICENSE)\n\nThis crate contains helper functions for parsing and generating AV1 film grain data.\n\nThis code was originally created for use in rav1e.\nIt has been moved to this crate so it can be shared with other\nAV1 crates that need to deal with film grain.\n\n## Examples\n\nThe `generate_photon_noise_params` and `write_grain_table` APIs live behind the\n`create` feature. Enable it in your project to produce plain-text photon noise tables\ncompatible with `svt-av1`, `aomenc`, and similar encoders:\n\n```rust\nuse av1_grain::{\n    generate_photon_noise_params, write_grain_table, NoiseGenArgs, TransferFunction,\n};\n\nfn main() -\u003e anyhow::Result\u003c()\u003e {\n    // This would apply to the entire video--we can use `u64::MAX` as the end timestamp for simplicity.\n    let segment = generate_photon_noise_params(\n        0,\n        u64::MAX,\n        NoiseGenArgs {\n            // This setting can range from 100-6400 to adjust the noise strength\n            iso_setting: 800,\n            width: 1920,\n            height: 1080,\n            transfer_function: TransferFunction::BT1886,\n            chroma_grain: true,\n            random_seed: None,\n        },\n    );\n\n    write_grain_table(\"example.tbl\", \u0026[segment])?;\n    Ok(())\n}\n```\n\nRunning this program generates a photon noise table covering the entire video\n(`start_time` 0 to `end_time` `u64::MAX`) and stores it in `example.tbl`. The\nfile extension is arbitrary; `.tbl` is a common choice.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-av%2Fav1-grain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-av%2Fav1-grain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-av%2Fav1-grain/lists"}