Commit ef1f5003 authored by Seungha Yang's avatar Seungha Yang 🐑

videoconvert: Take account of the amount of bitdepth loss for output format selection

... and select a format which has the minimum loss than the others.

Fixes: gstreamer/gst-plugins-base#689
parent ed651022
Pipeline #80406 failed with stages
in 54 minutes and 52 seconds
......@@ -258,7 +258,7 @@ score_value (GstBaseTransform * base, const GstVideoFormatInfo * in_info,
if ((in_info->bits) != (t_info->bits)) {
loss += SCORE_DEPTH_CHANGE;
if ((in_info->bits) > (t_info->bits))
loss += SCORE_DEPTH_LOSS;
loss += SCORE_DEPTH_LOSS + (in_info->bits - t_info->bits);
}
GST_DEBUG_OBJECT (base, "score %s -> %s = %d",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment