Skip to content

Instantly share code, notes, and snippets.

Luca Barbato lu-zero

Block or report user

Report or block lu-zero

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:ec713b9579bdf6a80a648efcf0fdab08
diff --git a/src/frame/plane.rs b/src/frame/plane.rs
index 71555c42..30f0c020 100644
--- a/src/frame/plane.rs
+++ b/src/frame/plane.rs
@@ -665,6 +665,39 @@ pub mod test {
assert_eq!(&input[..64], &plane.data[..64]);
}
+ #[test]
+ fn mutable_access() {
View using-rav1e.md

title: Using rav1e - from your own code published: true description: rav1e is an AV1 encoder written in Rust tags: rust, rav1e, AV1

View lewton.pc
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: lewton
Description: Pure Rust vorbis decoder
Version: 0.9.4
Libs: -L${libdir} -llewton
Cflags: -I${includedir}/lewton
View lewton.h
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
/**
* Main Decoder State
* It is created by `lewton_context_from_extradata` by passing a xiph-laced extradate bundle
*/
typedef struct LewtonContext LewtonContext;
View lewton.h
#include <cstdarg>
#include <cstdint>
#include <cstdlib>
#include <new>
View gist:d26437e167d80cf44044b6f43ad53388
total 0
drwxr-xr-x 3 lu_zero wheel 96 23 Jun 12:51 .
drwxrwxrwt 29 root wheel 928 23 Jun 12:51 ..
drwxr-xr-x 3 lu_zero wheel 96 23 Jun 12:51 usr
/tmp/lewton-install//usr:
total 0
drwxr-xr-x 3 lu_zero wheel 96 23 Jun 12:51 .
drwxr-xr-x 3 lu_zero wheel 96 23 Jun 12:51 ..
drwxr-xr-x 4 lu_zero wheel 128 23 Jun 12:51 local
View rav1e.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View nasm missing
diff --git a/Cargo.toml b/Cargo.toml
index 50d5321..c527d31 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,6 +18,7 @@ num-derive = "0.2"
[dependencies.rav1e]
git = "https://github.com/xiph/rav1e"
default-features = false
+features = ["nasm"]
View gist:83238259a45e9d96bc2184a95afeda0c
Process 60490 stopped
* thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0x118000160)
frame #0: 0x00000001000e9b62 rav1e`_$LT$core..iter..adapters..chain..Chain$LT$A$C$B$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$::fold::hffc8c2d5f58aa75e [inlined] rav1e::encoder::FrameState$LT$T$GT$::compute_activity_mask::_$u7b$$u7b$closure$u7d$$u7d$::hbe5264fd4fdf3ac6((null)=<unavailable>, (null)=&0x118000160) at encoder.rs:404:62 [opt]
401
402 let block = luma.subregion(block_rect);
403
-> 404 let mut mean: i32 = block.rows_iter().flatten().map(|&val| {let int: i32 = CastFromPrimitive::cast_from(val); int}).sum();
405 mean = mean >> (xdec + ydec);
406 let deviation: Vec<i16> = block.rows_iter().flatten().map(|&pix| {let pix_int: i16 = CastFromPrimitive::cast_from(pix); pix_int - mean as i16}).collect();
407
View x86_64-dav1d.md
fn avx2 sse2 sse4 ssse3
avg_w4_8bpc 6.65 0.00 0.00 5.98
avg_w4_16bpc 0.00 0.00 0.00 0.00
avg_w8_8bpc 6.69 0.00 0.00 9.12
avg_w8_16bpc 0.00 0.00 0.00 0.00
avg_w16_8bpc 6.69 0.00 0.00 11.30
avg_w16_16bpc 0.00 0.00 0.00 0.00
avg_w32_8bpc 7.36 0.00 0.00 12.83
avg_w32_16bpc 0.00 0.00 0.00 0.00
You can’t perform that action at this time.