avfilter/tonemap_cl: fix code style

Co-authored-by: Nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
gnattu 2024-08-10 16:02:27 +08:00 committed by GitHub
parent c07f5f5c5a
commit 16c55918a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -280,7 +280,7 @@ Index: FFmpeg/libavfilter/opencl/colorspace_common.cl
+ return (float3)(r, g, b);
#else
- return c;
+ return (float3)(c.x, c.y, c.z);
+ return c;
#endif
}
@ -645,13 +645,13 @@ Index: FFmpeg/libavfilter/opencl/tonemap.cl
}
- return r;
+#ifdef TONE_FUNC_BT2390
+ float src_peak_delin_pq = inverse_eotf_st2084(peak);
+ float dst_peak_delin_pq = inverse_eotf_st2084(1.0f);
+ MAP_FOUR_PIXELS(i4, src_peak_delin_pq, dst_peak_delin_pq)
+ float src_peak_delin_pq = inverse_eotf_st2084(peak);
+ float dst_peak_delin_pq = inverse_eotf_st2084(1.0f);
+ MAP_FOUR_PIXELS(i4, src_peak_delin_pq, dst_peak_delin_pq)
+#else
+ i4 = eotf_st2084x4(i4);
+ MAP_FOUR_PIXELS(i4, peak, 1.0f)
+ i4 = inverse_eotf_st2084x4(i4);
+ i4 = eotf_st2084x4(i4);
+ MAP_FOUR_PIXELS(i4, peak, 1.0f)
+ i4 = inverse_eotf_st2084x4(i4);
+#endif
+ i4 = fmin(i4, 1.0f);
+ float4 factor = min(i4/i4_o, i4_o/i4);