lu-zero / crav1e Goto Github PK
View Code? Open in Web Editor NEWC-bindings for rav1e
License: BSD 2-Clause "Simplified" License
C-bindings for rav1e
License: BSD 2-Clause "Simplified" License
prefix=@prefix@
libdir=@libdir@
includedir=${prefix}/include
Name: rav1e
Description: AV1 encoder - C API
Version: @VERSION@
Requires:
URL: @URL@
Libs: -L${libdir} -lrav1e
Libs.private: @PRIVATE_LIBS@
Cflags: -I${includedir}/rav1e
Version
, URL
from Cargo.tomlprefix
and libdir
as options (default to /usr/local
and ${prefix}/lib
)Libs.private using
parsing cargo rustc --release -- --crate-type=staticlib --print native-static-libs
Am I doing something wrong? Thanks.
▶ cargo build
Updating crates.io index
Updating git repository `https://github.com/xiph/rav1e`
error: failed to select a version for `rav1e`.
... required by package `crav1e v0.1.0 (/Users/kswanson/Projects/crav1e)`
versions that meet the requirements `*` are: 0.1.0
the package `crav1e` depends on `rav1e`, with features: `nasm` but `rav1e` does not have these features.
Somewhere in the last two days builds started to fail. See https://travis-ci.org/lu-zero/crav1e/builds
Once xiph/rav1e#1097 is implemented, it should be pretty straightforward to add.
It right now by default looks like
incdir=/usr/local/include/rav1e
I think it would be better if it was /usr/local/include, and have the library users include <rav1e/rav1e.h> instead in their project files. That way CFLAGS will not be bloated with extra unnecessary -I entries
Frame
wrapper use an enumContext::ctx
do the sameNot sure if this belongs here on the rav1e repo (will move depending on where it should be).
[20:40] < jamrial> so rav1e_container_sequence_header() returns the first four bytes defined in that configuration box, but not the actual seq header obu? O_o
[20:40] < Daemon404> yeah
[20:40] < Daemon404> spec says 'zero or more'
[20:40] < Daemon404> i can fix it probably but that's what it does right now
[20:41] < jamrial> it would ideally include it, yeah. but also, it would be nice to have a function that simply returns the seq header alone
[20:45] < Daemon404> for what use case?
[20:48] < jamrial> right now, extradata within avcodec/avformat is raw obus only. those four bytes are generated by a muxer if required (mov, mkv/webm)
[20:48] < jamrial> but i guess it would be a matter of propagating the seq header without the first four bytes, so no need for a second function
[20:49] < Daemon404> hmm OK
[20:50] < Daemon404> i'll open an issue and see what people think
[20:50] < jamrial> just making that function return a seq header as part of the config OBUs would be enough to remove the extract_extradata bsf from the wrapper
[20:51] < Daemon404> OK
There are a number of possible solutions, one requires rust-lang/cargo#2729 to be addressed, the other is to leverage meson or just write a simple Makefile
.
.pc
filecargo
rav1e.h
, rav1e.pc
and librav1e
in the correct paths
DESTDIR
, prefix
, libdir
, incdir
receive-send
loop similar to what is being used by the rav1e
cli right now.There is an open issue about it. And my minimalist solution landed.
-gnu
variant-msvc
variantI'd ask @dwbuiten to help on the Window part :)
here an example of the problem.
API surface :
Open questions
The following headers are included in rav1e.h
, but not used:
stdarg.h
stdbool.h
Not sure if this is some weird artifact of cbindgen?
Commit f699aa4
line 43: No alt-ref / invisible? Or "multiple" if bundled? Does it matter? I'm not sure.
line 85: Mention allocation maybe? Does instatiation imply allocation? I'm legitimately not sure.
line 88/98/etc: Are configs and contexts reference counted? It's really weird to "unref" a config or context to me... Don't you just free it? If they /are/ reference counted... to what end?
line 132: I assume this is a number that is set by the user and propagated through to RaFrame as
line 141: I know it's mentioned in the documentation for RaConfig, but it should probably have some comment.
line 156: Typo? Also shouldn't it be 0 == success, < 0 == fail?
line 160: comment needed
line 198: Typo, also mention "in bytes"?
line 210: What does this mean? I don't know what producing a frame from the encoding contexts means, or why it has to be "from the encoding context" instead of just allocated. Is it because it needs the state from the context to determine subsampling, etc.?
[16:58] < Daemon404> https://gist.github.com/dwbuiten/2ff46490675c728f1b0932e7d40fb5df
[16:58] < Daemon404> ^ lu_zero
[16:58] < Daemon404> once-over
[16:58] < Daemon404> mostly comment related
[16:58] < Daemon404> no comments yet on what needs to be added, from me
[17:03] < lu_zero> could you link it to an issue please ? I'll format it later ^^
How can I create a static librav1e.a
on macOS?
Reported a feature request upstream: rust-lang/cargo#6418
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.