ref: dbccc2a56e3e55750f4e105097f258c48db4387b
parent: bc83179c078fcc498d8d4ee3490c2acebc9cbf9c
author: karina <ruil2@cisco.com>
date: Mon Oct 23 06:49:55 EDT 2017
add complexity mode configure in console app and configure files
--- a/codec/api/svc/codec_app_def.h
+++ b/codec/api/svc/codec_app_def.h
@@ -491,7 +491,7 @@
* @brief Enumulate the complexity mode
*/
typedef enum {
- LOW_COMPLEXITY, ///< the lowest compleixty,the fastest speed,
+ LOW_COMPLEXITY = 0 , ///< the lowest compleixty,the fastest speed,
MEDIUM_COMPLEXITY, ///< medium complexity, medium speed,medium quality
HIGH_COMPLEXITY ///< high complexity, lowest speed, high quality
} ECOMPLEXITY_MODE;
--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -272,7 +272,9 @@
pSvcParam.bEnableFrameCroppingFlag = (atoi (strTag[1].c_str()) != 0);
} else if (strTag[0].compare ("EntropyCodingModeFlag") == 0) {
pSvcParam.iEntropyCodingModeFlag = (atoi (strTag[1].c_str()) != 0);
- } else if (strTag[0].compare ("LoopFilterDisableIDC") == 0) {
+ } else if (strTag[0].compare ("ComplexityMode") == 0) {
+ pSvcParam.iComplexityMode = (ECOMPLEXITY_MODE)(atoi (strTag[1].c_str()));
+ }else if (strTag[0].compare ("LoopFilterDisableIDC") == 0) {
pSvcParam.iLoopFilterDisableIdc = (int8_t)atoi (strTag[1].c_str());
if (pSvcParam.iLoopFilterDisableIdc > 6 || pSvcParam.iLoopFilterDisableIdc < 0) {
fprintf (stderr, "Invalid parameter in iLoopFilterDisableIdc: %d.\n", pSvcParam.iLoopFilterDisableIdc);
@@ -398,6 +400,7 @@
printf (" -nalsize the Maximum NAL size. which should be larger than the each layer slicesize when slice mode equals to SM_SIZELIMITED_SLICE\n");
printf (" -spsid SPS/PPS id strategy: 0:const, 1: increase, 2: sps list, 3: sps list and pps increase, 4: sps/pps list\n");
printf (" -cabac Entropy coding mode(0:cavlc 1:cabac \n");
+ printf (" -complexity Complexity mode (default: 0),0: low complexity, 1: medium complexity, 2: high complexity\n");
printf (" -denois Control denoising (default: 0)\n");
printf (" -scene Control scene change detection (default: 0)\n");
printf (" -bgd Control background detection (default: 0)\n");
@@ -495,6 +498,9 @@
}
} else if (!strcmp (pCommand, "-cabac") && (n < argc))
pSvcParam.iEntropyCodingModeFlag = atoi (argv[n++]);
+
+ else if (!strcmp (pCommand, "-complexity") && (n < argc))
+ pSvcParam.iComplexityMode = (ECOMPLEXITY_MODE)atoi (argv[n++]);
else if (!strcmp (pCommand, "-denois") && (n < argc))
pSvcParam.bEnableDenoise = atoi (argv[n++]) ? true : false;
--- a/testbin/welsenc.cfg
+++ b/testbin/welsenc.cfg
@@ -17,6 +17,7 @@
EnableFrameCropping 1 # enable frame cropping flag
EntropyCodingModeFlag 0 #0:cavlc 1:cabac
MaxNalSize 0 # Unit:Byte, Maximum Nal size
+ComplexityMode 0 #0:low complexity mode 1:medium complexity mode 2:high complexity mode
#============================== LOOP FILTER ==============================
LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off,
# 2: on except for slice boundaries,
--- a/testbin/welsenc_arbitrary_res.cfg
+++ b/testbin/welsenc_arbitrary_res.cfg
@@ -17,6 +17,7 @@
EnableFrameCropping 1 # enable frame cropping flag
EntropyCodingModeFlag 0 #0:cavlc 1:cabac
MaxNalSize 0 # Unit:Byte, Maximum Nal size
+ComplexityMode 0 #0:low complexity mode 1:medium complexity mode 2:high complexity mode
#============================== LOOP FILTER ==============================
LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off,
# 2: on except for slice boundaries,
--- a/testbin/welsenc_ios.cfg
+++ b/testbin/welsenc_ios.cfg
@@ -17,6 +17,7 @@
EnableFrameCropping 1 # enable frame cropping flag
EntropyCodingModeFlag 0 #0:cavlc 1:cabac
MaxNalSize 0 # Unit:Byte, Maximum Nal size
+ComplexityMode 0 #0:low complexity mode 1:medium complexity mode 2:high complexity mode
#============================== LOOP FILTER ==============================
LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off,
# 2: on except for slice boundaries,
--- a/testbin/welsenc_vd_1d.cfg
+++ b/testbin/welsenc_vd_1d.cfg
@@ -17,6 +17,7 @@
EnableFrameCropping 1 # enable frame cropping flag
EntropyCodingModeFlag 0 #0:cavlc 1:cabac
MaxNalSize 0 # Unit:Byte, Maximum Nal size
+ComplexityMode 0 #0:low complexity mode 1:medium complexity mode 2:high complexity mode
#============================== LOOP FILTER ==============================
LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off,
# 2: on except for slice boundaries,
--- a/testbin/welsenc_vd_rc.cfg
+++ b/testbin/welsenc_vd_rc.cfg
@@ -17,6 +17,7 @@
EnableFrameCropping 1 # enable frame cropping flag
EntropyCodingModeFlag 0 #0:cavlc 1:cabac
MaxNalSize 0 # Unit:Byte, Maximum Nal size
+ComplexityMode 0 #0:low complexity mode 1:medium complexity mode 2:high complexity mode
#============================== LOOP FILTER ==============================
LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off,
# 2: on except for slice boundaries,