Left-shift of a negative signed integer is undefined behaviour. The
value becomes negative because bitwise-not on a positive, signed integer
results in a negative signed integer.
To solve this use unsigned integers. The code assumes that the sign bit
is not treated differently from any other bits.
Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/94>
* 64-bit variant: N:immr:imms
*/
static int
-encode_logical_imm (int size, orc_uint64 val, orc_uint32 *encoded)
+encode_logical_imm (unsigned int size, orc_uint64 val, orc_uint32 *encoded)
{
orc_uint64 mask;
orc_uint32 I, CTO, CLO;