From 2e2c330953d765f601fd2e809a9bb1480fdb8b3a Mon Sep 17 00:00:00 2001 From: Aryan Salmanpour Date: Thu, 10 Oct 2024 15:42:38 -0400 Subject: [PATCH] Exclude YUV 4:4:0 for RGB format conversion in VCN on MI300, as it is not supported. Instead, use HIP kernels. (#63) [ROCm/rocjpeg commit: de144cd941648fa04aaaebbeaad6b4c1311b9f86] --- projects/rocjpeg/src/rocjpeg_vaapi_decoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/rocjpeg/src/rocjpeg_vaapi_decoder.cpp b/projects/rocjpeg/src/rocjpeg_vaapi_decoder.cpp index e28e4d4df2..92841971e4 100644 --- a/projects/rocjpeg/src/rocjpeg_vaapi_decoder.cpp +++ b/projects/rocjpeg/src/rocjpeg_vaapi_decoder.cpp @@ -574,7 +574,7 @@ RocJpegStatus RocJpegVappiDecoder::SubmitDecode(const JpegStreamParameters *jpeg // If RGB output format is requested, and the HW JPEG decoder has a built-in format conversion, // set the RGB surface format and attributes to obtain the RGB output directly from the JPEG HW decoder. // otherwise set the appropriate surface format and attributes based on the chroma subsampling of the image. - if ((decode_params->output_format == ROCJPEG_OUTPUT_RGB || decode_params->output_format == ROCJPEG_OUTPUT_RGB_PLANAR) && current_vcn_jpeg_spec_.can_convert_to_rgb) { + if ((decode_params->output_format == ROCJPEG_OUTPUT_RGB || decode_params->output_format == ROCJPEG_OUTPUT_RGB_PLANAR) && current_vcn_jpeg_spec_.can_convert_to_rgb && jpeg_stream_params->chroma_subsampling != CSS_440) { if (decode_params->output_format == ROCJPEG_OUTPUT_RGB) { surface_format = VA_RT_FORMAT_RGB32; surface_attrib.value.value.i = VA_FOURCC_RGBA; @@ -696,7 +696,7 @@ RocJpegStatus RocJpegVappiDecoder::SubmitDecodeBatched(JpegStreamParameters *jpe return ROCJPEG_STATUS_JPEG_NOT_SUPPORTED; } - if ((decode_params->output_format == ROCJPEG_OUTPUT_RGB || decode_params->output_format == ROCJPEG_OUTPUT_RGB_PLANAR) && current_vcn_jpeg_spec_.can_convert_to_rgb) { + if ((decode_params->output_format == ROCJPEG_OUTPUT_RGB || decode_params->output_format == ROCJPEG_OUTPUT_RGB_PLANAR) && current_vcn_jpeg_spec_.can_convert_to_rgb && jpeg_streams_params[i].chroma_subsampling != CSS_440) { if (decode_params->output_format == ROCJPEG_OUTPUT_RGB) { jpeg_stream_key.surface_format = VA_RT_FORMAT_RGB32; jpeg_stream_key.pixel_format = VA_FOURCC_RGBA;