Mercurial > mplayer.hg
comparison TOOLS/realcodecs/drv2.c @ 29263:0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
author | diego |
---|---|
date | Wed, 13 May 2009 02:58:57 +0000 |
parents | 8df85ad26746 |
children | b0f5b5d43941 |
comparison
equal
deleted
inserted
replaced
29262:7d545a6b8aff | 29263:0f1b5b68af32 |
---|---|
159 static void hexdump(void *pos, int len) { | 159 static void hexdump(void *pos, int len) { |
160 unsigned char *cpos=pos, *cpos1; | 160 unsigned char *cpos=pos, *cpos1; |
161 int lines=(len+15)>>4; | 161 int lines=(len+15)>>4; |
162 while(lines--) { | 162 while(lines--) { |
163 int len1=len, i; | 163 int len1=len, i; |
164 fprintf(stderr, "#R# %0x ", (int)cpos-(int)pos); | 164 fprintf(stderr, "#R# %0x ", (int)cpos-(int)pos); |
165 cpos1=cpos; | 165 cpos1=cpos; |
166 for (i=0;i<16;i++) { | 166 for (i=0;i<16;i++) { |
167 if (len1>0) { | 167 if (len1>0) { |
168 fprintf(stderr, "%02x ", *(cpos++)); | 168 fprintf(stderr, "%02x ", *(cpos++)); |
169 } else { | 169 } else { |
179 if ((ch<32)||(ch>127)) ch='.'; | 179 if ((ch<32)||(ch>127)) ch='.'; |
180 fputc(ch, stderr); | 180 fputc(ch, stderr); |
181 } | 181 } |
182 len--; | 182 len--; |
183 } | 183 } |
184 fputs("\n", stderr); | 184 fputs("\n", stderr); |
185 } | 185 } |
186 fputc('\n', stderr); | 186 fputc('\n', stderr); |
187 } | 187 } |
188 | 188 |
189 | 189 |
193 ulong temp[16]; | 193 ulong temp[16]; |
194 fprintf(stderr, "#R# => RV20toYUV420CustomMessage(%p,%p) [%ld,%ld,%ld] \n", p1, p2, p1[0],p1[1],p1[2]); | 194 fprintf(stderr, "#R# => RV20toYUV420CustomMessage(%p,%p) [%ld,%ld,%ld] \n", p1, p2, p1[0],p1[1],p1[2]); |
195 | 195 |
196 /* | 196 /* |
197 if(p1[0]!=17) return 0; | 197 if(p1[0]!=17) return 0; |
198 | 198 |
199 if(p1[1]!=1) return 0; | 199 if(p1[1]!=1) return 0; |
200 | 200 |
201 if(p1[0]==105) return 0; | 201 if(p1[0]==105) return 0; |
202 if(p1[0]==3) return 0; | 202 if(p1[0]==3) return 0; |
203 if(p1[0]==18) return 0; | 203 if(p1[0]==18) return 0; |
204 if(p1[0]==30) return 0; | 204 if(p1[0]==30) return 0; |
205 */ | 205 */ |
206 | 206 |
207 if(p1[0]==0x24){ | 207 if(p1[0]==0x24){ |
208 #if 1 | 208 #if 1 |
209 hexdump(p1[2],64); | 209 hexdump(p1[2],64); |
210 memset(temp,0x77,16*4); | 210 memset(temp,0x77,16*4); |
211 memcpy(temp,p1[2],16); | 211 memcpy(temp,p1[2],16); |
255 // p1->constant,p1->width,p1->height,p1->format1,p1->format2); | 255 // p1->constant,p1->width,p1->height,p1->format1,p1->format2); |
256 // fprintf(stderr, "ulong p2=0x%0lx(%ld))\n", p2, p2); | 256 // fprintf(stderr, "ulong p2=0x%0lx(%ld))\n", p2, p2); |
257 // hexdump((void*)p1, sizeof(struct init_data)); | 257 // hexdump((void*)p1, sizeof(struct init_data)); |
258 | 258 |
259 fprintf(stderr,">HIVE %ld %p\n",p1[0],p1[1]); | 259 fprintf(stderr,">HIVE %ld %p\n",p1[0],p1[1]); |
260 | 260 |
261 if(p1[0]!=0) return 0; | 261 if(p1[0]!=0) return 0; |
262 | 262 |
263 p1[1]=0x10000000; | 263 p1[1]=0x10000000; |
264 return 0; | 264 return 0; |
265 | 265 |
266 // fprintf(stderr,"COPY INIT DATA!\n"); | 266 // fprintf(stderr,"COPY INIT DATA!\n"); |
267 memset(h_temp,0x77,1000); | 267 memset(h_temp,0x77,1000); |
268 memcpy(h_temp,p1,4); | 268 memcpy(h_temp,p1,4); |
269 // fprintf(stderr,"COPY OK!\n"); | 269 // fprintf(stderr,"COPY OK!\n"); |
270 | 270 |
271 // tic(); | 271 // tic(); |
272 // result=(*rvyuvHiveMessage)(p1,p2); | 272 // result=(*rvyuvHiveMessage)(p1,p2); |
273 result=(*rvyuvHiveMessage)(h_temp,p2); | 273 result=(*rvyuvHiveMessage)(h_temp,p2); |
274 // toc(); | 274 // toc(); |
275 | 275 |
279 | 279 |
280 memset(h_temp,0x77,1000); | 280 memset(h_temp,0x77,1000); |
281 | 281 |
282 // p1[0]=0; | 282 // p1[0]=0; |
283 // p1[1]=0x20000000; | 283 // p1[1]=0x20000000; |
284 | 284 |
285 fprintf(stderr,"<HIVE %ld %p\n",p1[0],p1[1]); | 285 fprintf(stderr,"<HIVE %ld %p\n",p1[0],p1[1]); |
286 | 286 |
287 // hexdump((void*)p1, sizeof(struct init_data)); | 287 // hexdump((void*)p1, sizeof(struct init_data)); |
288 // hexdump((void*)p1, 8); | 288 // hexdump((void*)p1, 8); |
289 fprintf(stderr, "#R# RV20toYUV420HiveMessage --> 0x%0lx(%ld)\n\n", result, result); | 289 fprintf(stderr, "#R# RV20toYUV420HiveMessage --> 0x%0lx(%ld)\n\n", result, result); |
385 pp3=p3; | 385 pp3=p3; |
386 // it's not the real crc function, but so what... | 386 // it's not the real crc function, but so what... |
387 pch=p1; | 387 pch=p1; |
388 crc_src=build_crc(pch, pp3[0]); | 388 crc_src=build_crc(pch, pp3[0]); |
389 | 389 |
390 pp4=pp3[3]; | 390 pp4=pp3[3]; |
391 fprintf(stderr,"transin1[%p]: {%ld/%ld} ",pp4,pp3[2],pp3[0]); | 391 fprintf(stderr,"transin1[%p]: {%ld/%ld} ",pp4,pp3[2],pp3[0]); |
392 // pp4[0],pp4[1],pp4[2],pp4[3], | 392 // pp4[0],pp4[1],pp4[2],pp4[3], |
393 // pp4[4],pp4[5],pp4[6],pp4[7]); | 393 // pp4[4],pp4[5],pp4[6],pp4[7]); |
394 | 394 |
395 memset(temp,0x77,128*4); | 395 memset(temp,0x77,128*4); |
396 | 396 |
397 memcpy(temp,pp4,8*(pp3[2]+1)); | 397 memcpy(temp,pp4,8*(pp3[2]+1)); |
398 for(i=0;i<=pp3[2];i++){ | 398 for(i=0;i<=pp3[2];i++){ |
399 fprintf(stderr," %p(%ld)",temp[i*2],temp[i*2+1]); | 399 fprintf(stderr," %p(%ld)",temp[i*2],temp[i*2+1]); |
400 } | 400 } |
401 fprintf(stderr,"\n"); | 401 fprintf(stderr,"\n"); |
402 | 402 |
403 | 403 |
404 pp3[3]=pp4=temp; | 404 pp3[3]=pp4=temp; |
405 | 405 |
406 // pp4[2]= | 406 // pp4[2]= |
407 // pp4[3]= | 407 // pp4[3]= |
408 // pp4[4]=NULL; | 408 // pp4[4]=NULL; |
409 | 409 |
410 //pp4[6]=pp4[5]; | 410 //pp4[6]=pp4[5]; |
411 | 411 |
412 v=p5; | 412 v=p5; |
413 /* fprintf(stderr, "rvyuvMain=0x%0x\n", v); | 413 /* fprintf(stderr, "rvyuvMain=0x%0x\n", v); |
414 v+=0x3c; | 414 v+=0x3c; |
415 v=*((void **)v); | 415 v=*((void **)v); |
416 fprintf(stderr, "[$+3ch]=0x%0x\n", v); | 416 fprintf(stderr, "[$+3ch]=0x%0x\n", v); |
429 v=*((void **)v); | 429 v=*((void **)v); |
430 if (v>0x8000000) { | 430 if (v>0x8000000) { |
431 fprintf(stderr, "[$+178h]=0x%0x\n", v); | 431 fprintf(stderr, "[$+178h]=0x%0x\n", v); |
432 hexdump(v, 128); | 432 hexdump(v, 128); |
433 } | 433 } |
434 */ | 434 */ |
435 // tic(); | 435 // tic(); |
436 result=(*rvyuvTransform)(p1,p2,p3,p4,p5); | 436 result=(*rvyuvTransform)(p1,p2,p3,p4,p5); |
437 // toc(); | 437 // toc(); |
438 | 438 |
439 crc0=build_crc(p2, 176*144); | 439 crc0=build_crc(p2, 176*144); |