Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix several compile errors #6

Merged
merged 1 commit into from
Jun 16, 2022
Merged

Fix several compile errors #6

merged 1 commit into from
Jun 16, 2022

Conversation

skal65535
Copy link

src/search_inter.c:1210: implicit conversion from 'int' to 'int16_t' was truncating constants.
src/intra.c:511: const qualifier discarded

  src/search_inter.c:1210: implicit conversion from 'int' to 'int16_t'
                           was truncating constants.
  src/intra.c:511: const qualifier discarded
@Jovasa
Copy link
Member

Jovasa commented Jun 14, 2022

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.

@skal65535
Copy link
Author

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.

@Jovasa
Copy link
Member

Jovasa commented Jun 14, 2022

Here

unipred_pu->inter.mv[ref_list][0] = (mv_t)best_mv.x;
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.

@fador fador added the safe to test Allow running the github actions label Jun 14, 2022
@Jovasa Jovasa merged commit f269ba4 into ultravideo:master Jun 16, 2022
@skal65535 skal65535 deleted the fix branch September 17, 2022 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test Allow running the github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants