1:1 source port of the engine and game code; Windows build and system layer; docs. No game files or SDK headers.
This commit is contained in:
parent
c3b032a45a
commit
0ecb47e9cb
3871 changed files with 91080 additions and 1640063 deletions
128
tools/port/thirdparty/jpeg-6b-playground.patch
vendored
Normal file
128
tools/port/thirdparty/jpeg-6b-playground.patch
vendored
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
diff --color -ru ../src/jpeg-6b/jdcolor.c jpeg-6b/jdcolor.c
|
||||
--- ../src/jpeg-6b/jdcolor.c 1997-08-04 07:39:16
|
||||
+++ jpeg-6b/jdcolor.c 2026-10-15 22:33:23
|
||||
@@ -151,6 +151,7 @@
|
||||
((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
|
||||
SCALEBITS))];
|
||||
outptr[RGB_BLUE] = range_limit[y + Cbbtab[cb]];
|
||||
+ outptr[RGB_ALPHA] = 0xFF; /* Playground */
|
||||
outptr += RGB_PIXELSIZE;
|
||||
}
|
||||
}
|
||||
@@ -228,6 +229,7 @@
|
||||
for (col = 0; col < num_cols; col++) {
|
||||
/* We can dispense with GETJSAMPLE() here */
|
||||
outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
|
||||
+ outptr[RGB_ALPHA] = 0xFF; /* Playground */
|
||||
outptr += RGB_PIXELSIZE;
|
||||
}
|
||||
}
|
||||
diff --color -ru ../src/jpeg-6b/jdmerge.c jpeg-6b/jdmerge.c
|
||||
--- ../src/jpeg-6b/jdmerge.c 1996-01-07 07:27:36
|
||||
+++ jpeg-6b/jdmerge.c 2026-10-15 22:33:23
|
||||
@@ -258,11 +258,13 @@
|
||||
outptr[RGB_RED] = range_limit[y + cred];
|
||||
outptr[RGB_GREEN] = range_limit[y + cgreen];
|
||||
outptr[RGB_BLUE] = range_limit[y + cblue];
|
||||
+ outptr[RGB_ALPHA] = 0xFF; /* Playground */
|
||||
outptr += RGB_PIXELSIZE;
|
||||
y = GETJSAMPLE(*inptr0++);
|
||||
outptr[RGB_RED] = range_limit[y + cred];
|
||||
outptr[RGB_GREEN] = range_limit[y + cgreen];
|
||||
outptr[RGB_BLUE] = range_limit[y + cblue];
|
||||
+ outptr[RGB_ALPHA] = 0xFF; /* Playground */
|
||||
outptr += RGB_PIXELSIZE;
|
||||
}
|
||||
/* If image width is odd, do the last output column separately */
|
||||
@@ -276,6 +278,7 @@
|
||||
outptr[RGB_RED] = range_limit[y + cred];
|
||||
outptr[RGB_GREEN] = range_limit[y + cgreen];
|
||||
outptr[RGB_BLUE] = range_limit[y + cblue];
|
||||
+ outptr[RGB_ALPHA] = 0xFF; /* Playground */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,21 +325,25 @@
|
||||
outptr0[RGB_RED] = range_limit[y + cred];
|
||||
outptr0[RGB_GREEN] = range_limit[y + cgreen];
|
||||
outptr0[RGB_BLUE] = range_limit[y + cblue];
|
||||
+ outptr0[RGB_ALPHA] = 0xFF; /* Playground */
|
||||
outptr0 += RGB_PIXELSIZE;
|
||||
y = GETJSAMPLE(*inptr00++);
|
||||
outptr0[RGB_RED] = range_limit[y + cred];
|
||||
outptr0[RGB_GREEN] = range_limit[y + cgreen];
|
||||
outptr0[RGB_BLUE] = range_limit[y + cblue];
|
||||
+ outptr0[RGB_ALPHA] = 0xFF; /* Playground */
|
||||
outptr0 += RGB_PIXELSIZE;
|
||||
y = GETJSAMPLE(*inptr01++);
|
||||
outptr1[RGB_RED] = range_limit[y + cred];
|
||||
outptr1[RGB_GREEN] = range_limit[y + cgreen];
|
||||
outptr1[RGB_BLUE] = range_limit[y + cblue];
|
||||
+ outptr1[RGB_ALPHA] = 0xFF; /* Playground */
|
||||
outptr1 += RGB_PIXELSIZE;
|
||||
y = GETJSAMPLE(*inptr01++);
|
||||
outptr1[RGB_RED] = range_limit[y + cred];
|
||||
outptr1[RGB_GREEN] = range_limit[y + cgreen];
|
||||
outptr1[RGB_BLUE] = range_limit[y + cblue];
|
||||
+ outptr1[RGB_ALPHA] = 0xFF; /* Playground */
|
||||
outptr1 += RGB_PIXELSIZE;
|
||||
}
|
||||
/* If image width is odd, do the last output column separately */
|
||||
@@ -350,10 +357,12 @@
|
||||
outptr0[RGB_RED] = range_limit[y + cred];
|
||||
outptr0[RGB_GREEN] = range_limit[y + cgreen];
|
||||
outptr0[RGB_BLUE] = range_limit[y + cblue];
|
||||
+ outptr0[RGB_ALPHA] = 0xFF; /* Playground */
|
||||
y = GETJSAMPLE(*inptr01);
|
||||
outptr1[RGB_RED] = range_limit[y + cred];
|
||||
outptr1[RGB_GREEN] = range_limit[y + cgreen];
|
||||
outptr1[RGB_BLUE] = range_limit[y + cblue];
|
||||
+ outptr1[RGB_ALPHA] = 0xFF; /* Playground */
|
||||
}
|
||||
}
|
||||
|
||||
diff --color -ru ../src/jpeg-6b/jmorecfg.h jpeg-6b/jmorecfg.h
|
||||
--- ../src/jpeg-6b/jmorecfg.h 1997-08-10 07:58:56
|
||||
+++ jpeg-6b/jmorecfg.h 2026-10-15 22:33:23
|
||||
@@ -260,8 +260,8 @@
|
||||
|
||||
/* Capability options common to encoder and decoder: */
|
||||
|
||||
-#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */
|
||||
-#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */
|
||||
+#undef DCT_ISLOW_SUPPORTED /* Playground: not compiled (jddctmgr start_pass only knows the float IDCT) */
|
||||
+#undef DCT_IFAST_SUPPORTED /* Playground: not compiled */
|
||||
#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */
|
||||
|
||||
/* Encoder capability options: */
|
||||
@@ -290,8 +290,8 @@
|
||||
#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
|
||||
#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */
|
||||
#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */
|
||||
-#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */
|
||||
-#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */
|
||||
+#undef QUANT_1PASS_SUPPORTED /* Playground: no jinit_1pass_quantizer in the binary */
|
||||
+#undef QUANT_2PASS_SUPPORTED /* Playground: no jinit_2pass_quantizer in the binary */
|
||||
|
||||
/* more capability options later, no doubt */
|
||||
|
||||
@@ -311,10 +311,16 @@
|
||||
* can't use color quantization if you change that value.
|
||||
*/
|
||||
|
||||
-#define RGB_RED 0 /* Offset of Red in an RGB scanline element */
|
||||
+/* Playground: BGRA output, alpha byte RGB_ALPHA set to 0xFF by the color converters */
|
||||
+#define RGB_RED 2 /* Offset of Red in an RGB scanline element */
|
||||
#define RGB_GREEN 1 /* Offset of Green */
|
||||
-#define RGB_BLUE 2 /* Offset of Blue */
|
||||
-#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */
|
||||
+#define RGB_BLUE 0 /* Offset of Blue */
|
||||
+#define RGB_ALPHA 3 /* Playground: offset of the alpha byte */
|
||||
+#define RGB_PIXELSIZE 4 /* JSAMPLEs per RGB scanline element */
|
||||
+
|
||||
+/* Playground: default DCT method is the float IDCT (jdapimin default_decompress_parms stores 2) */
|
||||
+#define JDCT_DEFAULT JDCT_FLOAT
|
||||
+#define JDCT_FASTEST JDCT_FLOAT
|
||||
|
||||
|
||||
/* Definitions for speed-related optimizations. */
|
||||
Loading…
Add table
Add a link
Reference in a new issue