Author Archives: Multimedia Mike

New FATE Test Coverage System

I’ve been feeling a bit scattered for the last week since I was fired from my volunteer position as the FFmpeg QA manager, wondering if there is anything I should attempt to do with the project. It can’t be denied that the new system is working well. But one area I’ve wondered about is test coverage.

Under my old regime I tracked test coverage as a wiki page which was a highly flawed method– tedious and error-prone. There are those 2 adjectives again– tedious and error-prone; whenever I see those, I search for automation methods. I think that might be more plausible thanks to the new FATE’s tighter integration with the FFmpeg build system.

I don’t think anyone is working on this problem so I wanted to toss out a brainstorm:

  1. First, run ‘ffmpeg -formats’, ‘ffmpeg -codecs’, etc. and parse the output to collect a list of all the features (full list: -formats, -codecs, -bsfs, -protocols, -filters, -pix_fmts). Transform these lists into a standardized list of features, e.g., "DEVSD ffvhuff Huffyuv FFmpeg variant" represents features ‘decode-video-ffvhuff’, ‘encode-video-ffvhuff’, ‘ffvhuff-horizband’, and ‘ffvhuff-dr1’.
  2. Next, tag each individual test spec with the features that it exercises. E.g., test ‘fate-vqa-cc’ exercises features ‘demux-wsvqa’, ‘decode-video-vqavideo’, and ‘decode-audio-adpcm_ima_ws’.
  3. Finally, compare the data from parts 1 and 2. Print a list of all the features that are not exercised in FATE.

I think a lot of this could be implemented at the GNU make level. Then again, I’m no expert on GNU make syntax so I may be overestimating its capabilities. Or there might be simpler ways to automatically track test coverage stats based on the improved testing infrastructure.

Wave Goodbye; What About VP8/WebM?

Some big news in the geek community this past week came in the form of Google’s announcement that it would no longer be caring about its vaunted Wave technology. I was mildly heartbroken by this since I had honestly wanted to try Google Wave. Then I remembered why I never got a chance to try it: they made it an exclusive club at the beginning. I really did try to glean some utility out of the concept by reading documentation and watching videos and I had some ideas about how I might apply it. Then again, I try to think of a use for nearly any technology that crosses my path.

It still struck me as odd: Why would Google claim that no one was interested in their platform when they wouldn’t give anyone a chance to try it out? A little digging reveals that Google did open it for general use back around May 18. That date sounds familiar… oh yeah, VP8 was open sourced right around the same time. Maybe that’s why I don’t remember hearing anything about Wave at the time.

But now I’m wondering about VP8 and WebM. How long do you think it might be before Google loses interest in these initiatives as well and reassigns their engineering resources? Fortunately, if they did do that, the technology would live on thanks to the efforts of FFmpeg developers. A multimedia format has a far more clear-cut use case than Google Wave.

Resurrecting SCD

When I became interested in reverse engineering all the way back in 2000, the first Win32 disassembler I stumbled across was simply called “Win32 Program Disassembler” authored by one Sang Cho. I took to calling it ‘scd’ for Sang Cho’s Disassembler. The original program versions and source code are still available for download. I remember being able to compile v0.23 of the source code with gcc under Unix; 0.25 is no go due to extensive reliance on the Win32 development environment.

I recently wanted to use scd again but had some trouble compiling. As was the case the first time I tried compiling the source code a decade ago, it’s necessary to transform line endings from DOS -> Unix using ‘dos2unix’ (I see that this has been renamed to/replaced by ‘fromdos’ on Ubuntu).

Beyond this, it seems that there are some C constructs that used to be valid but are now rejected by gcc. The first looks like this:

return  (int) c = *(PBYTE)((int)lpFile + vCodeOffset);

Ahem, “error: lvalue required as left operand of assignment”. Removing the “(int)” before the ‘c’ makes the problem go away. It’s a strange way to write a return statement in general. However, ‘c’ is a global variable that is apparently part of some YACC/BISON-type output.

The second issue is when a case-switch block has a default label but with no code inside. Current gcc doesn’t like that. It’s necessary to at least provide a break statement after the default label.

Finally, the program turns out to not be 64-bit safe. It is necessary to compile it in 32-bit mode (compile and link with the ‘-m32’ flag or build on a 32-bit system). The static 32-bit binary should run fine under a 64-bit kernel.

Alternatively: What are some other Win32 disassemblers that work under Linux?

FATE’s New Look

The FATE main page exposes a lot of data. The manner in which it is presented has always been bounded by my extremely limited web development abilities. I wrestled with whether I should learn better web development skills first and allow that to inform any improved design, or focus on the more useful design and invest my web development learning time towards realizing that design.

Fortunately, Mans solved this conundrum with an elegantly simple solution:



The top of the page displays a status bar that illustrates — at a glance — how functional the codebase is. The web page source code identifies this as the failometer. It took me a few seconds to recognize what information that status bar was attempting to convey; maybe it could use a succinct explanation.

Mini-Book Review
Continue reading