Closed sindresorhus closed 3 years ago
The app speed is very fast. Launcher runs safely and work 😄
But the graphic is broken in the gif 🥺 Bugs occur on all video extensions
I've checked that the gifski library works fine on M1 with ffmpeg, so the problem is most likely on the app side.
The pinkish color and extra transparency looks like the video has been decoded to ARGB instead of RGBA.
So apparently the underlying storage format of CGImage is not guaranteed to be consistent. We have just been lucky so far. I have tried to convert it to a proper format in https://github.com/sindresorhus/Gifski/pull/236/commits/23ca26defad6202037ac1a28e9ab54809977ee62, but I don't have a Apple Silicon Mac, so it would be great if you could test this:
@sindresorhus @kornelski It works very well It is now available for release I want to see you soon on the App Store
So this required a deep dive into the topic. I finally discovered that vImage
supports converting between different pixel formats, and that it, in contrast to CGContext
, supports non-premultiplied alpha. Another benefit of using vImage
is that it's super optimized.
So here's a new (and hopefully last) test build: Gifski-universal3.zip
@leejongyoung Can you confirm that you saw the "Gifski on Apple Silicon" message when launching the new build? And can you try converting a video and copy-paste the text that shows up in the dialog when you start converting?
Yes it works
But I want the message "Gifski on Apple Silicon" to be executed only for the first time. Message is always output in case of new execution
I'll upload the debugging dialog as a picture
Thanks 🙏
But I want the message "Gifski on Apple Silicon" to be executed only for the first time. Message is always output in case of new execution
Yes. It will only be shown once.
So it looks like Apple took advantage of the new architecture by making CGImage stored in little-endian, which is faster, since it's the native byte order. On Intel Macs, it's stored in big-median for unknown legacy reasons.
@kornelski Feedback welcome on the last commit if you see anything incorrect.
Hi guys, just wanted to add another m1 to the test (mba13/16gb).
Launched Gifski.app
directly from ~/Downloads
.
(Little snitch.app
pops up, complains correctly about app translocation.)
⌘⇧5
video screen area recording, saved to ~/Desktop
Accepting defaults from Gifsky (same rez, 20fps, iirc)
Immediately I see the thumbnail is off (and resembles output from when I was doing demo coding in assembly in the 90s, when the (320*y)+x
offset in 0a000h
was off when I was doing movsb
and should've done movsw
from es:si
to ds:di
or something:)
The resulting .gif
:
Yeah, the output looks like it has a wrong width/stride specified.
@haakonstorm Thanks for reporting! I found the issue and fixed it.
New build: Gifski-universal5.zip
Thanks, everyone, for the help with testing this 🙏
@kornelski I didn't want to deal with the complicated Xcode run stuff. A makefile was much easier.
Fixes #215