ref: 13cdd4b5392dd602eede04c9e8a227f241b0d9cc
parent: bcf1af9ac102fabb2003be298b5de9672cc29492
author: ruil2 <ruil2@cisco.com>
date: Fri Apr 11 12:11:18 EDT 2014
add the number of LTR setting in configure file
--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -268,6 +268,8 @@
pSvcParam.bEnableFrameSkip = atoi (strTag[1].c_str()) ? true : false;
} else if (strTag[0].compare ("EnableLongTermReference") == 0) {
pSvcParam.bEnableLongTermReference = atoi (strTag[1].c_str()) ? true : false;
+ } else if (strTag[0].compare ("LongTermReferenceNumber") == 0) {
+ pSvcParam.iLTRRefNum = atoi (strTag[1].c_str());
} else if (strTag[0].compare ("LtrMarkPeriod") == 0) {
pSvcParam.iLtrMarkPeriod = (uint32_t)atoi (strTag[1].c_str());
} else if (strTag[0].compare ("NumLayers") == 0) {
@@ -347,6 +349,9 @@
else if (!strcmp (pCmd, "-ltr") && (i < argc))
sParam.bEnableLongTermReference = atoi (argv[i++]) ? true : false;
+ else if (!strcmp (pCmd, "-ltrnum") && (i< argc))
+ sParam.iLTRRefNum = atoi (argv[i++]);
+
else if (!strcmp (pCmd, "-ltrper") && (i < argc))
sParam.iLtrMarkPeriod = atoi (argv[i++]);
@@ -392,6 +397,7 @@
printf (" -bgd Control background detection (default: 0)\n");
printf (" -aq Control adaptive quantization (default: 0)\n");
printf (" -ltr Control long term reference (default: 0)\n");
+ printf (" -ltrnum Control the number of long term reference((1-4):screen LTR,(1-2):video LTR \n");
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 (" -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");
@@ -459,6 +465,9 @@
else if (!strcmp (pCommand, "-ltr") && (n < argc))
pSvcParam.bEnableLongTermReference = atoi (argv[n++]) ? true : false;
+
+ else if (!strcmp (pCommand, "-ltrnum") && (n < argc))
+ pSvcParam.iLTRRefNum = atoi (argv[n++]);
else if (!strcmp (pCommand, "-ltrper") && (n < argc))
pSvcParam.iLtrMarkPeriod = atoi (argv[n++]);
--- a/testbin/welsenc.cfg
+++ b/testbin/welsenc.cfg
@@ -1,7 +1,7 @@
# Cisco Scalable H.264/AVC Extension Encoder Configuration File
#============================== GENERAL ==============================
-UsageType 0 #0: camera video 1:screen content
+UsageType 1 #0: camera video 1:screen content
SourceWidth 320 #input video width
SourceHeight 192 #input video height
InputFile ../res/CiscoVT2people_320x192_12fps.yuv # Input file
@@ -45,7 +45,8 @@
EnableAdaptiveQuantization 1 # Enable Adaptive Quantization (1: enable, 0: disable)
#============================== LONG TERM REFERENCE CONTROL ==============================
-EnableLongTermReference 0 # Enable Long Term Reference (1: enable, 0: disable)
+EnableLongTermReference 1 # Enable Long Term Reference (1: enable, 0: disable)
+LongTermReferenceNumber 4 # long term reference number (1-4):screen content (1-2):camera video
LtrMarkPeriod 30 # Long Term Reference Marking Period
#============================== LAYER DEFINITION ==============================
--- a/testbin/welsenc_arbitrary_res.cfg
+++ b/testbin/welsenc_arbitrary_res.cfg
@@ -46,6 +46,7 @@
#============================== LONG TERM REFERENCE CONTROL ==============================
EnableLongTermReference 0 # Enable Long Term Reference (1: enable, 0: disable)
+LongTermReferenceNumber 2 # long term reference number (1-4):screen content (1-2):camera video
LtrMarkPeriod 30 # Long Term Reference Marking Period
#============================== LAYER DEFINITION ==============================
--- a/testbin/welsenc_ios.cfg
+++ b/testbin/welsenc_ios.cfg
@@ -47,6 +47,7 @@
#============================== LONG TERM REFERENCE CONTROL ==============================
EnableLongTermReference 0 # Enable Long Term Reference (1: enable, 0: disable)
+LongTermReferenceNumber 2 # long term reference number (1-4):screen content (1-2):camera video
LtrMarkPeriod 30 # Long Term Reference Marking Period
#============================== LAYER DEFINITION ==============================
--- a/testbin/welsenc_vd_1d.cfg
+++ b/testbin/welsenc_vd_1d.cfg
@@ -46,6 +46,7 @@
#============================== LONG TERM REFERENCE CONTROL ==============================
EnableLongTermReference 1 # Enable Long Term Reference (1: enable, 0: disable)
+LongTermReferenceNumber 2 # long term reference number (1-4):screen content (1-2):camera video
LtrMarkPeriod 30 # Long Term Reference Marking Period
#============================== LAYER DEFINITION ==============================
--- a/testbin/welsenc_vd_rc.cfg
+++ b/testbin/welsenc_vd_rc.cfg
@@ -46,6 +46,7 @@
#============================== LONG TERM REFERENCE CONTROL ==============================
EnableLongTermReference 1 # Enable Long Term Reference (1: enable, 0: disable)
+LongTermReferenceNumber 2 # long term reference number (1-4):screen content (1-2):camera video
LtrMarkPeriod 30 # Long Term Reference Marking Period
#============================== LAYER DEFINITION ==============================