{"id":18652944,"url":"https://github.com/chromeos/cros-libva","last_synced_at":"2025-10-24T09:39:58.922Z","repository":{"id":65334072,"uuid":"582227232","full_name":"chromeos/cros-libva","owner":"chromeos","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-06T17:30:30.000Z","size":200,"stargazers_count":26,"open_issues_count":4,"forks_count":7,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-26T07:19:54.587Z","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-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chromeos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2022-12-26T06:30:13.000Z","updated_at":"2025-02-26T17:23:34.000Z","dependencies_parsed_at":"2023-02-10T08:31:51.843Z","dependency_job_id":"b6af81aa-7231-4626-add6-85899a805e35","html_url":"https://github.com/chromeos/cros-libva","commit_stats":{"total_commits":79,"total_committers":4,"mean_commits":19.75,"dds":0.2911392405063291,"last_synced_commit":"8a890310cda934128fdf80c29a832249e9a56c23"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/chromeos/cros-libva","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chromeos%2Fcros-libva","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chromeos%2Fcros-libva/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chromeos%2Fcros-libva/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chromeos%2Fcros-libva/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chromeos","download_url":"https://codeload.github.com/chromeos/cros-libva/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chromeos%2Fcros-libva/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261789229,"owners_count":23209774,"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-07T07:09:31.474Z","updated_at":"2025-10-24T09:39:53.901Z","avatar_url":"https://github.com/chromeos.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Libva Rust Wrapper\n\nThis crate provides lightweight and (hopefully) safe libva abstractions for use\nwithin Rust code with minimal dependencies. It is developed for use in\nChromeOS, but has no ChromeOS specifics or dependencies and should thus be\nusable anywhere.\n\n## Dependencies\n\nThe native [libva](https://github.com/intel/libva) library is required at link\ntime, so make sure to have the `libva-dev` or equivalent package for your\ndistribution installed. The libva version needs to be 1.20.0 or newer. The\nVA-API driver corresponding to your hardware is also required: for Intel\nhardware it will be [intel-media-driver](https://github.com/intel/media-driver),\nwhereas AMD hardware relies on [Mesa](https://gitlab.freedesktop.org/mesa/mesa).\n\nAn easy way to see whether everything is in order is to run the `vainfo`\nutility packaged with `libva-utils` or as a standalone package in some\ndistributions. `vainfo` will print the VA-API version, driver string, and a\nlist of supported profiles and endpoints, i.e.:\n\n```\nvainfo: VA-API version: 1.13 (libva 2.13.0)\nvainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.2.2 ()\nvainfo: Supported profile and entrypoints\n      VAProfileNone                   : VAEntrypointVideoProc\n      VAProfileNone                   : VAEntrypointStats\n      VAProfileMPEG2Simple            : VAEntrypointVLD\n      VAProfileMPEG2Simple            : VAEntrypointEncSlice\n      VAProfileMPEG2Main              : VAEntrypointVLD\n      VAProfileMPEG2Main              : VAEntrypointEncSlice\n      VAProfileH264Main               : VAEntrypointVLD\n      etc\n```\n\nFor decoding, the desired profile must be supported under `VAEntrypointVLD`.\nFor example, in order to decode VP8 media, this line must be present in the\noutput of `vainfo`:\n\n```\n      VAProfileVP8Version0_3          : VAEntrypointVLD\n```\n\nWhereas to decode H264 Main profile media, this line must be present:\n\n```\n      VAProfileH264Main               : VAEntrypointVLD\n```\n\nFor more information on VA-API and its usage within ChromeOS, see [this\nguide](https://chromium.googlesource.com/chromium/src/+/master/docs/gpu/vaapi.md).\n\ncros-libva can also be built in Android. Android.bp files are provided that\nshould work on AOSP \u003e= 15. Just check this repository into\nexternal/rust/crates/cros-libva and the libcros_libva library target will be\n available.\n\n## Using\n\nThe name of this crate is `cros-libva` to highlight the fact that it originates\nfrom ChromeOS and it not an official bindings. For ease of use, it is\nrecommended to rename it to just `libva` in your project by using the following\nline in your `Cargo.toml`:\n\n```\nlibva = { package = \"cros-libva\", version = \"0.0.1\" }\n```\n\n## Testing\n\nFor a brief introduction on how to use this crate, see the\n`libva_utils_mpeg2vldemo` test under `src/lib.rs`. You can also quickly test\nMPEG2 decoding by running it:\n\n```\ncargo test -- --ignored libva_utils_mpeg2vldemo\n```\n\n## Credits\n\nThe first version of this crate was written by Daniel Almeida and hosted in the\n[crosvm repository](https://chromium.googlesource.com/crosvm/crosvm/) before\nbeing split.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchromeos%2Fcros-libva","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchromeos%2Fcros-libva","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchromeos%2Fcros-libva/lists"}