summaryrefslogtreecommitdiff
path: root/simd/powerpc/jcsample.h
diff options
context:
space:
mode:
authorLeon Scroggins III <scroggo@google.com>2018-07-16 10:43:45 -0400
committerLeon Scroggins <scroggo@google.com>2018-08-28 13:49:52 +0000
commit3993b37fb9b483af215e7e3712e5087d7f35b9c7 (patch)
treea279b3c434699ae6969c7c36068cf79b86cf0d21 /simd/powerpc/jcsample.h
parentf5c8ca7bb600d1e5488f65c6d5447b19b18d899c (diff)
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
Diffstat (limited to 'simd/powerpc/jcsample.h')
-rw-r--r--simd/powerpc/jcsample.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/simd/powerpc/jcsample.h b/simd/powerpc/jcsample.h
new file mode 100644
index 0000000..2ac4816
--- /dev/null
+++ b/simd/powerpc/jcsample.h
@@ -0,0 +1,28 @@
+/*
+ * jcsample.h
+ *
+ * This file was part of the Independent JPEG Group's software:
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * For conditions of distribution and use, see the accompanying README.ijg
+ * file.
+ */
+
+LOCAL(void)
+expand_right_edge(JSAMPARRAY image_data, int num_rows, JDIMENSION input_cols,
+ JDIMENSION output_cols)
+{
+ register JSAMPROW ptr;
+ register JSAMPLE pixval;
+ register int count;
+ int row;
+ int numcols = (int)(output_cols - input_cols);
+
+ if (numcols > 0) {
+ for (row = 0; row < num_rows; row++) {
+ ptr = image_data[row] + input_cols;
+ pixval = ptr[-1]; /* don't need GETJSAMPLE() here */
+ for (count = numcols; count > 0; count--)
+ *ptr++ = pixval;
+ }
+ }
+}