Samples - updates & fixes (#47)

* Samples - updates & fixes

* use std::cerr

[ROCm/rocjpeg commit: 45b7944064]
이 커밋은 다음에 포함됨:
Aryan Salmanpour
2024-07-25 14:04:20 -04:00
커밋한 사람 GitHub
부모 52403fcf28
커밋 a885d6178e
3개의 변경된 파일과 29개의 추가작업 그리고 6개의 파일을 삭제
+10 -4
파일 보기
@@ -71,15 +71,21 @@ void ThreadFunction(std::vector<std::string>& jpegFiles, RocJpegHandle rocjpeg_h
CHECK_ROCJPEG(rocJpegStreamParse(reinterpret_cast<uint8_t *>(file_data.data()), file_size, rocjpeg_stream));
CHECK_ROCJPEG(rocJpegGetImageInfo(rocjpeg_handle, rocjpeg_stream, &num_components, &subsampling, widths, heights));
if (subsampling == ROCJPEG_CSS_411) {
std::cout << "The chroma sub-sampling is not supported by VCN Hardware" << std::endl;
if (widths[0] < 64 || heights[0] < 64) {
std::cerr << "The image resolution is not supported by VCN Hardware" << std::endl;
std::cout << "Skipping decoding file " << base_file_name << std::endl;
return;
}
if (subsampling == ROCJPEG_CSS_411 || subsampling == ROCJPEG_CSS_UNKNOWN) {
std::cerr << "The chroma sub-sampling is not supported by VCN Hardware" << std::endl;
std::cout << "Skipping decoding file " << base_file_name << std::endl;
return;
}
if (rocjpeg_util.GetChannelPitchAndSizes(decode_params, subsampling, widths, heights, num_channels, *output_image, channel_sizes)) {
std::cerr << "ERROR: Failed to get the channel pitch and sizes" << std::endl;
return;
std::cerr << "ERROR: Failed to get the channel pitch and sizes" << std::endl;
return;
}
// allocate memory for each channel