aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-04-01 13:48:59 +0200
committerdec05eba <dec05eba@protonmail.com>2023-04-01 13:48:59 +0200
commit162eac8c2f460ac8231696b511785d69bb7c97ff (patch)
treef6d9960331048b89e0aeee1ba1d0fb3126d4cf17 /src
parent8c6e52631816a0fb50f3277f8ae0fcae1747eeee (diff)
Xsync after overclock (and reset), dont set colorspace data
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp8
-rw-r--r--src/overclock.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 4cd8682..7a268d6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -375,10 +375,10 @@ static AVCodecContext *create_video_codec_context(AVPixelFormat pix_fmt,
}
codec_context->max_b_frames = 0;
codec_context->pix_fmt = pix_fmt;
- codec_context->color_range = AVCOL_RANGE_JPEG;
- codec_context->color_primaries = AVCOL_PRI_BT709;
- codec_context->color_trc = AVCOL_TRC_BT709;
- codec_context->colorspace = AVCOL_SPC_BT709;
+ //codec_context->color_range = AVCOL_RANGE_MPEG;
+ //codec_context->color_primaries = AVCOL_PRI_BT709;
+ //codec_context->color_trc = AVCOL_TRC_BT709;
+ //codec_context->colorspace = AVCOL_SPC_BT709;
//codec_context->chroma_sample_location = AVCHROMA_LOC_CENTER;
if(codec->id == AV_CODEC_ID_HEVC)
codec_context->codec_tag = MKTAG('h', 'v', 'c', '1');
diff --git a/src/overclock.c b/src/overclock.c
index 7c0faad..9160a04 100644
--- a/src/overclock.c
+++ b/src/overclock.c
@@ -262,10 +262,12 @@ bool gsr_overclock_start(gsr_overclock *self) {
}
*/
+ XSync(self->xnvctrl.display, False);
return true;
}
void gsr_overclock_stop(gsr_overclock *self) {
xnvctrl_set_attribute_offset(&self->xnvctrl, self->num_performance_levels, 0, NVCTRL_ATTRIB_GPU_MEM_TRANSFER_RATE);
//xnvctrl_set_attribute_offset(&self->xnvctrl, self->num_performance_levels, 0, NVCTRL_GPU_NVCLOCK);
+ XSync(self->xnvctrl.display, False);
}