ports/graphics/mpeg_encode/patches/patch-jpeg_c

32 lines
782 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
--- jpeg.c.orig Sat Aug 5 01:35:07 1995
+++ jpeg.c Tue Oct 13 00:42:55 2009
@@ -65,6 +65,7 @@
*==============*/
#include <stdio.h>
+#include <unistd.h>
#include "all.h"
#include "mtypes.h"
#include "frames.h"
@@ -77,7 +78,7 @@
/* make it happier.... */
#undef DCTSIZE2
-#include "jpeg/jpeglib.h"
+#include "jpeglib.h"
#define HEADER_SIZE 607 /*JFIF header size used on output images*/
@@ -514,7 +515,11 @@ ReadJPEG(mf, fp)
#ifdef JPEG4
buffer_height = 8; /* could be 2, 4,8 rows high */
#else
+#if JPEG_LIB_VERSION < 70
buffer_height = cinfo.max_v_samp_factor * cinfo.min_DCT_scaled_size;
+#else
+ buffer_height = cinfo.max_v_samp_factor * cinfo.min_DCT_v_scaled_size;
+#endif
#endif
for(cp=0,compptr = cinfo.comp_info;cp<cinfo.num_components;