ref: ab7eb1535dfb55984c43e021dfa676158f2d0d3c
parent: 96b5b3965ef4355776917b9b1fdb233d183c0f0d
author: Karina <ruil2@cisco.com>
date: Wed Nov 25 09:21:44 EST 2015
add minqp and maxqp parameters in console
--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -308,6 +308,10 @@
fprintf (stderr, "Invalid max overall bitrate setting due to RC enabled. Check MaxOverallBitrate field please!\n");
return 1;
}
+ } else if (strTag[0].compare ("MaxQp") == 0) {
+ pSvcParam.iMaxQp = atoi (strTag[1].c_str());
+ } else if (strTag[0].compare ("MinQp") == 0) {
+ pSvcParam.iMinQp = atoi (strTag[1].c_str());
} else if (strTag[0].compare ("EnableDenoise") == 0) {
pSvcParam.bEnableDenoise = atoi (strTag[1].c_str()) ? true : false;
} else if (strTag[0].compare ("EnableSceneChangeDetection") == 0) {
@@ -399,6 +403,8 @@
printf (" -rc rate control mode: 0-quality mode; 1-bitrate mode; 2-bitrate limited mode; -1-rc off \n");
printf (" -tarb Overall target bitrate\n");
printf (" -maxbrTotal Overall max bitrate\n");
+ printf (" -maxqp Maximum Qp\n");
+ printf (" -minqp Minimum Qp\n");
printf (" -numl Number Of Layers: Must exist with layer_cfg file and the number of input layer_cfg file must equal to the value set by this command\n");
printf (" The options below are layer-based: (need to be set with layer id)\n");
printf (" -lconfig (Layer) (spatial layer configure file)\n");
@@ -527,6 +533,12 @@
else if (!strcmp (pCommand, "-maxbrTotal") && (n < argc))
pSvcParam.iMaxBitrate = 1000 * atoi (argv[n++]);
+
+ else if (!strcmp (pCommand, "-maxqp") && (n < argc))
+ pSvcParam.iMaxQp = atoi (argv[n++]);
+
+ else if (!strcmp (pCommand, "-minqp") && (n < argc))
+ pSvcParam.iMinQp = atoi (argv[n++]);
else if (!strcmp (pCommand, "-numl") && (n < argc)) {
pSvcParam.iSpatialLayerNum = atoi (argv[n++]);
--- a/testbin/welsenc.cfg
+++ b/testbin/welsenc.cfg
@@ -34,7 +34,8 @@
TargetBitrate 5000 # Unit: kbps, controled by EnableRC also
MaxOverallBitrate 0 # Unit: kbps, max bitrate overall, 0 - unspecified
EnableFrameSkip 1 #Enable Frame Skip
-
+MaxQp 51 # maximum quant
+MinQp 0 # minimum quant
#============================== DENOISE CONTROL ==============================
EnableDenoise 0 # Enable Denoise (1: enable, 0: disable)
--- a/testbin/welsenc_arbitrary_res.cfg
+++ b/testbin/welsenc_arbitrary_res.cfg
@@ -33,7 +33,8 @@
RCMode 0 # 0: quality mode; 1: bitrate mode; # 2: buffer based mode,can't control bitrate; -1: rc off mode;
TargetBitrate 5000 # Unit: kbps, controled by EnableRC also
MaxOverallBitrate 6000 # Unit: kbps, max bitrate overall
-
+MaxQp 51 # maximum quant
+MinQp 0 # minimum quant
#============================== DENOISE CONTROL ==============================
EnableDenoise 0 # Enable Denoise (1: enable, 0: disable)
--- a/testbin/welsenc_ios.cfg
+++ b/testbin/welsenc_ios.cfg
@@ -34,7 +34,8 @@
TargetBitrate 5000 # Unit: kbps, controled by EnableRC also
MaxOverallBitrate 6000 # Unit: kbps, max bitrate overall
EnableFrameSkip 1 #Enable Frame Skip
-
+MaxQp 51 # maximum quant
+MinQp 0 # minimum quant
#============================== DENOISE CONTROL ==============================
EnableDenoise 0 # Enable Denoise (1: enable, 0: disable)
--- a/testbin/welsenc_vd_1d.cfg
+++ b/testbin/welsenc_vd_1d.cfg
@@ -33,7 +33,8 @@
RCMode 0 # 0: quality mode; 1: bitrate mode; # 2: buffer based mode,can't control bitrate; -1: rc off mode;
TargetBitrate 5000 # Unit: kbps, controled by EnableRC also
MaxOverallBitrate 6000 # Unit: kbps, max bitrate overall
-
+MaxQp 51 # maximum quant
+MinQp 0 # minimum quant
#============================== DENOISE CONTROL ==============================
EnableDenoise 0 # Enable Denoise (1: enable, 0: disable)
--- a/testbin/welsenc_vd_rc.cfg
+++ b/testbin/welsenc_vd_rc.cfg
@@ -33,7 +33,8 @@
RCMode 0 # 0: quality mode; 1: bitrate mode; # 2: buffer based mode,can't control bitrate; -1: rc off mode;
TargetBitrate 600 # Unit: kbps, controled by EnableRC also
MaxOverallBitrate 800 # Unit: kbps, max bitrate overall
-
+MaxQp 51 # maximum quant
+MinQp 0 # minimum quant
#============================== DENOISE CONTROL ==============================
EnableDenoise 1 # Enable Denoise (1: enable, 0: disable)