--- MPlayer-cvs/libaf/af_format.c 2003-01-18 18:31:58.000000000 +0100 +++ MPlayer-test/libaf/af_format.c 2004-04-28 21:32:48.000000000 +0200 @@ -131,9 +131,9 @@ // Sanity check for bytes per sample int check_bps(int bps) { - if(bps != 4 && bps != 2 && bps != 1){ + if(bps != 4 && bps != 3 && bps != 2 && bps != 1){ af_msg(AF_MSG_ERROR,"[format] The number of bytes per sample" - " must be 1, 2 or 4. Current value is %i \n",bps); + " must be 1, 2, 3 or 4. Current value is %i \n",bps); return AF_ERROR; } return AF_OK; @@ -362,6 +362,15 @@ } break; } + case(3):{ + register uint8_t s; + for(i=0;i>16; + ((uint8_t*)out)[3*i+1]=(r&0x0000FF00)>>8; + ((uint8_t*)out)[3*i+2]=r&0x000000FF; +#else + ((uint8_t*)out)[3*i]=r&0x000000FF; + ((uint8_t*)out)[3*i+1]=(r&0x0000FF00)>>8; + ((uint8_t*)out)[3*i+2]=(r&0x00FF0000)>>16; +#endif + } + break; case(4): for(i=0;i>16; + ((uint8_t*)out)[3*i+1]=(r&0x0000FF00)>>8; + ((uint8_t*)out)[3*i+2]=r&0x000000FF; +#else + ((uint8_t*)out)[3*i]=r&0x000000FF; + ((uint8_t*)out)[3*i+1]=(r&0x0000FF00)>>8; + ((uint8_t*)out)[3*i+2]=(r&0x00FF0000)>>16; +#endif + } + break; case(4): for(i=0;i>8); break; + case(3): + for(i=0;i>16); break; + case(3): + for(i=0;i>16; + ((uint8_t*)out)[3*i+1]=(r&0x0000FF00)>>8; + ((uint8_t*)out)[3*i+2]=r&0x000000FF; +#else + ((uint8_t*)out)[3*i]=r&0x000000FF; + ((uint8_t*)out)[3*i+1]=(r&0x0000FF00)>>8; + ((uint8_t*)out)[3*i+2]=(r&0x00FF0000)>>16; +#endif + } + break; case(4): for(i=0;i