4 ms·
So, it looks like this tries to build a model (or rather, multiple layers of models combined with something called context mixing[0]), potentially analyzing the
by tux3 11d ago
So, it looks like this tries to build a model (or rather, multiple layers of models combined with something called context mixing[0]), potentially analyzing the whole file first? Is it fair to call this a very fancy entropy coder, replacing the last phase of what a traditional audio codec does (the lossless part, after quantization)?
I like the code style, this is pretty nice C. It's refreshing to see human code.
[0]: https://en.wikipedia.org/wiki/Context_mixing https://en.wikipedia.org/wiki/Context_mixing
- RicoElectrico 10d ago> I like the code style, this is pretty nice C. Or is it? https://github.com/iczelia/balrogg/blob/7008bdc10ff25ad871052011ef4654473c9adb47/src/cm.c#L92 https://github.com/iczelia/balrogg/blob/7008bdc10ff25ad87105...
- tux3 10d agoI admit I'm not a fan of the loop macros, or writing constants like 0xd80000 in decimal, or having all of that code inlined with no further explanation or git history. But I think it's just that this file is lifting parts of the logic from PAQ8 (the inlined num_states/next_state named in a comment sure look exactly like PAQ functions translated into C, which, kudos to PAQ for having extensive comments in their code by the way). I'm a bit disappointed that PAQ isn't mentioned in the README, and only very obliquely in the code, if that's where those functions come from. PAQ is GPLv3, at least a mention could have been nice (assuming I'm not wrong about the source of that logic).
- palaiologos 10d agoI use the PAQ terminology as it is likely to be familiar to other compression experts. However, the lineage to PAQ is very, very limited, and many other compressors also re-use its common ideas.
- tux3 10d agoI see, my bad. I tried to follow the comment and jumped to conclusions, sorry about that.
- genxy 10d agoThis code looks like Fortran55