rename some macros so it doesn't clash with others (#510)
* rename macros so not to clash with others * modified macro in all samples
This commit is contained in:
1 förälder
2af7bbf4e7
incheckning
c4fe8f5258
7 files changed
+24
-28
No files matched your search
@@ -47,7 +47,7 @@ void ShowHelpAndExit(const char *option = NULL) {
|
||||
<< "-i Input File Path - required" << std::endl
|
||||
<< "-o Output File Path - dumps output if requested; optional" << std::endl
|
||||
<< "-d GPU device ID (0 for the first device, 1 for the second, etc.); optional; default: 0" << std::endl
|
||||
<< "-backend backend (0 for GPU, 1 CPU-FFMpeg, 2 CPU-FFMpeg No threading); optional; default: 0" << std::endl
|
||||
<< "-backend backend (0 for GPU, 1 CPU-FFMpeg); optional; default: 0" << std::endl
|
||||
<< "-f Number of decoded frames - specify the number of pictures to be decoded; optional" << std::endl
|
||||
<< "-z force_zero_latency (force_zero_latency, Decoded frames will be flushed out for display immediately); optional;" << std::endl
|
||||
<< "-disp_delay -specify the number of frames to be delayed for display; optional; default: 1" << std::endl
|
||||
@@ -262,10 +262,7 @@ int main(int argc, char **argv) {
|
||||
std::cout << "info: RocDecode is using CPU backend!" << std::endl;
|
||||
bool use_threading = false;
|
||||
if (mem_type == OUT_SURFACE_MEM_DEV_INTERNAL) mem_type = OUT_SURFACE_MEM_DEV_COPIED; // mem_type internal is not supported in this mode
|
||||
if (backend == 1) {
|
||||
viddec = new FFMpegVideoDecoder(device_id, mem_type, rocdec_codec_id, b_force_zero_latency, p_crop_rect, b_extract_sei_messages, disp_delay);
|
||||
} else
|
||||
viddec = new FFMpegVideoDecoder(device_id, mem_type, rocdec_codec_id, b_force_zero_latency, p_crop_rect, b_extract_sei_messages, disp_delay, true);
|
||||
viddec = new FFMpegVideoDecoder(device_id, mem_type, rocdec_codec_id, b_force_zero_latency, p_crop_rect, b_extract_sei_messages, disp_delay, true);
|
||||
}
|
||||
|
||||
if(!viddec->CodecSupported(device_id, rocdec_codec_id, bit_depth)) {
|
||||
|
||||
@@ -274,13 +274,13 @@ int main(int argc, char **argv) {
|
||||
return -1;
|
||||
}
|
||||
if (num_devices < 1) {
|
||||
ERR("ERROR: didn't find any GPU!");
|
||||
ROCDEC_ERR("ERROR: didn't find any GPU!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
hip_status = hipGetDeviceProperties(&hip_dev_prop, device_id);
|
||||
if (hip_status != hipSuccess) {
|
||||
ERR("ERROR: hipGetDeviceProperties for device (" +TOSTR(device_id) + " ) failed! (" + hipGetErrorName(hip_status) + ")" );
|
||||
ROCDEC_ERR("ERROR: hipGetDeviceProperties for device (" +TOSTR(device_id) + " ) failed! (" + hipGetErrorName(hip_status) + ")" );
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -363,7 +363,7 @@ int main(int argc, char **argv) {
|
||||
std::unique_ptr<RocVideoDecoder> dec_8bit_vp9(new RocVideoDecoder(v_dec_info[i]->dec_device_id, mem_type, v_dec_info[i]->rocdec_codec_id, b_force_zero_latency, p_crop_rect, b_extract_sei_messages, disp_delay));
|
||||
v_dec_info[i]->viddec = std::move(dec_8bit_vp9);
|
||||
} else {
|
||||
ERR("ERROR: codec type is not supported!");
|
||||
ROCDEC_ERR("ERROR: codec type is not supported!");
|
||||
return -1;
|
||||
}
|
||||
} else { //bit depth = 10bit
|
||||
@@ -377,7 +377,7 @@ int main(int argc, char **argv) {
|
||||
std::unique_ptr<RocVideoDecoder> dec_10bit_vp9(new RocVideoDecoder(v_dec_info[i]->dec_device_id, mem_type, v_dec_info[i]->rocdec_codec_id, b_force_zero_latency, p_crop_rect, b_extract_sei_messages, disp_delay));
|
||||
v_dec_info[i]->viddec = std::move(dec_10bit_vp9);
|
||||
} else {
|
||||
ERR("ERROR: codec type is not supported!");
|
||||
ROCDEC_ERR("ERROR: codec type is not supported!");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -424,7 +424,7 @@ int main(int argc, char **argv) {
|
||||
} else if (codec_id == rocDecVideoCodec_VP9) {
|
||||
v_dec_info[thread_idx]->viddec.swap(dec_8bit_vp9);
|
||||
} else {
|
||||
ERR("ERROR: codec type is not supported!");
|
||||
ROCDEC_ERR("ERROR: codec type is not supported!");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -448,7 +448,7 @@ int main(int argc, char **argv) {
|
||||
} else if (codec_id == rocDecVideoCodec_VP9) {
|
||||
v_dec_info[thread_idx]->viddec.swap(dec_10bit_vp9);
|
||||
} else {
|
||||
ERR("ERROR: codec type is not supported!");
|
||||
ROCDEC_ERR("ERROR: codec type is not supported!");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,13 +178,13 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
if (num_devices < 1) {
|
||||
ERR("ERROR: didn't find any GPU!");
|
||||
ROCDEC_ERR("ERROR: didn't find any GPU!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
hip_status = hipGetDeviceProperties(&hip_dev_prop, device_id);
|
||||
if (hip_status != hipSuccess) {
|
||||
ERR("ERROR: hipGetDeviceProperties for device (" +TOSTR(device_id) + " ) failed! (" + hipGetErrorName(hip_status) + ")" );
|
||||
ROCDEC_ERR("ERROR: hipGetDeviceProperties for device (" +TOSTR(device_id) + " ) failed! (" + hipGetErrorName(hip_status) + ")" );
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -391,12 +391,12 @@ int main(int argc, char **argv) {
|
||||
return -1;
|
||||
}
|
||||
if (num_devices < 1) {
|
||||
ERR("ERROR: didn't find any GPU!");
|
||||
ROCDEC_ERR("ERROR: didn't find any GPU!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (hipSuccess != hipGetDeviceProperties(&hip_dev_prop, device_id)) {
|
||||
ERR("ERROR: hipGetDeviceProperties for device (" +TOSTR(device_id) + " ) failed! (" + hipGetErrorName(hip_status) + ")" );
|
||||
ROCDEC_ERR("ERROR: hipGetDeviceProperties for device (" +TOSTR(device_id) + " ) failed! (" + hipGetErrorName(hip_status) + ")" );
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user