Kostya's Boring Codec World

https://codecs.multimedia.cx

31 posts

Tech 68% · Culture 19% · Life 10% · Gaming 3%

Subscribe via RSS

  1. na_game_tool 0.6.0, AVI edition

    What should follow a political rant that nobody would read? A release of a tool that nobody would use of course! I’m indifferent to announce the release of na_game_tool version 0.6.0, now with AVI support. Beside being able to write output to AVI it can now also de-obfuscate some AVI files that employ some simple scheme (like XORing with a 32-bit counter). And in addition to that it can also reconstruct Smacker and audio files from AVIs (or IAVFs) used in Black Dahlia and Ripper games. The rest…

    0
  2. Pride and downsides

    Late (and still great) Sir Pterry was a writer who wrote great footnotes as well as the books to contain them (name any other author who put a footnote even into the book title!). And while Thief of Time probably was not written for this particular footnote, it would’ve not been half as good without it: Every society needs a cry like that, but only in a very few do they come out with the complete, unvarnished version, which is…

    0
  3. Yet another FLI flavour

    There’s an Argentinian game called La Mágica Aventura del Cine or (The Magical Movie Adventure in English language release) which has animations in ordinary and custom FLI format. The files are hidden inside large resource files along with .voc and other types with no obvious index (probably it is stored in accompanying .lod file which was not useful even after I uncompressed it). Anyway, custom FLIs have marker 0xAF66 with chunk types 110 (contiguous VGA palette) and 100 (LZ77-compressed…

    0
  4. Knowledge Adventure movie v2/v3 done

    I’ve finally finished adding Knowledge Adventure movie v2/v3 support to na_game_tool—just a couple of formats more and I can make a release. Meanwhile I want to talk about what I discovered. First of all, the original format still looks too hard to implement, mostly because of its incomprehensible binary specification. With all known samples employing arithmetic coding if you get one thing wrong you won’t get any thing right. Let’s jump to version 3. As it turned out, it is not a movie file per…

    0
  5. SBV, an unusual game codec

    While I’m still preparing next na_game_tool release (still a couple of codecs to RE and implement!), I’ve finally encountered a very rare beast—wavelet game video codec! Gunmetal features SBV format with the minimum header (frame table contains just timestamps and start offsets) but each of those frames is coded using fast wavelet coding algorithm. First level is transmitted as byte values, the other levels are coded in 4×4 or 8×8 blocks, one level after another, using fixed-bits non-zero…

    0
  6. Again on Knowledge Adventure MOV

    While I have time I’m preparing the next release of na_game_tool, which involves REing formats (of course!). And among the formats I want to add is Knowledge Adventure MOV. So I’ve revisited it and RE’d one of the flavours. Apparently there are three versions of that MOV: the original format used in DOS games (with magic KAMv), version 2 (starting with LzH2) and version 3 (starting with LzH3) which seem to be used in both DOS games and some Internet applications (and I’ve used Mac binary for…

    0
  7. Looking for a job (again)

    Pre script: I’ll try to keep this post above the rest for obvious reasons and you should find newer posts about the usual stuff below. For circumstances out of our control I don’t have a job any more (after sixteen years of it) and I’m completely free starting from February next year. And while I can live more or less comfortably for a couple of years on my savings I consider proper to have a job, preferably an interesting one. Since it is hard to find an interesting job for my qualification, I…

    0
  8. A bit about Pälzisch Dialekt

    I semi-jokingly say that that Alsace deserves to be called Südpfalz since the cultural border there is not clear unlike the country borders. And I mentioned back in the day that a lot of places in central Rheinland-Pfalz (or Rheinland-Palatinate if you don’t recognise its proper name) sound even more French than those close to the border (no matter from which side—e.g. both have river Lauter and a town named after it, be it Lauterbourg or Lauterecken; and Hœrdt is on comparable distance from…

    0
  9. Micro Wavelet: done

    So I’ve finally implemented NeXT Micro Wavelet decoder (and updated git bundles on the site while at it) and the codec turned out to be even more interesting than on the first glance. The codec itself consists of three distinct phases: using delta prediction along with wavelet transform, packing results into 16-bit opcodes, and further packing the opcodes with Huffman or LZSS compression. There’s also a raw mode which simply transmits 8-bit deltas so it’s not particularly interesting. First…

    0
  10. Another weird format

    Just couple of years ago I had a small rant about German RLE-based codecs named *PEG. Recently I’ve discovered yet another pointless format called NPEG. Unlike the rest it’s Polish, targets Amiga instead of DOS and it’s essentially MPEG-1 frames stored in IFF. Considering that it appeared around 1998, NP1 is the original MP4 format (if you ignore MPEG-1 in MOV of course). Currently I have no desire to implement support of it but maybe one day I’ll really have nothing better to do and add MPEG-1…

    0
  11. OMGperformance

    I use my own player for playing videos. It’s not very optimised (video frame decoded with VA-API gets downloaded to my own frame structure in main RAM, which gets uploaded to SDL texture and only then displayed—the proper way is to allocate EGL texture once and use it both for VA-API decoding and displaying; or maybe the same but Vulkan and semaphores all the way) but apparently playing back 25fps video even in that way takes less CPU than updating one line with play time in gnome-console at…

    0
  12. A bit about next micro codec

    Some time ago I mentioned that I’d stumbled upon a QuickTime sample encoded on NeXT using MicroWavelet codec which was used only there. I also expressed a regret of it being completely lost to time. And what do you know, it’s yet another situation where I’d be glad to be proven wrong—and I was (and I am). Apparently had I looked around for a bit longer, I would’ve discovered more samples and a decoder to boot. Apparently that decoder was a part of NeXTTime and not QuickTime, which is a…

    0
  13. TWV: unsupported formats

    While the weather is stewing here and there’s no desire to do anything, I suppose this is a good occasion to talk about two formats with the same extension that I’m not going to support. The first TWV format comes from Reality Pump games like Knightshift and World War III: Black Gold. It is not a particularly complex codec but the fact that it’s simplified version of interlaced MPEG-2 or MPEG-4 with an additional layer of headerless deflate compression makes me not want to work on it at all.…

    0
  14. A new/old video coding scheme

    Now that AV2 has officially been released it’s time to remind that these codec advances are not for free. Here it is claimed that AV2 offers about 25% improvements in compression efficiency compared to AV1 with decoding being five times slower (and that’s for an extremely optimised decoder; no idea how much slower encoding is). Back in the day I proposed to go full AI with the codec design but it was not a fully serious idea, here I’d like to propose something more realistic that would use “AI”…

    0
  15. #chemicalexperiments — Saumagen

    I think it’s time to talk about the würst aspect of German life. It is a stereotype that Germans love sausages, and it seems this stereotype has some background after all. What’s more, as I learned from one fountain in Kandel, the nearby area of Rhineland Palatinate was known as the Cattle Belt—and you can guess what they made out of that cattle. One of those specialities is called Saumagen or “pig’s stomach”, a sausage made by filling the namesake with meat, diced potatoes, spices and boiling…

    0
  16. MOVing Puzzles

    Mostly because of the weather I have not been in mood to work on anything serious for weeks, but here is something rather interesting. Apparently there are some CD-ROMs represented on discmaster titled “Moving Puzzle: …” that have some .mv files (inside media.pak archive) that supposedly give motion to those puzzles. And of course somebody had to look at the format. Obviously the format was inspired by QuickTime as it has the header with all those chunks defining per-track data including e.g.…

    0
  17. AI-coholism

    With this matter, I hope I actually shan’t have more to write about. But this thought needed to be written out (only if to unload it from my head). For some reason the current state of affairs around “AI” reminds me a lot of alcohol. Mind you, it’s a useful substance (as a solvent or a disinfectant), some people may even use it in recreational purposes or to deal with stress—but there are always some people abusing it, often for no good reason, and giving bad name to it all. Also there were…

    0
  18. We have FLI at home

    Recently I’ve released na_eofdec, a tool for decoding exotic and/or obscure formats. That release included F16 format support, but recently I’ve REd another one (PC Animate Plus / 3D WorkShop animation) and there’s yet another one waiting in the queue (Reflections animation). What unites them all is that they all employ simple compression scheme and (beside F16) they all have a 3D modelling program associated with them. And I’ve REd these formats by investigating the file format, they’re that…

    0
  19. FFhistory: first slop

    While I observe the world with its “AI” evangelists suspiciously reminding of annoying religious missionaries (yes, I’m pretty sure I’ve heard the news from that newer part of widely circulated book that’s just under two millennia old, thank you very much) and the feats of token-wasting (name changed from “vibe-coding” to keep up with the times) like two FFmpeg rewrite attempts in Rust—probably just to spite the Nigel (name changed to protect the guilty) formerly responsible for FFaccount,…

    0
  20. na_eofdec initial release

    Since I got lucky during weekend with some formats, I got enough of them to release na_eofdec. This is a tool similar to na_game_tool but oriented at generic exotic and obscure formats (or Amiga ones, put them into whatever category you like). So if you’re familiar with that one (why?!) you should have no troubles with the new one either (or at least it should be the same troubles). The motivation behind it is about the same as with the other tool: decode whatever formats I find interesting…

    0
  21. NihAV: QT support enhancements

    When I have enough inspiration, I improve NihAV. When I don’t (which is more common state to me), I RE codecs or write blog posts—so here’s one. First of all, I’ve started adding non-raw encoders for some common QT formats. It’s not that there are no open-source encoders for them, but I do them mostly to find out how it is done and maybe learn something new in the process. For instance, RLE encoding combines skips, runs and pixel copies; this rises the question of optimal encoding as sometimes…

    0
  22. Quickly about AC2

    I’ve finally had a look at this codec and it’s not particularly remarkable (and I did it mostly because it beats documenting minute details of MVS). Anyway, there’s nothing much interesting about it. Like its successor, it employs parametric bit allocation to read bits from the input block. The main difference is that there are only two channels allowed and there’s single block per channel too. More curious thing is there are two revisions of this codec, with revision A having simpler bit…

    0
  23. NihAV: palettisation

    While I’ve added palettisation support for NihAV about six years ago, it was limited to per-frame palette generation back then. Since I had only two encoders supporting paletted input and both were accepting palette changes, it worked fine. It’s only when I decided to implement MOV muxer I really got a need for palettisation using global palette, so I’ve started experimenting with that. First and foremost, design. While frame palettisation is a part of NAScale that handles video frame…

    0
  24. Quickly about Factor 5 VID 1

    Yes, calculating that results in VID5 but in reality it’s MPEG-4 part 2 (minus some parts). Paul has asked me to look at it some time ago, so I did (which is much better than implementing a decoder for it). As I said already, this is essentially MPEG-4 part 2 with some insane parts being cut off (but not enough to turn it back into ITU H.263): there’s no support for special texture shapes, interlacing or even quarterpel motion compensation. There are still B- and S-frames to complicate things…

    0
  25. Cinepak’s long-lost brother?

    While discmaster is stagnating (you know whom to thank for the shortages of HDDs as well as RAM), I still look through stuff there in hopes to find something interesting. Occasionally I manage to stumble upon something special indeed. This time it was navigable movies bundled with QuickTime 1.5 or so. Apparently the idea behind them is that all frames are actually tiles of a much larger picture that user can navigate without exhausting all RAM trying to decode it as one contiguous image. If you…

    0
  26. NihAV: OS/2 multimedia support

    In theory I should be documenting the codes Paul has shared with me or MVS (did you know that it employs a rather interesting chroma subsampling method—coding three 8×8 blocks in a macroblock but chroma samples have less than a half of coefficients in zigzag order coded) but instead I’ll write about something nobody really […]

    0
  27. Hollywood and “AI”

    “AI” as itself does not interest (or bother) me much, so I find it more interesting to look how this phenomenon interacts with the world around. Here’s one rather unexpected parallel. I’m not trying to claim that current “AI” fills exactly the same niche or follow exactly the same history, but I find the coincidences […]

    0
  28. On fruity MVS codec

    I could be writing about RedHat video encoder I just finished or work on REing DiVID1x on Paul’s request, but this was earlier in my queue. Apparently on iVNC protocol there’s an option to use a custom iCodec for that. Since I was asked to look at it, here are my preliminary findings (more detailed […]

    0
  29. The age of stupid greed?

    Of course neither stupidity nor greed (nor a combination of both) has been scarce at any point of human history, but in these days it feels like the main driving force behind various decisions at all possible scales, from individuals to the countries. Naturally, despite having the common mechanics (some entity pursuing short-term gains while […]

    0
  30. (Ir)regular NihAV news

    Here’s another portion of news about what I’ve been doing in last couple of weeks. Hopefully I’ll be able to write about fruity MVS soon. While most of what I did is not worth mentioning, there are some bits I find funny or curious enough to share. First of all, I’ve added VAXL and (Clari)SSA […]

    0