[FFmpeg-devel] GSoC Qual VQA v3 : patch updated

The Deep Explorer thedeepexplorer
Mon Apr 13 20:26:27 CEST 2009


>
> I see nothing unclear in the desription of the algo on the wiki.

If you kindly point where is the algo for the vector index mechanism for V3 :(,

>
>
> [...]
>> +static void vqa_decode_vptr(const unsigned char *src, int src_size,
>> +    unsigned char *dest, int dest_size)
>> +{
>> +    int src_index = 0;
>> +    int dest_index = 0;
>> +    short int code_buf = 0;
>> +    short int code = 0;
>> +    int block_no = 0;
>> +    int count = 0;
>> +    int index = 0;
>> +
>> +    while (src_index < src_size) {
>> +        memcpy(&code_buf, &src[src_index], 2);
>> +        code = code_buf >> 13;
>
> this code makes no sense.
>

reading the two bytes , then shifting it right 13 bits so that I have
the bits 15,14,13 in 2,1,0
>
>> +        code = code & 0x0007;
>> +

Then I am masking out the rest to get the code...
>> +        switch (code) {
>> +
>> +        case 0:
>> +            count = code_buf & 0x1ff;
>> +            dest_index += count;
>> +            break;
>> +        case 1:
>> +            block_no = code_buf & 0x1ff;
>> +            count = (((code_buf / 256) & 0x1f) + 1) * 2;
>> +            for (index = 0; index < count; index++)
>> +                dest[dest_index + index] = block_no;
>> +            dest_index += index;
>
> this as well makes no sense, and i guess i could repeat that comment
> a few more times
>

Please then explain what would make sense ...

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

As per the document, I found the block no, wrote it to the dest buff
count times...
I think may be I am getting it totally wrong , if you may please give
some explanation
it would be helpful.
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>

Regards,
-tde



More information about the ffmpeg-devel mailing list