20 |
* along with this program; if not, write to the Free Software |
* along with this program; if not, write to the Free Software |
21 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 |
* |
* |
23 |
* $Id: xvid_decraw.c,v 1.21 2005-09-20 11:19:34 suxen_drol Exp $ |
* $Id: xvid_decraw.c,v 1.24 2006-02-15 19:16:39 Isibaar Exp $ |
24 |
* |
* |
25 |
****************************************************************************/ |
****************************************************************************/ |
26 |
|
|
267 |
mp4_ptr = mp4_buffer; |
mp4_ptr = mp4_buffer; |
268 |
|
|
269 |
/* read new data */ |
/* read new data */ |
270 |
if(feof(in_file)) |
if(!feof(in_file)) { |
|
break; |
|
|
|
|
271 |
useful_bytes += fread(mp4_buffer + already_in_buffer, |
useful_bytes += fread(mp4_buffer + already_in_buffer, |
272 |
1, BUFFER_SIZE - already_in_buffer, |
1, BUFFER_SIZE - already_in_buffer, |
273 |
in_file); |
in_file); |
274 |
|
} |
275 |
} |
} |
276 |
|
|
277 |
|
|
495 |
#else |
#else |
496 |
clock_t clk; |
clock_t clk; |
497 |
clk = clock(); |
clk = clock(); |
498 |
return(clk * 1000 / CLOCKS_PER_SEC); |
return(clk * 1000.0 / CLOCKS_PER_SEC); |
499 |
#endif |
#endif |
500 |
} |
} |
501 |
|
|
623 |
|
|
624 |
if (BPP == 1) { |
if (BPP == 1) { |
625 |
int i; |
int i; |
626 |
fprintf(f, "P5\n#xvid\n%i %i\n255\n", XDIM, YDIM*3/2); |
fprintf(f, "P5\n%i %i\n255\n", XDIM, YDIM*3/2); |
627 |
|
|
628 |
fwrite(image, 1, XDIM*YDIM, f); |
fwrite(image, 1, XDIM*YDIM, f); |
629 |
|
|