You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (px_diff.y[0] ==0&&px_diff.y[1] ==0&&px_diff.y[2] ==0&&px_diff.y[3] ==0&&px_diff.y[4] ==0&&px_diff.cb==0&&px_diff.cr==0) {
Probably never causing any harm, because that should also be another field within the same struct that we also want to be 0 anyway for this case, but I still thought I'd report it when I already stumbled upon it. When porting this to a C# class I actually copied the same mistake over and there it worked fine just the same 😄
I only noticed when I optimized this specific part by checking all the diff bytes interpreted as one 64 bit value instead of checking each byte separately for 0 - this resulted in a measurable speed-up in C#, but I got no idea whether it would be the same in C++ with various compilers.
The text was updated successfully, but these errors were encountered:
Reporting this here also gives me the chance to say: thanks for your work, very much appreciated! I use it for my plugin to compress video frames (yes, you read that right) when transferring them from one instance of OBS Studio (a compositing software for live streaming and recording) to another over network or named pipes. QOI has already been an option for a while, as well as QOIR through a dynamic C++ library (couldn't be bothered to port this over to C# yet, it's a lot more code than QOI and QOY), but using RGBA in OBS is not ideal and I was missing something similar for the OBS default NV12. QOY came to the rescue! 🦸
The port is here if you're curious. It's not a 1:1 port but rather limited, I removed some features I didn't need like color conversions and alpha support.
The comparison whether a pixel matches the previous one checks px_diff.y[4] for 0, but that field doesn't exist:
qoy/qoy.h
Line 932 in fd9f9ea
Probably never causing any harm, because that should also be another field within the same struct that we also want to be 0 anyway for this case, but I still thought I'd report it when I already stumbled upon it. When porting this to a C# class I actually copied the same mistake over and there it worked fine just the same 😄
I only noticed when I optimized this specific part by checking all the diff bytes interpreted as one 64 bit value instead of checking each byte separately for 0 - this resulted in a measurable speed-up in C#, but I got no idea whether it would be the same in C++ with various compilers.
The text was updated successfully, but these errors were encountered: