|
From: Gert V. <ger...@hc...> - 2006-05-27 10:43:27
|
Hi,
While looking through the jpeg2yuv source code, I noticed that the file
size of the jpeg images is obtained by reading MAXPIXELS bytes from the
jpeg file:
jpegsize = fread(jpegdata, sizeof(unsigned char), MAXPIXELS,
jpegfile);
And MAXPIXELS is defined as 1280x1024 pixels:
#define MAXPIXELS (1280*1024) /* Maximum size of final image */
Which is 1310720 bytes and is not big enough for the jpegs I was trying
to convert.
A quick and dirty solution for me:
[gert@apollo lavtools]$ diff -u jpeg2yuv.c.1 jpeg2yuv.c
--- jpeg2yuv.c.1 2006-05-27 12:31:56.000000000 +0200
+++ jpeg2yuv.c 2006-05-27 12:32:26.000000000 +0200
@@ -42,7 +42,7 @@
#include "yuv4mpeg.h"
#include "mpegconsts.h"
-#define MAXPIXELS (1280*1024) /* Maximum size of final image */
+#define MAXPIXELS (3000*2200) /* Maximum size of final image */
[gert@apollo lavtools]$
Gert
Gert Vervoort wrote:
>
> jpeg2yuv mentions that the size of the image is 1310720 bytes, but the
> actual size is 1839353 bytes:
> [gert@apollo tmp]$ ls -al IMG_0134.JPG
> -rw-rw-r-- 1 gert gert 1839353 May 26 21:50 IMG_0134.JPG
> [gert@apollo tmp]$
>
|