View Full Version : Starange glitch in x265 encoded video
GeoffreyA
18th July 2025, 09:21
You have no idea !!
Though I'm fond of anime, there are branches I've never come across, so it's always a surprise. However, almost always, a world more delightful than our own, full of comical but endearing characters.
Z2697
16th August 2025, 20:54
I have a question, does this casting from int32 to int16 behave the same across all platforms that can run x265?
Maybe we should add some preprocessor directives if it doesn't.
Or something like mvd.x > 32767 ? mvd.x % 32768 - 32768 : mvd.x < -32768 ? mvd.x % 32768 + 32768 : mvd.x
jpsdr
17th August 2025, 10:24
If behavoir would change, it would be more compiler related to platform related.
But... for the few i know, the C definition is very stric and has a very good coverage, there is very few holes.
So there is a big change that this case is covered by the C definition, and the compiler must comply to it (otherwise it's considered a bug in the compiler), so whatever the compiler used, it will produce the same result, whatever the platform.
The real question should be : is this casting produce what we want to do ?
For the few people who have tested it, it seems it solved the issue without creating others, so for now we should consider the answer a "yes".
Ritsuka
17th August 2025, 10:37
As far as I know only float to int casts work differently, from Apple docs: https://developer.apple.com/documentation/apple-silicon/addressing-architectural-differences-in-your-macos-code#Audit-Code-that-Contains-Float-to-Int-Conversions
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.