Skip to content
lookbackPublic
forked from daily-co/libyuv-rs

About

Libyuv bindings for rust.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

63 Commits

Folders and files

Repository files navigation

libyuv-rs

Raw FFI bindings to libyuv libraries,This is an unsafe package.

Supported platforms

arch/os linux windows macos
arm64 ❌ ❌ ✅
amd64 ✅ ✅ ❌

Quick start

Add the following to your Cargo.toml:

[dependencies]
libyuv = "1"

Convert ARGB to NV12:

let argb = vec![0u8; 1280 * 720 * 4];
let mut nv12 = vec![0u8; 1280 * 720 * 1.5];

let ret = unsafe {
    libyuv::argb_to_nv12(
        argb.as_ptr(),
        1280 * 4,
        nv12.as_mut_ptr(),
        1280,
        nv12.as_mut_ptr().add(1280 * 720),
        1280,
        1280,
        720,
    )
};

assert_eq!(ret, 0);

License

MIT Copyright (c) 2022 Mr.Panda.

About

Libyuv bindings for rust.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages