Closed skal65535 closed 2 years ago
The first issue is really not fixed by changing the return type to int32_t
, since it is anyways always assigned to int16_t
variable. It would require changing mv_t
from int16_t
to int32_t
and making sure everywhere in the code that there are no old lingering code using int16_t
instead of mv_t
. Unless you want to do that I can still merge this one as is and somebody from our team will do the proper fix at some point.
hmm... get_scaled_mv() is only called from search_inter.c:1240 line, and the result (now in int32_t) is assigned to a vector2d_t:x / y field (mv_cand->x and mv_cand->y), which are both 'int' type (see cu.h:135). The fix looks ok to me.
Here https://github.com/ultravideo/uvg266/blob/c8314d3ec329051ae7d39935a01b42da6d872f96/src/search_inter.c#L1436 the result of that function is finally (cast without clipping) and assigned to mv_t
aka int16_t
. But like I said if you don't feel like going through the whole inter search to fix this I can merge this as is.
src/search_inter.c:1210: implicit conversion from 'int' to 'int16_t' was truncating constants. src/intra.c:511: const qualifier discarded