Coder Social home page Coder Social logo

crav1e's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

crav1e's Issues

Possibility: Add function for getting the Sequence Header OBU

Not 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

Include path in the pkg-config file

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

Review of C API header circa 26-12-2018

Commit f699aa4

rendered
review

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.?

Background

[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 ^^

pkg-config file generation

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
  • Extract Version, URL from Cargo.toml
  • Take prefix and libdir as options (default to /usr/local and ${prefix}/lib)
  • Populate Libs.private using parsing cargo rustc --release -- --crate-type=staticlib --print native-static-libs

Make sure cargo sets the soname in the cdylib

There is an open issue about it. And my minimalist solution landed.

  • Have cargo provide a sane way to pass the linker line needed
  • Write the linker line for Linux
  • Write the linker line for MacOS
  • Write the linker line for Windows
    • -gnu variant
    • -msvc variant

I'd ask @dwbuiten to help on the Window part :)

Install target

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.

  • Generate a .pc file
  • Have the build target call cargo
  • Install rav1e.h, rav1e.pc and librav1e in the correct paths
    • Support DESTDIR, prefix, libdir, incdir

Improve the examples

  • Add more comments on the current example
  • Make an example of a intermixed receive-send loop similar to what is being used by the rav1e cli right now.

rav1e.h has unneeded includes

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?

Error handling

API surface :

  • Errors as enums
  • Errors as strings

Open questions

  • Capture panics in unwind mode?

build failure

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.