[FFmpeg-devel] GSoC VQA v3 vptr decode function implementation

The Deep Explorer thedeepexplorer
Mon Apr 13 09:07:02 CEST 2009


> for case 2 it would be dest[dest_index+index] = src[src_index+index]
>

Thanks for the help  , the modified code 2 then can be interpreted as follows :

  case 2:
             /* 010 - Write block number (Val & 0xff) and then write
Count blocks getting their indexes by reading next Count bytes from
              the VPTR chunk. Count is (((Val/256) & 0x1f)+1)*2.
Again, the block numbers range from 0-255.*/

             block_no = code_buf & 0x1ff;
             count = (((code_buf/256) & 0x1f)+1)*2;

             for(index=0;index<count;index++){
                 dest[dest_index+index] = src[src_index+index];
              }
             src_index += index;  // Is this correct , since these
bytes are already consumed in a way ?
             dest_index += index;
             av_log(NULL,AV_LOG_ERROR,"Code is 010 %d \n",code);
             break;

Please let me know if this is correct ?

Thanks,
-tde



More information about the ffmpeg-devel mailing list