Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
e6b30a03 by Niklas Haas at 2023-09-18T05:16:03+00:00
libplacebo/display: prevent ICC 3DLUT cache collisions
Since these 3DLUTs may be persistently cached, we run into the risk of
cache collisions if the profile signature does not uniquely identify the
actual profile used. This invalidates our previous design of simply
incrementing the signature on change.
Instead, explicitly compute this, and cache the result until the next
time UpdateIccProfile gets called.
Fixes: db063d7f513dde5b95ba8560bb8a0323cded738c
- - - - -
1 changed file:
- modules/video_output/libplacebo/display.c
Changes:
=====================================
modules/video_output/libplacebo/display.c
=====================================
@@ -286,9 +286,13 @@ static void PictureRender(vout_display_t *vd, picture_t
*pic,
struct pl_frame target;
pl_frame_from_swapchain(&target, &frame);
if (vd->cfg->icc_profile) {
- target.profile.signature = sys->target_icc_signature;
target.profile.data = vd->cfg->icc_profile->data;
target.profile.len = vd->cfg->icc_profile->size;
+ target.profile.signature = sys->target_icc_signature;
+ if (!target.profile.signature) {
+ pl_icc_profile_compute_signature(&target.profile);
+ sys->target_icc_signature = target.profile.signature;
+ }
}
// Set the target crop dynamically based on the swapchain flip state
@@ -520,7 +524,7 @@ static void UpdateColorspaceHint(vout_display_t *vd, const
video_format_t *fmt)
static void UpdateIccProfile(vout_display_t *vd, const vlc_icc_profile_t *prof)
{
vout_display_sys_t *sys = vd->sys;
- sys->target_icc_signature++;
+ sys->target_icc_signature = 0; /* recompute signature on next
PictureRender */
(void) prof; /* we get the current value from vout_display_cfg_t */
}
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/e6b30a03b2d04f3061b5f005b954ee47868ffa4c
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/e6b30a03b2d04f3061b5f005b954ee47868ffa4c
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits