Here is a quick list of what has been done recently:
- LZW decoding in TIFF
- 16-bit grayscale limited support (decoding PNG, read/write PGM and JPEG-LS but the latter is a bit buggy)
- Some progress on Intel Music Codec decoder
Here is a quick list of what has been done recently:
Ah, I still remember those days when FFmpeg got one new decoder once week or two.
Mike once mentioned here that one coder searches for ideas to implement. My situation is rather complimentary – I hardly manage to fullfill all requests from other people. Recently I’ve added two image decoders to FFmpeg – Targa (.tga) and TIFF. Both of them were done by request. The same situation was with Worms Video.
WavPack decoder was written by my own wish but there are already some people asking to write MPEG-4 ALS and Monkey’s Audio decoders. While the later is not possible to implement right now, I’ll implement both MP4 ALS decoder and encoder.
There are currently 14 lossless audio codecs mentioned on MultiMedia Wiki page (look here for further links):
FFmpeg currently has decoders for Bonk, FLAC, Shorten, TrueAudio and Apple Lossless. So, there are at least MPEG-4 ALS, Monkey’s Audio and WavPack decoders can be added.
I will work on WavPack decoder and ALS (I hope standard will appear soon). What about Monkey’s Audio? Yes, it’s popular but it has following difficulties for implementation:
Well, I still hope it will be implemented some day.
OK, Now B-frames for simple and main profile work. Now there are only some exotic features left to implement as spatial downsampling and sync markers. And a lot of RE’ing to implement old WMV3 P-frames decoding and complex profile.
As for advanced profile, B-frames are still not implemented.
Today I’ve committed (I hope) the last patches to VMware Video decoder (videos looked rather funny without mouse pointer).
So, here are the stats for decoders:
I got free Monday so I decided to spend some time on any small codec and took VMware codec used by VMware emulator to capture screen output. As Alex discovered, this is merely recorded session of RFB protocol (used in VNC applications) but slightly mangled.
My further investigation show that bytes 1-2 in big-endian order contain number of rectangles updated and if that value is equal to 8 then the first chunk is ServerInitialization struct with marker ‘WMVi’ inserted before pixel format data. Otherwise frame may contain one or several FramebufferUpdate messages with standard HexTile encoding.
I’ve committed decoder to FFmpeg and I hope to find more samples and clarify some details about it (there are seven markers from ‘WMVd’ to ‘WMVh’ but what they mark is known only for ‘WMVi’, palette mode is not tested too).
OOPS, I’ve just discovered three more samples at MPHQ and they are not decoded correctly, so I have some more work to do.
For those who interested, here is a very experimental patch to enable decoding of WVC1 codec in FFmpeg. I’m currently searching and downloading sample files but it is already tested a bit.
Instructions:
As always, non-working samples are welcome.
I have got some letters and here I will try to summarize them.
You wrote some decoder, where can I find it?
When I reverse-engineer some codec I add decoder to FFmpeg (and soon it goes to other multimedia players) and description to Multimedia Wiki
Do you know how WMV3 video is stored in files?
I just have general ideas how it is stored. See Multimedia Wiki ASF page for details
Help! I have WMV3 sample that does not play {correctly, at all}.
Please follow instructions here. That’s the easiest way to get help (and other people than me may be interested in your samples).
If you look in VC-1 standard specification it’s hard to find header specification for Simple/Main Profile (at least I was unable to do so in comittee draft available – only some hints in bitstream container format). Was that intensional or not?
FFmpeg old and not working vc9.c contained header parsing code and reference decoder does this too. This header contains a lot of ‘reserved’ flags which hidden meaning become clearer if you meet with them:
There is also new M$ codec – WVC1 which is not decoded by reference decoder.
So here is a small list of huge tasks:
Some notes on forward transform.
For 4×4 transform matrix is:
17 17 17 17
22 10 -10 -22
17 - 17 - 17 17
10 -22 22 -10
And suggested norm is (8/289 ; 8/292; 8/289; 8/292)
The forward transform for (A B C D ) will be:
A1 = (17 * A + 17 * B + 17 * C + 17 * D) * 8 / 289;
B1 = (22* A + 10 * B - 10 * C - 22 * D) * 8 / 292;
C1 = (17 * A - 17 * B - 17 * C + 17 * D) * 8 / 289;
D1 = (10 * A - 22 * B + 22 * C - 10 * D) * 8 / 292;
Of course, don’t forget to round result.
I tested it on Octave and it proved to be correct.
Optimization is also straightforward: compute (A+D) , (B+C), (B-C) and use their sums/differencies.