Giter Club home page Giter Club logo

minih264's Introduction

minih264

Build Status

Small, but yet reasonably fast H264/SVC encoder single-header library with SSE/NEON optimizations. Decoder can be popped up in future.

Disclaimer: code highly experimental.

Comparison with x264

Rough comparision with x264 on an i7-6700K:

x264 -I 30 --profile baseline --preset veryfast --tune zerolatency -b 0 -r 1 --qp 33 --ipratio 1.0 --qcomp 1.0 -o x264.264 --fps 30 vectors/foreman.cif --input-res 352x288 --slices 1 --threads 1

vs

./h264enc_x86 vectors/foreman.cif

x264 minih264
source: ~4.6mb 409kb
binary: 1.2mb 100kb
time: 0,282s 0,503s
out size: 320kb 391kb

PSNR:

x264:     PSNR y:32.774824 u:38.874450 v:39.926132 average:34.084281 min:31.842667 max:36.630286
minih264: PSNR y:33.321686 u:38.858879 v:39.955914 average:34.574459 min:32.389171 max:37.174073

First intra frame screenshot (left-to-right: original 152064, minih264 5067, x264 5297 bytes):

Intra screenshot

You can compare results in motion using ffplay/mpv players on vectors/out_ref.264 and vectors/x264.264 .

Usage

TBD

SVC

Minih264 supports both spatial and temporal layers. Spatial layers are almost same as encode 2 independent AVC streams except for Intra frames prediction. Following diagram shows minih264 SVC scheme for two spatial layers:

SVC diargam

That's because P frames spatial prediction are almost useless in practice. But for Intra frames there is a ~20% benefit in full resolution frame size. Note that decoder must have both base layer I frame and full resolution SVC I frame to decode whole sequence of next P frames in full resolution.

Limitations

The following major features are not supported compared to x264:

  • Trellis quantization.
  • Select prediction mode using Sum of Absolute Transform Differences (SATD).
  • 4x4 motion compensation.

Interesting links

minih264's People

Contributors

lieff avatar oferze avatar

Watchers

 avatar  avatar

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.