videolevels: skip LUT calculation if in passthrough mode
This commit is contained in:
parent
741f91f488
commit
034971d860
@ -602,6 +602,7 @@ gst_videolevels_calculate_lut_uint16_to_uint8 (GstVideoLevels * videolevels,
|
||||
|
||||
gst_videolevels_check_passthrough (videolevels);
|
||||
|
||||
if (!videolevels->passthrough) {
|
||||
low_in = videolevels->lower_input;
|
||||
high_in = videolevels->upper_input;
|
||||
|
||||
@ -623,6 +624,7 @@ gst_videolevels_calculate_lut_uint16_to_uint8 (GstVideoLevels * videolevels,
|
||||
lut[i] = GUINT8_CLAMP (m * GUINT16_FROM_BE (i) + b, low_out, high_out);
|
||||
else
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -802,6 +804,8 @@ gst_videolevels_check_passthrough (GstVideoLevels * levels)
|
||||
passthrough = FALSE;
|
||||
}
|
||||
if (passthrough != levels->passthrough) {
|
||||
GST_DEBUG_OBJECT (levels, "Passthrough mode: %s",
|
||||
passthrough ? "ENABLED" : "DISABLED");
|
||||
levels->passthrough = passthrough;
|
||||
gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (levels),
|
||||
levels->passthrough);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user