[FFmpeg-devel] GSoC VQA v3 vptr decode function implementation
Mon Apr 13 07:30:13 CEST 2009
On Mon, Apr 13, 2009 at 7:26 AM, The Deep Explorer
<thedeepexplorer at gmail.com> wrote:
>> 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;
Count bytes for Count block indexes - do the division yourself.
> 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 ?
Not at all (about similarity to code 5). Read
http://en.wikipedia.org/wiki/Run-length_encoding until you'll know it
by heart. It will help.
More information about the ffmpeg-devel