FFhistory: the Khirnovs

Here I’d like to remember two siblings who developed for FFmpeg and libav.

Anton Khirnov (aka elenril) is mostly famous for three mehs: metadata support, megapatchsets (usually for internal design change) and MediaSDK-based video transcoding. He had also redesigned the avconv tool (that got merged back and became new ffmpeg).

He started back in the day with small patches, mostly for improving ID3 tag support and became locally famous for his work on metadata (and stabbing people with a rusty spork on IRC). Some people may not care about metadata but if you care about song metadata (title, performer and so on) being preserved in the recoded output you know whom to thank.

After whetting his skills in this particular field he moved to make design changes like introducing reference-counted buffers or asynchronous encoding/decoding (update: he claims it’s been done by wm4, a former mpv developer). He replaced old functions with better-designed ones, removed already deprecated ones and renamed lots of public interfaces (like adding AV_ prefix). Of course this required a lot of changes in almost all files—so he created changesets for more than a hundred patches and sent them in small batches to review them gradually. Naturally a lot of those were created by a script replacing a thing but it still took a lot of time and some effort to check the results.

After the project split it was easier for him to refactor avconv into something better. He gave it a nicer syntax for options and more intuitive handling of the input and output streams along with making its code less ugly and better suited with e.g. several files at once. The resulting program has not so much in common with the original one (and of course FFmpeg merged it all).

Another milestone is his developing career happened when libav was approached by a representative from Intel who wanted it to have hardware acceleration for video decoding and encoding based on their MediaSDK. The initial version from them did not fit the existing design well, then Luca tried to bring the interface into more suitable form but elenril critiqued his design decisions to death and took the task for himself. He’s also responsible for some filters that manipulate surfaces of those hardware-decoded frames and the rest seems to be done by his colleague Mark Thompson (once I actually saw them together working with some prototype hardware from Intel delivered to them by Luca Barbato).

It’s also worth noting that he’s managed to implement full Opus decoder (on behalf of Mozilla), a feat not yet repeated. Many have tried, usually got as far as implementing Silk part of the codec and gave up. I blame Xiph for both writing overcomplicated code (unless you have their mindset) and not documenting it well enough (Luca tried using RFC and failed). If you think this is just an anomaly then look at their Speex codec, it still has no alternative implementations (literal translations into other programming languages do not count).

After libav factual demise he returned to jbmpeg and works there (hopefully for a decent compensation). But if you ask me if I’d like to meet him again I’d say no as he does not like a company of anybody but few selected people so it would be inconvenient for both of us.

His sister Alexandra (first Khirnova, then Hájková) is, quite unlike him, very sociable. She even claims that she joined libav to interact more with her brother. At least she’s found some new friends there.

She started with simpler patches like -loop option for avconv (to repeat the same input file several times) and moved to more complex things like writing an ASF demuxer from scratch to replace the old and hacky one. She’s also responsible for creating a new bitstream reader for libav to replace the old and hacky one (actually a collection of several different bitstream readers enabled by different defines); the design concept and funding came from Luca, I gave some optimisation tips but mostly it’s her work. Side story: when later she tried to propose it for inclusion in jbmpeg, Michael Niedermayer behaved as expected—instead of letting technical committee to decide if it’s a good idea he called for voting on development list; even later there were attempts to bring it again but he opposed them demanding to add yet another set of defines to get_bits.h instead.

Later she tried her hand at optimisation, writing Altivec and NEON code, particularly for H.265 decoder in libav and various bits for libvpx and x264.

Nowadays she works at IBM (n&eactute;e RedHat) on improving GDB and sometimes is nostalgic about those old days.

2 Responses to “FFhistory: the Khirnovs”

  1. ????????? says:

    Some clarifications for posterity:
    >asynchronous encoding/decoding
    is not actually asynchronous (yet?), just decoupled input/output API. And it was actually written by the fabled wm4.

    >full Opus decoder
    actually about half of it (including most of SILK) was written by Andrew D’Addesio for a GSOC project

    >bitstream reader
    you might be interested in http://git.videolan.org/?p=ffmpeg.git;a=commit;h=8fe551eca02caa86bc17d6f9bc933ae72d8a2c4c

    also, when are we getting a blog on the éminence grise behind it all, the infamous “JB” (obviously a pseudonym)

  2. Kostya says:

    As for asynchronous, you’ve laid the groundwork for enabling that. Whether any codec decides to use it is another thing. And somebody more knowledgable should write a story about MPlayer forks…

    For Opus decoder, I mentioned that others have implemented Silk part of it with no or little problems (even in Go, and IIRC Andrew also wrote Silk decoder and failed to go further), it’s the CELT part you’ve done nobody else managed to complete.

    As for two-letter pseudonym, I mentioned him in the prologue. Maybe he’ll get a greater impact on the project but that’ll have to wait until the project postmortem (and I’m not going to write it).