[FFmpeg-devel] GSoC VQA v3 : input needed

Kostya Shishkov kostya.shishkov
Wed Apr 8 11:29:58 CEST 2009


On Wed, Apr 8, 2009 at 10:17 AM, The Deep Explorer
<thedeepexplorer at gmail.com> wrote:
> Hi All,
> ? ?I have done the cbfz , modified format80, catching the vptr , vprz
> ...I think these are trivial changes once the algorithm is clear..
>
> Issue 1
> ----------
> however..I am still struggling with the vptr....please bear with me
> and give some pointers...
>
>
> " These chunks use some sort of differential, run-length algorithm that
> ?only records changes from the previous frame. Therefore, the previous
> ?frame bitmap must be maintained throughout all the frames (you could
> ?just draw the blocks that changed, though). This makes dropping frames
> ?(in case of bad performance) impossible. "
>
> + It talks about saving the previous frame , but where is the previous
> frame used ? What form does the previous frames needs to be ? ?stored
> ?

any form. That just mea?s you can change previous picture instead of
storing additional ones for the reference. And they are stored in
AVFrame structures - look at any video codec implementation in FFmpeg.

> + I understand the mechanism to decode the vptr , but do not
> understand where to write the decoded vptr data ? e.g.
> ? 001 - Write block number (Val & 0xff) Count times. ...so where do I
> write that block "count" number of times ?

That means you have to perform the same operation with the same block
index several times.

> + How is the decoded vptr being used to construct the frame ?
>
> ?"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!"
>
> It gives me the impression that vptr decoding itself is creating the
> entire frame or does it create the index , I just cant
> place the algorithm...some details please

Expanded vptr -> got array of codebook indices -> each one is expanded
into picture block with the help of codebook.

> Issue 2
> -----------
>
> In the vqa_decode_chunk, there is this portion of the code ...
>
>
> ?if (s->vector_height == 4)
> ? ? ? ?index_shift = 4;
> ? ?else
> ? ? ? ?index_shift = 3;
> ? ?for (y = 0; y < s->frame.linesize[0] * s->height;
> ? ? ? ?y += s->frame.linesize[0] * s->vector_height) {
>
> ? ? ? ?for (x = y; x < y + s->width; x += 4, lobytes++, hibytes++) {
> ? ? ? ? ? ?pixel_ptr = x;
>
> ? ? ? ? ? ?/* get the vector index, the method for which varies according to
> ? ? ? ? ? ? * VQA file version */
> ? ? ? ? ? ?switch (s->vqa_version) {
> ? ? ? ? ? ? ? ?...
> ? ? ? ? ? ? ? ?... ? ? ? ? ? ?case 3:
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? /* not implemented yet */
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? lines = 0;
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? break;
>
> ===> So what is the algorithm for V3 , how do I find the vector index
> ? Is it related to decoding of the vptr if so how ?
> ? ? ? ? if not what is algo to find the vector index for v3 ?
>
> Please help !!! I have read the document quite a number of times now :(

vector index = block index

[...]



More information about the ffmpeg-devel mailing list