فهرست منبع

obs-nvenc: Fix incorrect CUDA array size allocation

Fix cuda array use 2 bytes per element instead of 4 bytes with P010 format.

(cherry picked from commit ecb99e3b345c1c15c5aae641ab159c19506a89d1)
Bo 7 ماه پیش
والد
کامیت
7cb45aa3f1
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 1 2
      plugins/obs-nvenc/nvenc-cuda.c

+ 1 - 2
plugins/obs-nvenc/nvenc-cuda.c

@@ -118,9 +118,8 @@ static bool cuda_surface_init(struct nvenc_data *enc, struct nv_cuda_surface *nv
 			desc.Height += enc->cy / 2;
 			break;
 		case NV_ENC_BUFFER_FORMAT_YUV420_10BIT:
-			desc.Format = CU_AD_FORMAT_UNSIGNED_INT16;
+			desc.Format = CU_AD_FORMAT_UNSIGNED_INT16; // 2 bytes per element
 			desc.Height += enc->cy / 2;
-			desc.NumChannels = 2; // number of bytes per element
 			break;
 		case NV_ENC_BUFFER_FORMAT_YUV444:
 			desc.Format = CU_AD_FORMAT_UNSIGNED_INT8;