[FFmpeg-devel] GSoC VQA v3 vptr decode function implementation

The Deep Explorer thedeepexplorer
Mon Apr 13 07:26:29 CEST 2009

> Code 2 means that next block indexes are stored in the stream, so you
> have to read one or two byte for each of them from the stream(check
> docs again for how many bytes) to output it.

Doc's info -->

 010 - Write block number (Val & 0xff) and then write Count blocks
         getting their indexes by reading next Count bytes from
         the VPTR chunk. Count is (((Val/256) & 0x1f)+1)*2.
         Again, the block numbers range from 0-255.

            block_no = code_buf & 0x1ff;
            count = (((code_buf/256) & 0x1f)+1)*2;

It does not say how many bytes :( . So assuming 1 byte I will read the
next byte ( say it is val)
and then count will be computed as  count = (((val/256) & 0x1f)+1)*2;

So count number of times  we will write the block no to the dest buf ?

Then it becomes quite similar to code 5 . Am I going in the right direction ?


More information about the ffmpeg-devel mailing list