lieff / minih264 Goto Github PK
View Code? Open in Web Editor NEWMinimalistic H264/SVC encoder single header library
License: Creative Commons Zero v1.0 Universal
Minimalistic H264/SVC encoder single header library
License: Creative Commons Zero v1.0 Universal
Hi,bro. Thx for your awesome work. Do you have plan to create a decoder which is headed only. And can you recommend another single decoder lib which can decode your minih264. Thx :D.
Hello, I want to run minih264 on a Mac system. Does it support cross-platform use?
Hi! This is a very impressive project, kudos for pulling it off. :-)
Since the only example given uses CIF input with all of the restrictions that implies (352x288 resolution, 30000/1001 framerate, YCbCr color representation, etc.), I'm wondering to what extent those restrictions are currently hard coded into the encoder. I'd love to use minih264 in a project I'm writing as a backup option for cases when ffmpeg is not available, but that requires dealing with arbitrary resolution frames of RGBA images (which I can, of course, transform on the fly, but the resolution part isn't flexible). Is that something that would be doable with reasonable effort, or am I pushing too far beyond the scope of your intentions for this project?
No comments.
// Number of SVC layers: // 1 = AVC // 2 = SVC with 2-layers of spatial scalability int num_layers;
if I want to encode 3 temporal layers, 1 spatial layer, what should I do?
Hey Lieff, thanks for this library and minimp4
, I'm compiling them to WASM for the web here using Emscripten and it's working well.
Something that came up is a filesize concern. I did a quick test with 30 1920x1080 frames of Big Buck Bunny and the resulting MP4 is 11MB (gop=20, speed=0, qp_min=10, qp_max=10). But, using that output MP4, running default ffmpeg -i vid.mp4 vid2.mp4
produces a 181KB file. Is there something I might be doing wrong in minih264 that would produce such high file sizes compared to ffmpeg's default encoders?
Currently intrinsics ~15% slower.
I dont't know how to compile this file,tell me the steps please.
./asm/minih264e_asm.h:33:59: error: unknown type name 'pix_t'
H264E_API(int, h264e_transform_sub_quant_dequant, (const pix_t *inp, const pix_t *pred, int inp_stride, int mode, quant_t *q, const uint16_t *qdat))
incompatible type 'uint8x8_t'
In file included from ./encoder.go:3:
In file included from ./encoder.h:7:
./minih264e.h:5604:62: error: call to undeclared function 'vtbl2q_u8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
vst1_s16(q->qv + 0, d4 = vreinterpret_s16_u8(vtbl2q_u8(vlut, vget_low_u8(q8))));
^
./minih264e.h:5604:62: error: passing 'int' to parameter of incompatible type 'uint8x8_t' (vector of 8 'uint8_t' values)
vst1_s16(q->qv + 0, d4 = vreinterpret_s16_u8(vtbl2q_u8(vlut, vget_low_u8(q8))));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/arm_neon.h:27007:20: note: expanded from macro 'vst1_s16'
int16x4_t __s1 = __p1; \
^~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/arm_neon.h:59122:46: note: passing argument to parameter '__p0' here
__ai int16x4_t vreinterpret_s16_u8(uint8x8_t __p0) {
^
In file included from ./encoder.go:3:
In file included from ./encoder.h:7:
./minih264e.h:5605:62: error: call to undeclared function 'vtbl2q_u8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
vst1_s16(q->qv + 4, d5 = vreinterpret_s16_u8(vtbl2q_u8(vlut, vget_high_u8(q8))));
^
./minih264e.h:5605:62: error: passing 'int' to parameter of incompatible type 'uint8x8_t' (vector of 8 'uint8_t' values)
vst1_s16(q->qv + 4, d5 = vreinterpret_s16_u8(vtbl2q_u8(vlut, vget_high_u8(q8))));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/arm_neon.h:27007:20: note: expanded from macro 'vst1_s16'
int16x4_t __s1 = __p1; \
^~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/arm_neon.h:59122:46: note: passing argument to parameter '__p0' here
__ai int16x4_t vreinterpret_s16_u8(uint8x8_t __p0) {
^
In file included from ./encoder.go:3:
In file included from ./encoder.h:7:
./minih264e.h:5606:62: error: call to undeclared function 'vtbl2q_u8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
vst1_s16(q->qv + 8, d6 = vreinterpret_s16_u8(vtbl2q_u8(vlut, vget_low_u8(q9))));
^
./minih264e.h:5606:62: error: passing 'int' to parameter of incompatible type 'uint8x8_t' (vector of 8 'uint8_t' values)
vst1_s16(q->qv + 8, d6 = vreinterpret_s16_u8(vtbl2q_u8(vlut, vget_low_u8(q9))));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/arm_neon.h:27007:20: note: expanded from macro 'vst1_s16'
int16x4_t __s1 = __p1; \
^~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/arm_neon.h:59122:46: note: passing argument to parameter '__p0' here
__ai int16x4_t vreinterpret_s16_u8(uint8x8_t __p0) {
^
In file included from ./encoder.go:3:
In file included from ./encoder.h:7:
./minih264e.h:5607:62: error: call to undeclared function 'vtbl2q_u8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
vst1_s16(q->qv +12, d7 = vreinterpret_s16_u8(vtbl2q_u8(vlut, vget_high_u8(q9))));
^
./minih264e.h:5607:62: error: passing 'int' to parameter of incompatible type 'uint8x8_t' (vector of 8 'uint8_t' values)
vst1_s16(q->qv +12, d7 = vreinterpret_s16_u8(vtbl2q_u8(vlut, vget_high_u8(q9))));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/arm_neon.h:27007:20: note: expanded from macro 'vst1_s16'
int16x4_t __s1 = __p1; \
^~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/arm_neon.h:59122:46: note: passing argument to parameter '__p0' here
__ai int16x4_t vreinterpret_s16_u8(uint8x8_t __p0) {
I couldn't find any info about the state of multithreading in this library. Can you please explain more?
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.