Update libjpeg-turbo to 2.0.0
Bug: 78329453
Update to upstream at https://github.com/libjpeg-turbo/libjpeg-turbo/tree/2.0.0
This includes a fix for a bug that could result in an infinite loop.
ChangeLog.md contains detailed changes about the upstream library. Changes
I made are below:
- Remove files that are no longer in upstream, and include all current
files from upstream.
- Update various references to the version.
Android.bp:
- Update to build new files/files in new locations.
- Run bpfmt
README.android:
- Remove cherry-pick references, as they are no longer needed.
- Remove modification in jsimdext.inc, which no longer appears to be
necessary.
README.version:
- Use the github URL, as it is now the official upstream build
- Replace msarett as OWNER, as he no longer works on this project
- Update the version
Change-Id: Ie6cfee5a8f820f28656bbb305f500e75e7ce7915
diff --git a/jcstest.c b/jcstest.c
index 11883b5..8b1fe38 100644
--- a/jcstest.c
+++ b/jcstest.c
@@ -35,10 +35,10 @@
#include <setjmp.h>
#ifndef JCS_EXTENSIONS
-#define JCS_EXT_RGB 6
+#define JCS_EXT_RGB 6
#endif
#if !defined(JCS_EXTENSIONS) || !defined(JCS_ALPHA_EXTENSIONS)
-#define JCS_EXT_RGBA 12
+#define JCS_EXT_RGBA 12
#endif
static char lasterror[JMSG_LENGTH_MAX] = "No error";
@@ -51,13 +51,13 @@
static void my_error_exit(j_common_ptr cinfo)
{
error_mgr *myerr = (error_mgr *)cinfo->err;
- (*cinfo->err->output_message)(cinfo);
+ (*cinfo->err->output_message) (cinfo);
longjmp(myerr->jb, 1);
}
static void my_output_message(j_common_ptr cinfo)
{
- (*cinfo->err->format_message)(cinfo, lasterror);
+ (*cinfo->err->format_message) (cinfo, lasterror);
}
int main(void)
@@ -67,11 +67,11 @@
error_mgr jerr;
printf("libjpeg-turbo colorspace extensions:\n");
- #if JCS_EXTENSIONS
+#if JCS_EXTENSIONS
printf(" Present at compile time\n");
- #else
+#else
printf(" Not present at compile time\n");
- #endif
+#endif
cinfo.err = jpeg_std_error(&jerr.pub);
jerr.pub.error_exit = my_error_exit;
@@ -90,7 +90,7 @@
jpeg_default_colorspace(&cinfo);
jcs_valid = 1;
- done:
+done:
if (jcs_valid)
printf(" Working properly\n");
else
@@ -98,11 +98,11 @@
lasterror);
printf("libjpeg-turbo alpha colorspace extensions:\n");
- #if JCS_ALPHA_EXTENSIONS
+#if JCS_ALPHA_EXTENSIONS
printf(" Present at compile time\n");
- #else
+#else
printf(" Not present at compile time\n");
- #endif
+#endif
if (setjmp(jerr.jb)) {
/* this will execute if libjpeg has an error */
@@ -114,7 +114,7 @@
jpeg_default_colorspace(&cinfo);
jcs_alpha_valid = 1;
- done2:
+done2:
if (jcs_alpha_valid)
printf(" Working properly\n");
else