Samples - updates & fixes (#47)

* Samples - updates & fixes

* use std::cerr

[ROCm/rocjpeg commit: 45b7944064]
This commit is contained in:
Aryan Salmanpour
2024-07-25 14:04:20 -04:00
committed by GitHub
parent 52403fcf28
commit a885d6178e
3 changed files with 29 additions and 6 deletions
@@ -104,7 +104,16 @@ int main(int argc, char **argv) {
CHECK_ROCJPEG(rocJpegGetImageInfo(rocjpeg_handle, rocjpeg_stream_handles[index], &num_components, &subsamplings[index], widths[index].data(), heights[index].data()));
rocjpeg_utils.GetChromaSubsamplingStr(subsamplings[index], chroma_sub_sampling);
if (subsamplings[index] == ROCJPEG_CSS_411) {
if (widths[index][0] < 64 || heights[index][0] < 64) {
std::cerr << "The image resolution is not supported by VCN Hardware" << std::endl;
if (is_dir) {
std::cout << std::endl;
continue;
} else
return EXIT_FAILURE;
}
if (subsamplings[index] == ROCJPEG_CSS_411 || subsamplings[index] == ROCJPEG_CSS_UNKNOWN) {
std::cerr << "The chroma sub-sampling is not supported by VCN Hardware" << std::endl;
if (is_dir) {
std::cout << std::endl;