Skip to content

Conversation

@diegonieto
Copy link

@diegonieto diegonieto commented Jul 21, 2025

Ensure the model's parsing works properly

read_json_model.c: fix issue with json_get_number()

use setlocale to ensure parsing model properly. The issue is that json_get_number() does not parse properly the values.

This is following the same approach it is done in: https://github.com/Netflix/vmaf/blob/master/libvmaf/src/svm.cpp#L2652-L2660

The root cause was the slope and intercept values read from the model were not correct. It was reading the model with ",", instead of "." for the numeric values.

@diegonieto diegonieto force-pushed the json-parse-add-setlocate branch 4 times, most recently from eb03b8a to aa47ce8 Compare July 21, 2025 16:49
@diegonieto
Copy link
Author

Hi @kylophone , do you think it is possible to have a review of this one?

use setlocale to ensure parsing model properly. The issue is that
json_get_number() does not parser properly the values.

This is following the same approach it is done in: https://github.com/Netflix/vmaf/blob/master/libvmaf/src/svm.cpp#L2652-L2660
@diegonieto diegonieto force-pushed the json-parse-add-setlocate branch from febb785 to 9ede68e Compare October 30, 2025 17:32
@diegonieto diegonieto changed the title read_json_model.c: use setlocale to ensure parsing model properly Ensure the model's parsing works properly with the locale Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant