Author Archive

VC-1: Pause

Saturday, July 8th, 2006

I won’t be able to work at VC-1 full day for a week, but it does not mean I won’t code at all. Meanwhile I plan to write demuxer for test bitstreams. Annex L in standard specifies format for all profiles but advanced profile bitstreams use their own format: 0x00 0x00 0x01 where opcode may signal frame start, field start, slice start, etc. This one likely to be done with libavcodec *Parser mechanism.

And here is what I’ve done to present time.

Present decoder status:

  • Simple and main profile supported

What is not implemented:

  • B/BI-frames (samples needed)
  • Reduced range support (the same)
  • Loop filtering for P-frames (I don’t think it’s needed now)

Known bugs:

  • Chroma in P-frames is wrong
  • Sometimes motion creates double borders on objects

VC-1: Checkpoint

Tuesday, July 4th, 2006

Yesterday I’ve finished P-frames support in VC-1 decoder. That does not mean it now decodes all files of course. But at least simple/main profile without B-frames and advanced features should be decoded more or less correctly (excluding chroma).

So, it’s time to do the bug squashing:

  • Correct chroma mode
  • Implement MV intensity compensation (now it mostly produces errors)
  • Implement coefficient scaling
  • Make all P-frames parse and decode correctly

Looks like VC-1 movies with B-frames are rare so another task is to find samples.

VC-1: Some more progress

Friday, June 16th, 2006

Yesterday I’ve rewritten decoder using FFmpeg’s functions from h263 decoding. Now the code is simplier and decodes more I-frames correctly but the problem with AC prediction remains.
Here is the output of new decoder, the same scene:
Decoded frame from second version of decoder

VC-1: Something is showing up

Thursday, June 15th, 2006

Yesterday I’ve managed to beat more or less sane I-frame decoder.
It is not very good now but at least it works and produce something that could be recognized without lots of imagination:

One of decoded frames

VC-1: Middle layer problems

Wednesday, June 14th, 2006

Yesterday I’ve managed to hack FFmpeg bits of VC-1 decoder to actually parse and decode simple profile I-frames. Bits consumed are fine. But there is no sane picture yet. DC prediction is not good and AC coefficients also needs some operations, but at least they are decoded correctly.

VC-1: 8×8 transform

Saturday, June 3rd, 2006

OK, 8×8 transform is slightly optimized too.

This version gives 7x gain on PII and 15x on G4.

Here is vc1itrans.c file from VC-1 reference decoder with replaced transform.

See here
how to use VC-1 reference decoder in FFmpeg
and just replace one file in libvc1 with my version before compiling.

VC-1: 4×4 transform

Saturday, June 3rd, 2006

I was honoured to implement VC-1 decoder in course of Google Summer of Code.

I had almost no time to do anything this week but at least here is straightforward optimization of 4×4 transform.
Speed gain varies from 4 times (PII-266) to 7 times (PPC G4-1.42 GHz). My name is not Niedermayer and I’m not sure how to further optimize it / rewrite with MMX/AltiVec but it’s a good start. 8×8 transform will follow soon (I hope).

The test code is given below.
(more…)

Worms

Friday, May 19th, 2006

I’ve managed to make another bunch of Worms videos to work correctly and plan to commit that patch soon. Here is one frame from TV.AVI:

Worms watching TV

Looks like they’re watching UZI.AVI from previous Worms, eh?

Too bad that correct output can be obtained through FFmpeg transcoding only. Those happens because of different handling of ‘palette change’ block in AVI:

  • FFmpeg handles it okay
  • FFplay also handles it but palette change event is de-synchronized and usually displayed frame has wrong colors.
  • MPlayer is treating palette change chunks in AVI as usual frame data, thus causing decoder errors and wrong colors.

I don’t know the situation with Xine and VLC but suspect it’s nothing good there also.

Real DVD Quality

Saturday, May 13th, 2006

I just had to express that. Recently I’ve opportunity to examine two DVD disks – one with 8 films-in-one and another one is 7 films-in-one (our pirates usually pack at least two films on each disk). Every DVD has a proud label ‘Real DVD Quality’ (but sometimes even VHS tapes are marked so).
As expected, those films had slightly lesser resolution than 720×576, one disk had 352×576 films, but another one… 352×288 !!! If disk was labeled ‘Real VCD Quality’ – that should be fair.

Goal complete.

Friday, April 7th, 2006

I’ve committed today another decoder – for KMVC codec, used in Worms games. This is the final step to the completion of my task.
Multimedia Mike has a simple goal – to have a player which will play any multimedia file you like. My task for now is much simpler – have a decoder for each letter of alphabet.
With the latest addition there are only two letters left: E and Y. But considering that TSCC is now called Ensharpen and only known formats on Y are YUV variants, I declare this task complete. Future RE’ing will be just for fun 😉