Archive for July, 2025

Random NihAV news

Thursday, July 24th, 2025

Since I have not tweaked any weights and have not made any releases, I’ll just write about some stuff I’ve been working on but have not released yet. Meanwhile librempeg got support for a bunch new formats too so its changelog may be a more interesting read. Anyway, this post is about what I have (and haven’t) done.

First of all, I’ve finally fixed an annoying problem with VA-API decoding on one of my laptops. Counterintuitively, it turned out to be faster to request hardware to convert native surface into some other format (NV12 into YUV420) and then use it instead. This made decoder CPU usage drop under 10% at last. Probably it can be optimised further to reduce load on graphics subsystem but I’d rather not mess with OpenGL unless it’s really really really needed.

Then I expended support for two formats in na_game_tool. VDX (used in The 7th Guest) had a different format version for the game demo. It still employs two-colour VQ but data for intra frames is split into separate parts for masks and colours, and inter frames code updates to masks and/or colours for each block instead of independent decoding. Additionally thanks to Discmaster I’ve located DPEG version 2 which employs completely different algorithm from the version 3 (painting 4×4/2×2/1×1 squares for intra and skip/update for inter).

I’ve also discovered some new interesting formats like Lantern MOV (which codes DIB changes using 16-bit RLE and there’s a probably related older version in IFF instead of RIFF). I’m considering making a sister project to na_game_tool to decode various formats like this one, formats coming from Amiga, recording formats and such—for all the formats that I’d like to try decoding but don’t want in main NihAV. I’ll write about it when I actually have something to write about (i.e. when I have a name and enough formats for 0.1.0 release). Another curious find was fractal video codec—not the ClearVideo but something with fourcc FVF1 from Images Incorporated. Who knows, it may be interesting to RE.

And finally here’s what I really wasted too much time on: Motion Pixels decoders. It has rather annoying binary specification (like using segment registers to address decoder context variables) that decompilers refuse to translate and from I heard it’s impossible to run on anything newer than Windows 95 or NT4. Nevertheless the formats pose some interest.

From what I saw long time ago, MVI2 is MVI1 with certain extensions, and MVI1 is surprisingly close in the structure to MVI in its own format files—and Gregory Montoir has reverse engineered it long time ago.

So I started by reimplementing that MVI decoder (since I can debug its behaviour against known working implementation) while trying to understand what it does. I got it more or less working (reconstruction is still not perfect but at least it’s recognizable) and my decoder supports other files (found with Discmaster of course) that trigger demuxer bugs or have different subsampling modes.

Then I moved to implementing MVI1 decoder applying the differences found in the binary specification. While it still does not handle decoding properly (both the pictures are garbled and I don’t use all deltas stored in the frame), at least it proves I’m on the right way. Hopefully it’ll decode properly soon and then I can add MVI2 features. Of course it’s a useless format nobody cares about, but apparently I do.

Strata, or yet another reason for not living in the USA

Tuesday, July 8th, 2025

Disclaimer: this post is not about politics at all, but rather about my personal reason.

Here’s the story that finally made me realise why USA is not for me (beside many other reasons that have something to do with my tastes. And don’t label them as sour grapes—I got some job offers from there back in the day yet I rejected them in favour of Europe).

I like to spend week-ends and holidays travelling around. Before 2020 I liked to travel somewhere far and travel around that distant point, now I can take only local travels (for health considerations). Last Sunday I decided to visit Seligenstadt but thanks to Deutsche Bahn I missed the connection and had to wait for almost an hour at Hanau. Since I had nothing better to do, I decided to take a walk there and was shocked.

The town turned out to be not merely Grimm (being the birthplace of the famous brothers) but also grim and soulless. Essentially all it had to offer in historical buildings was its town hall and a church (maybe I could discover more but probably not in the town centre and definitely not in the time I had). You don’t need to read any documents to guess that Hanau was heavily bombed during WWII and nobody bothered to reconstruct it (it’s much more important to have a bank and an airport after all).

