[FFmpeg-devel] GSoC Qual VQA v3 : patch updated
The Deep Explorer
Mon Apr 13 21:18:51 CEST 2009
> kostya already explained that you cannot do it that way.
> Its basic C knowledge, to know how to read 2 bytes or how to read a littele
> endian 16bit value.
code = AV_RB16(&src[src_index]);
As per Kostya, Ronald, this will read in the big endian format.
So If I do this now ...
code = code_buf >> 13;
code = code & 0x0007;
This is giving me the code I tested in with a sample file, Is this still wrong ?
> Its your job to write functioning code not ours, after all thats a
> qualification, that is we want to find out if you can do it not if we
> can do it.
> In the actual SOC project in summer we of course would (or should at least)
> be more helpfull
Please I was just trying to understand the document, which is explanatory
for an expert but not sufficient for a newbie like me :(...
>> 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...
> a little bit of common sense is helpfull, really
> The text
> " Write block number (Val & 0xff) Count times.
> Count is (((Val/256) & 0x1f)+1)*2. Note that this can only
> index the first 256 blocks.
> does not mean
> "Write block_number X"
> "Write the block with number X"
> or shorter
> "Write block, number X"
Ok , my next attempt : So val is the short int I read, X is the ==> (Val & 0xff)
and Count is explicityly stated
X = code_buf & 0x1ff;
count = (((code_buf / 256) & 0x1f) + 1) * 2;
for (index = 0; index < count; index++)
dest[dest_index + index] = X;
dest_index += index;
So what is it wrong in here ..., please help...
>> I think may be I am getting it totally wrong ,
> yes, that is an excelent summary
Just trying, thanks for all the pointers...
More information about the ffmpeg-devel