Skip to content
Snippets Groups Projects
Commit 9ece6d80 authored by Niklas Haas's avatar Niklas Haas
Browse files

shaders: drop v5 deprecations

parent a8b5e5d0
No related branches found
No related tags found
1 merge request!602config: attach version to deprecation macros
Pipeline #390214 passed with stages
in 8 minutes and 35 seconds
......@@ -139,7 +139,6 @@ struct pl_peak_detect_params {
bool allow_delayed;
// --- Deprecated / removed fields
PL_DEPRECATED_IN(v5.256) float overshoot_margin;
PL_DEPRECATED_IN(v6.313) float minimum_peak;
};
......@@ -185,15 +184,6 @@ PL_API bool pl_shader_detect_peak(pl_shader sh, struct pl_color_space csp,
PL_API bool pl_get_detected_hdr_metadata(const pl_shader_obj state,
struct pl_hdr_metadata *metadata);
// After dispatching the above shader, this function *may* be used to read out
// the detected CLL and FALL directly (in PL_HDR_NORM units). If the shader
// has never been dispatched yet, i.e. no information is available, this will
// return false.
//
// Deprecated in favor of `pl_get_detected_hdr_metadata`
PL_DEPRECATED_IN(v5.255) PL_API bool
pl_get_detected_peak(const pl_shader_obj state, float *out_cll, float *out_fall);
// Resets the peak detection state in a given tone mapping state object. This
// is not equal to `pl_shader_obj_destroy`, because it does not destroy any
// state used by `pl_shader_tone_map`.
......
......@@ -246,12 +246,6 @@ PL_API extern const struct pl_distort_params pl_distort_default_params;
PL_API void pl_shader_distort(pl_shader sh, pl_tex tex, int out_w, int out_h,
const struct pl_distort_params *params);
enum PL_DEPRECATED_IN(v5.229) { // for `int pass`
PL_SEP_VERT = 0,
PL_SEP_HORIZ,
PL_SEP_PASSES
};
PL_API_END
#endif // LIBPLACEBO_SHADERS_SAMPLING_H_
......@@ -1410,19 +1410,6 @@ bool pl_get_detected_hdr_metadata(const pl_shader_obj state,
return true;
}
bool pl_get_detected_peak(const pl_shader_obj state,
float *out_peak, float *out_avg)
{
struct pl_hdr_metadata data;
if (!pl_get_detected_hdr_metadata(state, &data))
return false;
// Preserves old behavior
*out_peak = pl_hdr_rescale(PL_HDR_PQ, PL_HDR_NORM, data.max_pq_y);
*out_avg = pl_hdr_rescale(PL_HDR_PQ, PL_HDR_NORM, data.avg_pq_y);
return true;
}
void pl_reset_detected_peak(pl_shader_obj state)
{
if (!state || state->type != PL_SHADER_OBJ_COLOR_MAP)
......
......@@ -653,8 +653,8 @@ static void pl_shader_tests(pl_gpu gpu)
.height = fbo->params.h,
}));
float peak, avg;
REQUIRE(pl_get_detected_peak(peak_state, &peak, &avg));
struct pl_hdr_metadata hdr;
REQUIRE(pl_get_detected_hdr_metadata(peak_state, &hdr));
float real_peak = 0, real_avg = 0;
for (int y = 0; y < FBO_H; y++) {
......@@ -669,11 +669,8 @@ static void pl_shader_tests(pl_gpu gpu)
}
}
real_avg = real_avg / (FBO_W * FBO_H);
real_avg = pl_hdr_rescale(PL_HDR_PQ, PL_HDR_NORM, real_avg);
real_peak = pl_hdr_rescale(PL_HDR_PQ, PL_HDR_NORM, real_peak);
REQUIRE_FEQ(peak, real_peak, 1e-3);
REQUIRE_FEQ(avg, real_avg, 1e-2);
REQUIRE_FEQ(hdr.max_pq_y, real_peak, 1e-4);
REQUIRE_FEQ(hdr.avg_pq_y, real_avg, 1e-3);
}
pl_dispatch_abort(dp, &sh);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment