[Mplayer-cvslog] CVS: main/libaf af_format.c,1.3,1.4
Anders Johansson
anders at mplayerhq.hu
Fri Oct 11 06:24:09 CEST 2002
Update of /cvsroot/mplayer/main/libaf
In directory mail:/var/tmp.root/cvs-serv20530
Modified Files:
af_format.c
Log Message:
Correcting counters and flags
Index: af_format.c
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af_format.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- af_format.c 6 Oct 2002 11:26:14 -0000 1.3
+++ af_format.c 11 Oct 2002 04:23:52 -0000 1.4
@@ -133,7 +133,7 @@
switch(cf&NBITS_MASK){
case(B16):{
register uint16_t s;
- for(i=1;i<len;i++){
+ for(i=0;i<len;i++){
s=((uint16_t*)ca)[i];
((uint16_t*)ca)[i]=(uint16_t)(((s&0x00FF)<<8) | (s&0xFF00)>>8);
}
@@ -141,7 +141,7 @@
break;
case(B32):{
register uint32_t s;
- for(i=1;i<len;i++){
+ for(i=0;i<len;i++){
s=((uint32_t*)ca)[i];
((uint32_t*)ca)[i]=(uint32_t)(((s&0x000000FF)<<24) | ((s&0x0000FF00)<<8) |
((s&0x00FF0000)>>8) | ((s&0xFF000000)>>24));
@@ -199,11 +199,11 @@
case(B08):
switch(lf&NBITS_MASK){
case(B16):
- for(i=1;i<len;i++)
+ for(i=0;i<len;i++)
((uint16_t*)la)[i]=((uint16_t)((uint8_t*)ca)[i])<<8;
break;
case(B32):
- for(i=1;i<len;i++)
+ for(i=0;i<len;i++)
((uint32_t*)la)[i]=((uint32_t)((uint8_t*)ca)[i])<<24;
break;
}
@@ -215,7 +215,7 @@
((uint8_t*)la)[i]=(uint8_t)((((uint16_t*)ca)[i])>>8);
break;
case(B32):
- for(i=1;i<len;i++)
+ for(i=0;i<len;i++)
((uint32_t*)la)[i]=((uint32_t)((uint16_t*)ca)[i])<<16;
break;
}
@@ -227,7 +227,7 @@
((uint8_t*)la)[i]=(uint8_t)((((uint32_t*)ca)[i])>>24);
break;
case(B16):
- for(i=1;i<len;i++)
+ for(i=0;i<len;i++)
((uint16_t*)la)[i]=(uint16_t)((((uint32_t*)ca)[i])>>16);
break;
}
@@ -236,10 +236,10 @@
}
// Switch to the correct endainess (again the problem with sun?)
if((lf&END_MASK)!=LE){
- switch(cf&NBITS_MASK){
+ switch(lf&NBITS_MASK){
case(B16):{
register uint16_t s;
- for(i=1;i<len;i++){
+ for(i=0;i<len;i++){
s=((uint16_t*)la)[i];
((uint16_t*)la)[i]=(uint16_t)(((s&0x00FF)<<8) | (s&0xFF00)>>8);
}
@@ -247,7 +247,7 @@
break;
case(B32):{
register uint32_t s;
- for(i=1;i<len;i++){
+ for(i=0;i<len;i++){
s=((uint32_t*)la)[i];
((uint32_t*)la)[i]=(uint32_t)(((s&0x000000FF)<<24) | ((s&0x0000FF00)<<8) |
((s&0x00FF0000)>>8) | ((s&0xFF000000)>>24));
More information about the MPlayer-cvslog
mailing list