Backport upstream big-endian fix
This commit is contained in:
parent
a7055c30e7
commit
659837ab76
37
3005237a5d68d1e1f465d925040a9507f55e8895.patch
Normal file
37
3005237a5d68d1e1f465d925040a9507f55e8895.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
From 3005237a5d68d1e1f465d925040a9507f55e8895 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pascal Massimino <pascal.massimino@gmail.com>
|
||||||
|
Date: Wed, 14 Feb 2018 23:23:51 -0800
|
||||||
|
Subject: [PATCH] ReadWebP: fix for big-endian
|
||||||
|
|
||||||
|
Change-Id: I36b3c12ccf02eb5dad350c460387c0528fff8df3
|
||||||
|
---
|
||||||
|
imageio/webpdec.c | 8 ++++++++
|
||||||
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/imageio/webpdec.c b/imageio/webpdec.c
|
||||||
|
index 15d87ea44..82f646db3 100644
|
||||||
|
--- a/imageio/webpdec.c
|
||||||
|
+++ b/imageio/webpdec.c
|
||||||
|
@@ -9,6 +9,10 @@
|
||||||
|
//
|
||||||
|
// WebP decode.
|
||||||
|
|
||||||
|
+#ifdef HAVE_CONFIG_H
|
||||||
|
+#include "webp/config.h"
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#include "./webpdec.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
@@ -150,7 +154,11 @@ int ReadWebP(const uint8_t* const data, size_t data_size,
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (pic->use_argb) {
|
||||||
|
+#ifdef WORDS_BIGENDIAN
|
||||||
|
+ output_buffer->colorspace = MODE_ARGB;
|
||||||
|
+#else
|
||||||
|
output_buffer->colorspace = MODE_BGRA;
|
||||||
|
+#endif
|
||||||
|
output_buffer->u.RGBA.rgba = (uint8_t*)pic->argb;
|
||||||
|
output_buffer->u.RGBA.stride = pic->argb_stride * sizeof(uint32_t);
|
||||||
|
output_buffer->u.RGBA.size = output_buffer->u.RGBA.stride * pic->height;
|
@ -2,13 +2,15 @@
|
|||||||
|
|
||||||
Name: libwebp
|
Name: libwebp
|
||||||
Version: 0.6.1
|
Version: 0.6.1
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
URL: http://webmproject.org/
|
URL: http://webmproject.org/
|
||||||
Summary: Library and tools for the WebP graphics format
|
Summary: Library and tools for the WebP graphics format
|
||||||
# Additional IPR is licensed as well. See PATENTS file for details
|
# Additional IPR is licensed as well. See PATENTS file for details
|
||||||
License: BSD
|
License: BSD
|
||||||
Source0: http://downloads.webmproject.org/releases/webp/%{name}-%{version}.tar.gz
|
Source0: http://downloads.webmproject.org/releases/webp/%{name}-%{version}.tar.gz
|
||||||
Source1: libwebp_jni_example.java
|
Source1: libwebp_jni_example.java
|
||||||
|
# Backport upstream big-endian fix
|
||||||
|
Patch0: 3005237a5d68d1e1f465d925040a9507f55e8895.patch
|
||||||
|
|
||||||
BuildRequires: libjpeg-devel
|
BuildRequires: libjpeg-devel
|
||||||
BuildRequires: libpng-devel
|
BuildRequires: libpng-devel
|
||||||
@ -140,6 +142,9 @@ cp swig/*.jar swig/*.so %{buildroot}/%{_libdir}/%{name}-java/
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 16 2018 Sandro Mani <manisandro@gmail.com> - 0.6.1-5
|
||||||
|
- Backport upstream big-endian fix
|
||||||
|
|
||||||
* Tue Feb 13 2018 Sandro Mani <manisandro@gmail.com> - 0.6.1-4
|
* Tue Feb 13 2018 Sandro Mani <manisandro@gmail.com> - 0.6.1-4
|
||||||
- Rebuild (giflib)
|
- Rebuild (giflib)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user