And then I saw Seligenstadt, which is a complete opposite, with a preserved historic centre next to the more than millennium-old monastery. That’s what made me realise that I can’t live in a space without history comfortably. And USA is exactly a country that is rather poor in that aspect (compared even to Mexico). For comparison I consider my home city rather young—and yet it had been founded before New England royal colonies were chartered let alone USA as a country appeared on the maps. That is why I subconsciously liked Europe; probably other things I like about Europe (like food) also have roots in its rich historical soil. Similarly probably a lot of things I dislike about USA also come from its lack of historical soil (again, like food).

Of course other people don’t care about such things, which means less competition for them from my side and vice versa.

P.S. In case it was not obvious, this post name comes from the early Pratchett’s novel Strata, where one of the ideas was that newly terraformed worlds also included specially-crafted fossils in different geological strata—because humanity does not feel right living on a planet without history. It turned out to be true at least for me.

News and foam

Friday, July 4th, 2025

…the knowledge of certain principles easily compensates the lack of knowledge of certain facts.

Claude Adrien Helvétius, De l’esprit (1758)

Today I want to rant about a different aspect of the world. There is a constant stream of what is called news every minute, but if you take a closer look at it most of those pieces of news are not worthy of any attention. That is why I distinguish news—pieces of information about events that affected something—and foam—derivative pieces that bring no useful information, taking more volume than the original news and quite often used to obscure the original source. If you have a suspicion that it applies to other produced content (like “X reacts to Y” videos) then you may be right.

Anyway, suppose there is some planned event X. Usually the reports related to it will go like this:

  1. X is going to happen!
  2. random unrelated person comments on X;
  3. famous self-proclaimed expert estimates impact of X;
  4. X is scheduled to happen in next couple of days;
  5. X happens;
  6. the administration comments upon X success/failure/whatever;
  7. random unrelated person comments on X;
  8. random tangentially related person comments on X;
  9. aftermath of X.

It should be obvious that #5 is the real piece of news, with #1 and #4 having some importance (and #9—but only in the case when that event had unforeseen consequences). The rest is just a filler for news feed (those ad views won’t generate themselves, you know). This may be done to keep interest to the topic itself, but then it’s propaganda and not really news.

The statement from the epigraph can be applied to the news as well: if you know how it normally goes you don’t need to follow the news. Here’s a typical example for news I care about: russia commits umpteenth war crime (the fact by itself is no news, it’s circumstances that make it news); Ukrainian president / minister of foreign affairs / other official condemns it (that’s what they always do so it’s no news); some European official expresses condolences (still no news); russia celebrates and boasts how it hit important military target (which almost every time is a civilian infrastructure—tenement house, post office, hospital and such; but russians lying is no news either); USian administration trying their best to ignore the fact that russians did it (if you haven’t spotted the pattern, it’s still no news). There may be some follow-up pieces of actual news eventually (rescuers finishing operation, new bodies discovered, some victims of the attack dying at the hospital, a local mourning day being declared if the victims count is too high) but they do not add much to the picture.

Similarly news from the USA are rather irrelevant if you know a couple of things that have happened recently: USians elected a chaotic president, who decided that it’s time to cash on all the goodwill USA has been building since 1940s; his favourite tool is tariffs; his team consists mostly of people picked for their loyalty and not intellect; after events of 2020 he decided that the system of checks and balances hinders him and should be dismantled. So every time I see something about his administration violating the law with no repercussions, members of it proving themselves incompetent with no consequences, tariffs being declared and/or imposed on some random country and then waived again—those are things to be expected. Even the split of two greatest lovers on Earth was only a question of time—and when it happened was a real piece on news, unlike what they wrote about each other in their own social networks (it may be interesting to the future historians and current stand-up comedians though). And if you remember the phrase “Will no one rid me of this turbulent priest?” then subordinates acting without explicit president’s order is no news for you either.

Similarly global EU news are non-existent if you remember that important decisions require consensus—and there’s Hungary (and Slovakia time from time) using its veto power to extract benefits (from both EU and russia, and occasionally China). And of course member countries not willing to spend money on infrastructure and defence are no news either.

In conclusion I want to say that while thinking hurts, it can still save you time. Sometimes important news happen, but mostly you don’t even need to scan news headlines that thoroughly.