diff --git a/cplusplus/level1_single_api/7_dvpp/vpc_sample/readme.md b/cplusplus/level1_single_api/7_dvpp/vpc_sample/readme.md index b754d43a3994732849a6405ec6158a3617c1ace6..2cee36112f36667678653a4c7d846448b327d01a 100644 --- a/cplusplus/level1_single_api/7_dvpp/vpc_sample/readme.md +++ b/cplusplus/level1_single_api/7_dvpp/vpc_sample/readme.md @@ -138,6 +138,7 @@ DVPP中的VPC功能模块,实现图片的抠图、缩放、边界填充、色 - in\_image\_file:输入图像文件的路径,包含文件名。 - out\_image\_file:输出图像文件的路径,包含文件名。 - thread\_num:线程数 + - queue_len:通道任务队列深度 - test\_type,该参数表示测试的功能类型,各取值的含义如下: - 1:抠图 - 2:缩放 diff --git a/cplusplus/level1_single_api/7_dvpp/vpc_sample/src/common/sample_comm.h b/cplusplus/level1_single_api/7_dvpp/vpc_sample/src/common/sample_comm.h index e38beb292aab38aebbdadd9077578f7a971bfca1..4b3708bdb42b1d37a7a9bece5450862f746ff501 100644 --- a/cplusplus/level1_single_api/7_dvpp/vpc_sample/src/common/sample_comm.h +++ b/cplusplus/level1_single_api/7_dvpp/vpc_sample/src/common/sample_comm.h @@ -96,6 +96,7 @@ struct VpcAttr { uint32_t destTopOffset{0}; uint32_t testType{0}; uint32_t chnNum{1}; + uint32_t queueLen{0}; uint32_t bitwidth{8}; // initialize the bit width to 8 uint32_t threadNum{1}; uint32_t loop{1}; diff --git a/cplusplus/level1_single_api/7_dvpp/vpc_sample/src/sample_vpc.cpp b/cplusplus/level1_single_api/7_dvpp/vpc_sample/src/sample_vpc.cpp index 0e14482ec9f55a340132ab6915968eac1739d44e..3f99e2b743aaa1654dbdbaaccf6601160fe7ff02 100644 --- a/cplusplus/level1_single_api/7_dvpp/vpc_sample/src/sample_vpc.cpp +++ b/cplusplus/level1_single_api/7_dvpp/vpc_sample/src/sample_vpc.cpp @@ -91,6 +91,9 @@ void get_option_1(int c) case 'V': g_vpc_attribute.outHeightAlign = atoi(optarg); break; + case 'l': + g_vpc_attribute.queueLen = atoi(optarg); + break; default: SAMPLE_PRT("this is default!\n"); break; @@ -107,6 +110,7 @@ void get_option(int argc, char **argv) {"in_format", 1, 0, 'f'}, {"in_bitwidth", 1, 0, 'b'}, {"chn_num", 1, 0, 'c'}, + {"queue_len", 1, 0, 'l'}, {"thread_num", 1, 0, 't'}, {"out_width", 1, 0, 'd'}, {"out_height", 1, 0, 'g'}, @@ -150,7 +154,7 @@ void get_option(int argc, char **argv) }; int32_t c = getopt_long(argc, argv, - "w:h:f:b:c:t:d:g:e:m:r:s:p:u:v:x:y:i:L:T:C:D:F:O:W:M:I:0:1:2:3:4:5:6:7:8:Q:U:P:N:X:Y:Z:V", + "w:h:f:b:c:l:t:d:g:e:m:r:s:p:u:v:x:y:i:L:T:C:D:F:O:W:M:I:0:1:2:3:4:5:6:7:8:Q:U:P:N:X:Y:Z:V", long_options, &option_index); if (c == -1) { break; @@ -280,7 +284,7 @@ int32_t test_entry_single_chnl(TEST_FUNC test_func) // create vpc channel hi_vpc_chn chnId; hi_vpc_chn_attr stChnAttr {}; - stChnAttr.attr = 0; + stChnAttr.attr = g_vpc_attribute.queueLen; s32Ret = hi_mpi_vpc_sys_create_chn(&chnId, &stChnAttr); if (s32Ret != HI_SUCCESS) { SAMPLE_PRT("Call hi_mpi_vpc_sys_create_chn failed, ret = %#x\n", s32Ret);