[FFmpeg-devel] GSoC VQA v3 : some more help needed

Vitor Sessak vitor1001
Sun Apr 5 00:43:30 CEST 2009

The Deep Explorer wrote:
> Hi all,
>     I need some help in understanding how each frame is decoded in
>  VQA v3. Please let me know how to proceed on the following :
> 1) VPTR Decoding
> Steps :
> Read 1 short int ( 2 bytes)

 From the doc:

> Here's a list of the prefixes I encountered and their description (Val is the short int value): 

So this short int you read is called "Val" in the doc

> Read bits 15,14,13 and based on the command do actions.
> The document says e.g. :
>      a) 000 - Skip Count blocks. Count is (Val & 0x1fff).
>         What is the Count blocks ?

I think you got confused by a var names. Read it this way:

000 - Skip "n" blocks, where n = (Val & 0x1fff)

>      b) 001 - Write block number (Val & 0xff) Count times.
>               Count is (((Val/256) & 0x1f)+1)*2. Note that this can
>               only index the first 256 blocks.
>               What is the block number ?

001 - Write block number "idx" "k" times. idx = (Val & 0xff) and k = 
(((Val/256) & 0x1f)+1)*2.

> <<Every row of blocks is processed individually of others.
> When you encounter the end of a row, proceed to the next row
> (blocks are processed left to right, top to down).
> Repeat this process until all blocks in the frame are covered and
> that's it!>>
> So is this the layout mechanism for v3 ? How are Count, Block, and Val
> are related.
> There are two for loops, first one for the  y axis and the second one for
> the x axis for the v1 and v2. so in case3 will the decoding of vptr will take
> place ? Read the three bits and then do the actions as specified ?
> 2) For VPRZ, first decode it with format80 and then follow the vptR thing
>    so the VPRZ is dependent on the VPTR :)

Yes, so I suggest you try to find a sample with VPTR frames so you can 
test it before trying to decode VPRZ.


More information about the ffmpeg-devel mailing list