[FFmpeg-devel] GSoC Qual VQA v3 : patch updated
Michael Niedermayer
michaelni
Mon Apr 13 21:29:33 CEST 2009
On Mon, Apr 13, 2009 at 03:18:51PM -0400, The Deep Explorer wrote:
> > 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 ?
the text says intel which meaning little endian not big, ronald is a lazy
brat who didnt bother reading the text ;)
>
>
> > 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 :(...
are you sure you are qualified for an actual SOC project this year?
>
> >> 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...
> >
> > uhm
> > 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"
> > but
> > "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...
You write X not the block X
its like if you tell a taxi driver to bring you to the 5th street
and he throws you out of his car and gives you a piece of paper with
5 written on it
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090413/e1d5af0d/attachment.pgp>
More information about the ffmpeg-devel
mailing list