Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] opentoonz: add big endian patch
Date: Mon, 28 Oct 2019 18:37:40 +0100	[thread overview]
Message-ID: <20191028173740.DMAsu8ddSAYFk5-Hk7R3MjdRjQKV9PYhM297GzdzLiU@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-15863@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 514 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-ppc/void-packages toonz
https://github.com/void-linux/void-packages/pull/15863

opentoonz: add big endian patch
This allows the package to build, and to a degree work (brief testing reveals some color issues in some of the UI though the actual main area with the frame renders correctly) on big endian systems.

A patch file from https://github.com/void-linux/void-packages/pull/15863.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-toonz-15863.patch --]
[-- Type: text/x-diff, Size: 2442 bytes --]

From e2aac74c458dd103331256c94daeaaba8b793960 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 28 Oct 2019 18:15:42 +0100
Subject: [PATCH] opentoonz: add big endian patch

[ci skip]
---
 srcpkgs/opentoonz/patches/big-endian.patch | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 srcpkgs/opentoonz/patches/big-endian.patch

diff --git a/srcpkgs/opentoonz/patches/big-endian.patch b/srcpkgs/opentoonz/patches/big-endian.patch
new file mode 100644
index 00000000000..fe4573ec08d
--- /dev/null
+++ b/srcpkgs/opentoonz/patches/big-endian.patch
@@ -0,0 +1,38 @@
+Fix up some big endian paths that did not survive refactoring.
+
+--- toonz/sources/image/tzl/tiio_tzl.cpp
++++ toonz/sources/image/tzl/tiio_tzl.cpp
+@@ -945,7 +945,7 @@ void TLevelWriterTzl::saveImage(const TImageP &img, const TFrameId &_fid,
+   Header *header = (Header *)buff;
+ 
+   TRasterP ras;
+-  m_codec->decompress(buff, buffSize, ras);
++  m_codec->decompress(buff, buffSize, ras, false);
+   delete[] buff;
+   assert((TRasterCM32P)ras);
+   assert(ras->getLx() == header->m_lx);
+--- toonz/sources/sound/wav/tsio_wav.cpp
++++ toonz/sources/sound/wav/tsio_wav.cpp
+@@ -373,17 +373,17 @@ bool TSoundTrackWriterWav::save(const TSoundTrackP &sndtrack) {
+ #if (!TNZ_LITTLE_ENDIAN)
+   {
+     if (fmtChunk.m_bitPerSample == 8)
+-      memcpy((void *)waveData, (void *)sndtrack->getRawData(), soundDataLength);
++      memcpy((void *)waveData.get(), (void *)sndtrack->getRawData(), soundDataLength);
+     else if (fmtChunk.m_bitPerSample == 16) {
+-      swapAndCopySamples((short *)sndtrack->getRawData(), (short *)waveData,
++      swapAndCopySamples((short *)sndtrack->getRawData(), (short *)waveData.get(),
+                          sndtrack->getSampleCount() * fmtChunk.m_chans);
+     } else if (fmtChunk.m_bitPerSample == 24) {  // swap e togliere quarto byte
+       UCHAR *begin = (UCHAR *)sndtrack->getRawData();
+       for (int i = 0; i < (int)sndtrack->getSampleCount() * fmtChunk.m_chans;
+            ++i) {
+-        *(waveData + 3 * i)     = *(begin + 4 * i + 3);
+-        *(waveData + 3 * i + 1) = *(begin + 4 * i + 2);
+-        *(waveData + 3 * i + 2) = *(begin + 4 * i + 1);
++        *(waveData.get() + 3 * i)     = *(begin + 4 * i + 3);
++        *(waveData.get() + 3 * i + 1) = *(begin + 4 * i + 2);
++        *(waveData.get() + 3 * i + 2) = *(begin + 4 * i + 1);
+       }
+     }
+   }

  parent reply	other threads:[~2019-10-28 17:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 17:19 [PR PATCH] " voidlinux-github
2019-10-28 17:32 ` voidlinux-github
2019-10-28 17:37 ` [PR PATCH] [Updated] " voidlinux-github
2019-10-28 17:37 ` voidlinux-github
2019-10-28 17:37 ` voidlinux-github
2019-10-28 17:37 ` [PR PATCH] [Updated] " voidlinux-github
2019-10-28 17:37 ` voidlinux-github [this message]
2019-10-28 17:42 ` voidlinux-github
2019-10-28 17:42 ` voidlinux-github
2019-10-29 14:53 ` [PR PATCH] [Merged]: " voidlinux-github

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191028173740.DMAsu8ddSAYFk5-Hk7R3MjdRjQKV9PYhM297GzdzLiU@z \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).