Compiled Duck

I actually got the original Duck TM1 decoder compiled and hooked up to a small test bench app. It even runs without crashing. However, it produces unequivocally incorrect output:


Bad Duck TrueMotion 1 Decode

I was expecting something more in a solid white for this particular frame. This doesn’t exhibit the normal Duck TM1 bidirectional artifacts that I’m used to seeing. I also wired up a number of different blitting calls with both 16- and 24-bit data, to no avail.

I’ll give the API calls another look to see if I’m missing anything obvious in that department (this approach is unlikely to bear fruit, considering the dearth of documentation). Failing that, I might find myself in the ironic position of using libavcodec’s native Duck TM1 decoder to verify the operation of the original decoder to see what is going wrong with files that are known to work correctly in lavc, so that the original decoder will work completely and yield clues about the large body of problem TM1 files.

Addendum: I decided to enlist Valgrind’s assistance against the adversary. This is the first time I have touched the utility in awhile. Let’s see what it has to say…

  valgrind: the 'impossible' happened:
     Killed by fatal signal

I’m not sure what to think about that. Should I feel proud? Fortunately, leading up to the impossible condition are plenty of other memory errors, all ripe for investigation.

3 thoughts on “Compiled Duck

  1. Reimar

    That valgrind message usually means some of the previous incorrect writes managed to damage valgrind’s state, similar to the kind of messages you might get from glibc’s malloc/free if you managed to write around the wrong places too much ;-)
    I’d start with fixing any of the illegal writes that valgrind reports, that should make valgrind work again.
    Luckily there isn’t much asm, here in 64bit x86 valgrind can never handle audio decoding with ffmpeg, it always claims an invalid/unknown instruction :-(

  2. anonymous

    The Ur-Quan Masters ( http://sc2.sf.net) uses that codec for playing 3DO videos and animations and implemented on the code of UQM (that is GPL). Do these videos are decoded correctly under FFmpeg? Not sure if the codec version used by 3DO version of Star Control 2 is an specific old one as it uses four files (.duk .frm .hdr .tbl) , it could be nice to have this clear.

    If you don’t have the 3DO version of Star Control 2, I can send you the original disc. Please send me an email if you are interested.

Comments are closed.