From 2253957c11823cf7bdf084f0d80386d4963f88c4 Mon Sep 17 00:00:00 2001 From: jojo61 Date: Tue, 20 Nov 2018 16:05:38 +0100 Subject: [PATCH] More Konfigs nad skindesigner fixes --- softhdcuvid.cpp | 5 +++-- video.c | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/softhdcuvid.cpp b/softhdcuvid.cpp index 6e0e774..5376751 100644 --- a/softhdcuvid.cpp +++ b/softhdcuvid.cpp @@ -1079,9 +1079,10 @@ void cMenuSetupSoft::Create(void) (int *)&Background, 0, 0x00FFFFFF)); Add(new cMenuEditIntItem(tr("Video background color (Alpha)"), (int *)&BackgroundAlpha, 0, 0xFF)); - Add(new cMenuEditBoolItem(tr("Use studio levels (vdpau only)"), - &StudioLevels, trVDR("no"), trVDR("yes"))); #endif + Add(new cMenuEditBoolItem(tr("Use studio levels"), + &StudioLevels, trVDR("no"), trVDR("yes"))); + Add(new cMenuEditBoolItem(tr("60hz display mode"), &_60HzMode, trVDR("no"), trVDR("yes"))); Add(new cMenuEditBoolItem(tr("Soft start a/v sync"), &SoftStartSync, diff --git a/video.c b/video.c index 885961d..7cd94b7 100644 --- a/video.c +++ b/video.c @@ -3448,6 +3448,7 @@ static void CuvidMixVideo(CuvidDecoder * decoder, int level) memcpy(&img->color,&pl_color_space_bt709,sizeof(struct pl_color_space)); // img->color.primaries = PL_COLOR_PRIM_BT_709; // img->color.transfer = PL_COLOR_TRC_BT_1886; +// img->color.light = PL_COLOR_LIGHT_SCENE_709_1886; // img->color.light = PL_COLOR_LIGHT_DISPLAY; break; case AVCOL_SPC_BT2020_NCL: @@ -3592,7 +3593,7 @@ static void CuvidDisplayFrame(void) last_time = GetusTicks(); if (!p->swapchain) return; - + usleep(1000); if (!pl_swapchain_start_frame(p->swapchain, &frame)) { // get new frame usleep(10); } @@ -3602,7 +3603,10 @@ static void CuvidDisplayFrame(void) pl_tex_clear(p->gpu,target.fbo,black); // clear frame target.repr.sys = PL_COLOR_SYSTEM_RGB; - target.repr.levels = PL_COLOR_LEVELS_PC; + if (VideoStudioLevels) + target.repr.levels = PL_COLOR_LEVELS_PC; + else + target.repr.levels = PL_COLOR_LEVELS_TV; target.repr.alpha = PL_ALPHA_UNKNOWN; // target.repr.bits.sample_depth = 16; // target.repr.bits.color_depth = 16;