[FFmpeg-devel] GSoC VQA V3

The Deep Explorer thedeepexplorer
Mon Apr 13 04:24:27 CEST 2009


Hi ,
   Am trying to decode the vptr chunk... trying to get the code ...but
somehow this is not working ....any suggestions ...
Am getting the vptr codes properly..  Disregard any formatting
comments ..need to get this thing working first...

   if(vptr_chunk != -1) {
        chunk_size = AV_RB32(&s->buf[vptr_chunk + 4]);
        vptr_chunk += CHUNK_PREAMBLE_SIZE;
        vqa_decode_vptr(&s->buf[vptr_chunk], chunk_size,
            s->decode_buffer, s->decode_buffer_size);
    }

Also am I making the proper call, that is the decoded vptr should be
stored in the decode buffers
or do I have to allocate any separate buffers?

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;

    while(src_index < src_size) {
        memcpy(&code_buf,&src[src_index],2);
        code = (code_buf << 3) | (code_buf >> 13);

        av_log(NULL,AV_LOG_ERROR,"Actual value of code %d Code Value
is %d \n",code_buf,code);
        switch(code) {

        case 0:
             av_log(NULL,AV_LOG_ERROR,"Code is 000 %d \n",code);
             break;
        case 1:
             av_log(NULL,AV_LOG_ERROR,"Code is 001 %d \n",code);
             break;
        case 2:
             av_log(NULL,AV_LOG_ERROR,"Code is 010 %d \n",code);
             break;
        case 3:
             av_log(NULL,AV_LOG_ERROR,"Code is 011 %d\n",code);
             break;
        case 5:
             av_log(NULL,AV_LOG_ERROR,"Code is 101 %d\n",code);
             break;
        default:
             av_log(NULL,AV_LOG_ERROR,"Code %d is unknown \n",code);
             break;
        }

    code = code_buf = 0;
    src_index += 2;
    av_log(NULL,AV_LOG_ERROR,"src_index  %d src_size = %d
\n",src_index,src_size);
    }
}

PLease help...
Thanks,
-tde



More information about the ffmpeg-devel mailing list