vout: libplacebo: forward ICC profiles to libplacebo

Straightforward. Since pl_icc_profile_compute_signature is fast, we can
call it on every frame without real worry. This is usually only relevant
for still images anyways.
This commit is contained in:
Niklas Haas 2022-05-24 14:10:29 +02:00 committed by Steve Lhomme
parent ac861b4736
commit 489f704591
1 changed files with 11 additions and 0 deletions

View File

@ -28,6 +28,7 @@
#endif
#include <vlc_common.h>
#include <vlc_ancillary.h>
#include <vlc_plugin.h>
#include <vlc_vout_display.h>
#include <vlc_fs.h>
@ -257,6 +258,16 @@ static void PictureRender(vout_display_t *vd, picture_t *pic,
vlc_placebo_DoviMetadata(&img, pic, &sys->dovi_metadata);
#endif
#if PL_API_VER >= 96
struct vlc_ancillary *iccp = picture_GetAncillary(pic, VLC_ANCILLARY_ID_ICC);
if (iccp) {
vlc_icc_profile_t *icc = vlc_ancillary_GetData(iccp);
img.profile.data = icc->data;
img.profile.len = icc->size;
pl_icc_profile_compute_signature(&img.profile);
}
#endif
// Upload the image data for each plane
struct pl_plane_data data[4];
if (!vlc_placebo_PlaneData(pic, data, NULL)) {