aboutsummaryrefslogtreecommitdiff
path: root/src/capture/xcomposite.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-06-23 01:02:40 +0200
committerdec05eba <dec05eba@protonmail.com>2024-06-23 01:02:40 +0200
commitd21ada4b19f506c4ce4745564c613a09a45cfb30 (patch)
treeb8470efecdb2f3a8ef55cb0b2f3cf029e79212ce /src/capture/xcomposite.c
parent45e6f87d588883fb7a0416d2b45a7848711cb7a6 (diff)
temp
Diffstat (limited to 'src/capture/xcomposite.c')
-rw-r--r--src/capture/xcomposite.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/capture/xcomposite.c b/src/capture/xcomposite.c
index 3240ed8..edb1f41 100644
--- a/src/capture/xcomposite.c
+++ b/src/capture/xcomposite.c
@@ -135,24 +135,8 @@ int gsr_capture_xcomposite_start(gsr_capture_xcomposite *self, AVCodecContext *v
if(self->params.region_size.x > 0 && self->params.region_size.y > 0)
video_size = self->params.region_size;
- if(self->params.egl->gpu_info.vendor == GSR_GPU_VENDOR_AMD && video_codec_context->codec_id == AV_CODEC_ID_HEVC) {
- // TODO: dont do this if using ffmpeg reports that this is not needed (AMD driver bug that was fixed recently)
- video_codec_context->width = FFALIGN(video_size.x, 64);
- video_codec_context->height = FFALIGN(video_size.y, 16);
- } else if(self->params.egl->gpu_info.vendor == GSR_GPU_VENDOR_AMD && video_codec_context->codec_id == AV_CODEC_ID_AV1) {
- // TODO: Dont do this for VCN 5 and forward which should fix this hardware bug
- video_codec_context->width = FFALIGN(video_size.x, 64);
- // AMD driver has special case handling for 1080 height to set it to 1082 instead of 1088 (1080 aligned to 16).
- // TODO: Set height to 1082 in this case, but it wont work because it will be aligned to 1088.
- if(video_size.y == 1080) {
- video_codec_context->height = 1080;
- } else {
- video_codec_context->height = FFALIGN(video_size.y, 16);
- }
- } else {
- video_codec_context->width = FFALIGN(video_size.x, 2);
- video_codec_context->height = FFALIGN(video_size.y, 2);
- }
+ video_codec_context->width = FFALIGN(video_size.x, 2);
+ video_codec_context->height = FFALIGN(video_size.y, 2);
frame->width = video_codec_context->width;
frame->height = video_codec_context->height;