Code Monkey home page Code Monkey logo

obuparse's Introduction

obuparse

A simple and portable single file AV1 OBU parser written in mostly C89 with a tiny bit of C99, with a permissive license.

Why?

I got tired of rewriting ad-hoc OBU parsers for various tasks suchs as ISOBMFF muxing, MSE codec string generation, level verification, etc. So I decided to write once, as correctly as possible, and to use it everywhere in place of probably subtly-broken ad-hoc parsers.

I could have ripped out an OBU parser from other projects, but they're all either very intertwined with their respective encoder/decoder, written in very unportable manners, or in non-FFI friendly languages. At the time of writing this, I am not aware of any permissively licensed (or otherwise) OBU parsers that actually work portably.

How?

Simply copy obuparse.c and obuparser.h into your project, or use this repository as a git submodule.

By default, the parser uses a checked bitreader, but you can define OBP_UNCHECKED_BITREADER to use the unchecked version if that really matters to you.

All API documentation lives in obuparse.h.

There is also a Makefile provided for building a simple shared library on Linux. It should be straightforward to build for other OSes; all public symbols are namespaced with obp_. All public enums and types are namespaced with OBP.

Features

This section will expand as more of the library becomes complete, and it moves out of being a work in progress.

  • No allocations; only works on user-provided buffers and the stack.
  • OBU header parsing.
  • Sequence Header OBU parsing.
  • Metadata OBU parsing.
  • Tile List OBU parsing.
  • Tile Group OBU parsing.
  • Frame Header OBU parsing.
  • Frame OBU parsing.

Tools

The tools directory contains a simple tool to parse and serialize OBUs from an IVF file into JSON, called dumpobu.

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.