From: Alvin B. <ab...@de...> - 2003-09-04 13:38:40
|
Hello, =46irst I would like to thank Eric and M=E5ns for their quick response to m= y=20 previous linking error. I can now use the libmpeg2 library. However, I have= =20 come across some things that perhaps someone can help me with. 1. I have written a very simple application that takes x number of frames f= rom=20 a MPEG2 file and write them as PGM files. This is almost the same as=20 sample1.c in the doc directory. However, the PGM files that are produced=20 appear to be mangalled. I think the term is "MPEG Distortion"? The image ha= s=20 blocks spread throughout? I have tried with both my program and with=20 sample1.c and the PGM file produced are both distorted? The MPEG2 file I am= =20 experimenting with is a recording of a TV show encoded by a PVR-250. 2. In sample1.c it appears too much data is being written in save_pgm(). In= my=20 mpeg2pgm test program, I just write info->display_fbuf->buf[0] as the PGM=20 data portion and the resulting PGM file looks to be correct? If there a=20 reason why sample1.c's save_pgm() writes fbuf[0] and then interlaces fbuf[1= ]=20 and fbuf[2] (with half the width and height)?? 3. I am using the mpeg2dec-snapshot.tar.gz as of September 4, 2003. Accordi= ng=20 to the txt file in doc, it says that info->display_fbuf->buf is the YUV=20 encoded pixels of the picture. However, I have experimented with writing=20 info->display_fbuf->buf[0] to a PGM file and by converting 'buf' to RGB24=20 using 'convert_rgb24' as in sample2.c (writing PPM) and just writing the=20 GREEN plane. The two resulting PGM files appear to be identicle? 3. My test MPEG2 file (which came from a PVR-250) run perfectly with MPlaye= r=20 but my test program appears to only get distorted frame data? Since MPlayer= =20 uses the libmpeg2 library, is there some special library initialising that= =20 needs to be done that is not done in the sample applications in the doc=20 directory? Thank you for any help or clarification that you can give me. =2D-=20 Alvin Beach Email: abeach_at_deepvision_dot_ca |