Add support for ROCJPEG_OUTPUT_RGB_PLANAR output format (#15)

* Add support for ROCJPEG_OUTPUT_RGB_PLANAR output format

* update the jpegdecode sample based on the review comments

* use make_float3 when it's possible
Este commit está contenido en:
Aryan Salmanpour
2024-04-16 18:27:22 -04:00
cometido por GitHub
padre 63dc882415
commit c591c342aa
Se han modificado 10 ficheros con 937 adiciones y 224 borrados
+8 -3
Ver fichero
@@ -224,9 +224,14 @@ 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 (output_format == ROCJPEG_OUTPUT_RGB && current_vcn_jpeg_spec_.can_convert_to_rgb) {
surface_format = VA_RT_FORMAT_RGB32;
surface_attrib.value.value.i = VA_FOURCC_RGBA;
if ((output_format == ROCJPEG_OUTPUT_RGB || output_format == ROCJPEG_OUTPUT_RGB_PLANAR) && current_vcn_jpeg_spec_.can_convert_to_rgb) {
if (output_format == ROCJPEG_OUTPUT_RGB) {
surface_format = VA_RT_FORMAT_RGB32;
surface_attrib.value.value.i = VA_FOURCC_RGBA;
} else if (output_format == ROCJPEG_OUTPUT_RGB_PLANAR) {
surface_format = VA_RT_FORMAT_RGBP;
surface_attrib.value.value.i = VA_FOURCC_RGBP;
}
} else {
switch (jpeg_stream_params->chroma_subsampling) {
case CSS_444: