Can JS Algorithm object finally solve html5 codecs gridlock and move us forward?

neuralll neuralll at
Fri Jan 18 13:51:21 PST 2013

Hi guys
I am playing with web audio api and mozilla audio api but I got frustrated about so much html5 potential wasted due to infinite codecs deadlock support in browsers holding progress back for so long.
This even resulted to people writing codecs purely in JS. 
Unfortunately performance is obviously slow and limiting to browsers allowing raw data from js
And slow mainly because of huffman and imdct.
But looking at block diagrams of pretty much any widespread codec like theora ogg mpg aac mp4
it striked me.

Since they pretty much share the same building blocs. and which themself are not that much patent encumbered.

So why not just introduce new  Algorithm object in JS 
and just register huffman idct imdct filterbank in it. for browsers its easy task they just make visible already heavily hw optimized pretty much 4 or so functions that are already in them

And then suddenly you can have theora ogg flac acc or pretty much any media decoded in js in all browsers but with speeds approaching those on native hw. just look at incredible work of talented guys at and their js codecs even for flac

Another advantage of hw accelerated thing like huffman in js is that it sits in pretty much every block of data around us.
compressed files  like gz bz2 cab jar zip rar 7z images pdf jpg png tiff and pretty much any music or movie format.

This can create interesting new  usage possibilities for JS and heavily complement new things like web-sockets faster transport or webgl custom textures / compressed meshes or fileapi custom format decoders / renderers in js
So even thou its just 4 functions (that are already implemented just need to be registered in JS) and the impact on html5 and web future landscape can be interesting. All that is needed is agreement on content of such Algorithm object
it can surely promote current or even new open unencumbered codecs in all browsers. I bet small but powerful teams like opera guys will be more than happy and way better than risking another gif like threat from current patent submarine formats.

So what you guys think about such new Algorithm object and registration of those existing 4 funcs in new JS Ecmascript6 ?

Ladislav Nevery

Sent from my iPad

More information about the es-discuss mailing list