[FFmpeg-devel] GSoC VQA v3 vptr code 2 fresh approach
The Deep Explorer
thedeepexplorer
Mon Apr 13 08:09:20 CEST 2009
Hi ,
Please check inline ...at the case 2 for code 2 ...that is where I
am stuck...just giving the rest so that
to provide a context....
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;
code = code & 0x0007;
av_log(NULL,AV_LOG_ERROR,"Actual value of code %d Code Value
is %d \n",code_buf,code);
switch(code) {
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++){
// Am reading from the vptr buffer
memcpy(&count_value,&src[src_index+2+index],1);
I have the count index in the count_val
What to do now ? How do I use it to write in the dest
buffer ?
}
dest_index += index;
av_log(NULL,AV_LOG_ERROR,"Code is 010 %d \n",code);
break;
Banging my head in frustration ,,,,please tell me what to do :( ...I
have read the RLE and the doc quite a few times...it is still
confusing...please help...
-tde
More information about the ffmpeg-devel
mailing list