2 Commits

Author SHA1 Message Date
Zhao Zhili
97115451d0 swscale/rational64: remove unused av_gcd_q64 declaration
av_gcd_q64 was declared in rational64.h but never defined or used.

Signed-off-by: Zhao Zhili <quinkblack@foxmail.com>
2026-06-28 14:14:07 +00:00
Niklas Haas
b568f20f32 swscale/rational64: add 64-bit rational type
This is needed by the ops code, to represent intermediate values for 32-bit
formats, which can exceed the value range of int32_t (especially for
intermediate products).

I copied the math almost 1:1 from rational.c, but adapted to use the 128-bit
integer wrappers defined by int128.h. I added a generous amount of tests in
any case.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-06-25 01:20:15 +02:00