* rocDecode: Set the correct surface format for high bit depths. (#339)

- No functional changes as surface format does not affect the actual allocation of the VA surface in this call due to IHV specific implementation. The app still needs to set the format correctly.

Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>

[ROCm/rocdecode commit: 21ae1d010a]
이 커밋은 다음에 포함됨:
jeffqjiangNew그리고Aryan Salmanpour 작성하고 GitHub가 2024-05-06 08:09:23 -04:00를 커밋함
1 부모 7ea07e5477
커밋 0ac8dd3bae
1 파일이 변경됨
+8 -2
+8 -2
파일 보기
@@ -168,13 +168,19 @@ rocDecStatus VaapiVideoDecoder::CreateSurfaces() {
return ROCDEC_INVALID_PARAMETER;
}
va_surface_ids_.resize(decoder_create_info_.num_decode_surfaces);
uint8_t surface_format;
uint32_t surface_format;
switch (decoder_create_info_.chroma_format) {
case rocDecVideoChromaFormat_Monochrome:
surface_format = VA_RT_FORMAT_YUV400;
break;
case rocDecVideoChromaFormat_420:
surface_format = VA_RT_FORMAT_YUV420;
if (decoder_create_info_.bit_depth_minus_8 == 2) {
surface_format = VA_RT_FORMAT_YUV420_10;
} else if (decoder_create_info_.bit_depth_minus_8 == 4) {
surface_format = VA_RT_FORMAT_YUV420_12;
} else {
surface_format = VA_RT_FORMAT_YUV420;
}
break;
case rocDecVideoChromaFormat_422:
surface_format = VA_RT_FORMAT_YUV422;