mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-11 16:59:43 -04:00
obs-nvenc: Fix incorrect CUDA array size allocation
Fix cuda array use 2 bytes per element instead of 4 bytes with P010 format.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user