[FFmpeg-devel] GSoC Qual VQA v3 : patch updated
Michael Niedermayer
michaelni
Mon Apr 13 20:14:43 CEST 2009
On Mon, Apr 13, 2009 at 01:39:36PM -0400, The Deep Explorer wrote:
> Hi,
> I have checked and removed the cosmetic changes.
>
> Thanks for the feedback Diego, when I was trying to revert, I could
> understand how painful the cosmetic changes can be. Lesson learnt.
>
> I hope this is a much better patch.
>
> Hopefully, now I will get some feedback on the algorithm. I definitely
> need the vector indexing mechanism for V3. Please anyone.
I see nothing unclear in the desription of the algo on the wiki.
[...]
> +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.
> + code = code & 0x0007;
> +
> + 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
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- 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/86c6101a/attachment.pgp>
More information about the ffmpeg-devel
mailing list