[FFmpeg-devel] VQA v3 GSoC questions, need help

Mike Melanson mike
Mon Mar 30 08:13:08 CEST 2009


The Deep Explorer wrote:
> Vitor thanks for the help , I opened up the file using hexeditor
> there are bunch of VQFR chunks, 3 CBFZ chunks , 2 VQFL chunks
> 
> Inside the decoder the the CBFZ chunk is getting detected.
> 
> Now the CBFZ decoding talks of two things
> 1)  if first byte is NULL, then use modified format80 ( I will extend
> this , send the code in the next mail)
> 2) It also states that if the data is less than 64KB the original
> format80 is to be used else the new.
>     By data does it mean the chunk size ?
> 
> So check that the chunk_size is less than 64KB , then irrespective of
> the first byte status use original format80 ?
> Someone please clarify this point

I have been reviewing the documents (it has been several years), and it 
looks like your understanding is correct. The reason for the modified 
algorithm is that the original "format80" algorithm could not handle 
compressed chunks larger than 64 kbytes.

VQA never ceases to amaze me.

> Next, coming to the VPRZ , I can detect it as a sub chunk  , and will
> have to decode it according to the vptr chunks.
> No vptr chunk exist though. So the vptr decoding block needs to be
> written as explained in the VQA.txt,
> please let me know if I am correct ?

A VPTR chunk has a table of codebook indicies. A VPRZ chunk contains the 
same data as a VPTR chunk, only it's compressed. You will not see 'VPTR' 
inside the data after decompressing a VPRZ chunk. You will just see a 
vector map.

> I added the VQFL tag in the westwood.c,  wsvqa_read_packet
> 
> +   if ((chunk_type == SND1_TAG) || (chunk_type == SND2_TAG) ||
> (chunk_type == VQFR_TAG) ||(chunk_type == VQFL_TAG) ) {
> 
> it does detect the VQFL tag perfectly.
> 
> Also , I keep getting the
> [wsvqa @ 0x88b7ad0]Skipping unknown chunk 0x534E324A
> What is the chunk am missing ?

0x534E324A = 'SN2J'. That's one of the chunks that can safely be 
skipped. Add a new chunk in the demuxer under "don't know what these 
tags are for, but acknowledge their existence". Then add the chunk as a 
case statement in the switch under "catch any unknown header tags, for 
curiousity".

Oh, and fix my spelling error: s/curiousity/curiosity/.

>  /* decode the frame */
>     if (vptz_chunk == -1) {
> 
>         /* something is wrong if there is no VPTZ chunk */
>         av_log(s->avctx, AV_LOG_ERROR, "  VQA video: problem: no VPTZ
> chunk found\n");
>         return;
>     }
> 
> so for v3, do we need to add vprz_chunk check is != -1 ? since v3
> nodlogo.vqa  does not have any vptz
> the decoding process is getting returned ?

That sounds right. And a logical OR condition. I wrote a paranoid demuxer.

-- 
     -Mike Melanson



More information about the ffmpeg-devel mailing list