mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
command: convert aspect, par, and sar sub-properties to double
These were still set to float. For some common aspect ratios (e.g. like 4:3), the loss of precision is significant. The underlying calculations are already done with doubles so all that needs to be done is to change the type of the sub-property.
This commit is contained in:
@@ -2450,10 +2450,10 @@ static int property_imgparams(const struct mp_image_params *p, int action, void
|
||||
{"crop-y", SUB_PROP_INT(p->crop.y0), .unavailable = !has_crop},
|
||||
{"crop-w", SUB_PROP_INT(mp_rect_w(p->crop)), .unavailable = !has_crop},
|
||||
{"crop-h", SUB_PROP_INT(mp_rect_h(p->crop)), .unavailable = !has_crop},
|
||||
{"aspect", SUB_PROP_FLOAT(d_w / (double)d_h)},
|
||||
{"aspect", SUB_PROP_DOUBLE(d_w / (double)d_h)},
|
||||
{"aspect-name", SUB_PROP_STR(aspect_name), .unavailable = !aspect_name},
|
||||
{"par", SUB_PROP_FLOAT(p->p_w / (double)p->p_h)},
|
||||
{"sar", SUB_PROP_FLOAT(p->w / (double)p->h)},
|
||||
{"par", SUB_PROP_DOUBLE(p->p_w / (double)p->p_h)},
|
||||
{"sar", SUB_PROP_DOUBLE(p->w / (double)p->h)},
|
||||
{"sar-name", SUB_PROP_STR(sar_name), .unavailable = !sar_name},
|
||||
{"colormatrix",
|
||||
SUB_PROP_STR(m_opt_choice_str(pl_csp_names, p->repr.sys))},
|
||||
|
||||
Reference in New Issue
Block a user