From: Erwin de K. <erw...@ph...> - 2006-01-26 18:17:18
|
Hi all, I noticed that the cpfsp p_write_header function generates files that have different sizes under Linux and Cygwin. I use the following code: #include <stdlib.h> #include "cpfspd.h" int main() { pT_header seqInfo; pT_status status; if ((p_create_ext_header(&seqInfo, P_COLOR_420_PL, P_50HZ, P_SD, 720, 1, P_16_9) != P_OK) || (p_mod_image_size(&seqInfo, 704, 576) != P_OK) || (p_mod_num_frames(&seqInfo, 7) != P_OK) ) { printf("Error, cannot create pfspd header\n"); exit(1); } status=p_write_header("./out.yuv", &seqInfo); } Under Linux this results in a file out.yuv of size 4280320. Under Cygwin this results in a file out.yuv of size 4456448. If I write yuv data in the specified format to these files, then the first 4280320 bytes of the files are identical. So it seems that the last bytes of the cygwin out.yuv file are not used (or maybe even more if the linux file size is too large as well). I also tried supported combinations of color format, image frequency, and image size such as p_create_ext_header(&seqInfo, P_COLOR_420_PL, P_50HZ, P_SD, 720, 1, P_4_3) without changing the image size later on, but this also gives different file sizes. The different files are a problem because I want to check the output of my program against expected output. I prefer that the expected output does not depend on the platform. What am I doing wrong? Thanks for any help, Erwin de Kock |