shithub: openh264

Download patch

ref: 368119aabab5bd92e9fcf5829575229263515731
parent: 70e5e62f3dbd19f0e9300fa7bba670c7ee93dcd2
author: Ethan Hugg <ehugg@cisco.com>
date: Sun Dec 8 23:56:50 EST 2013

Initial Commit

--- /dev/null
+++ b/testbin/AutoBuild_Linux.sh
@@ -1,0 +1,128 @@
+#!/bin/bash
+
+usage="this file must located in ../testbin/ based on our code structure  "
+echo $usage
+
+CurDir=`pwd`
+EncoderMakeDir="../codec/build/linux/enc/"
+DecoderMakeDir="../codec/build/linux/dec/"
+VPMakeDir="../processing/build/linux/"
+
+CodecBinDir="../codec/build/linux/bin/"
+VPBinDir="../bin/linux"
+
+let "EncoderBuildFlag=1"
+let "DecoderBuildFlag=1"
+let "VPBuildFlag=1"
+MakefileLogFile="${CurDir}/CodecVPBuild.log"
+
+#************************************************
+#call Encoder make file
+echo "encoder building....."
+cd ${EncoderMakeDir}
+make clean >${MakefileLogFile}
+make >>${MakefileLogFile}
+
+cd ${CurDir}
+cd ${CodecBinDir}
+if [ !  -e welsenc.a  ]
+then
+	let "EncoderBuildFlag=0"
+fi
+
+if [ !  -e welsenc.so  ]
+then
+	let "EncoderBuildFlag=0"
+fi
+
+if [ !  -e welsenc.exe  ]
+then
+	let "EncoderBuildFlag=0"
+fi
+
+if [  "$EncoderBuildFlag" -eq 1  ]
+then
+	echo "encoder build success!"
+else
+	echo "encoder build failed!"
+fi
+
+#************************************************
+#call Decoder make file
+echo "decoder building....."
+cd ${CurDir}
+cd ${DecoderMakeDir}
+make clean >>${MakefileLogFile}
+make >>${MakefileLogFile}
+
+cd ${CurDir}
+cd ${CodecBinDir}
+if [ !  -e welsdec.a  ]
+then
+	let "DecoderBuildFlag=0"
+fi
+
+if [ !  -e welsdec.so  ]
+then
+	let "DecoderBuildFlag=0"
+fi
+
+if [ !  -e welsdec.exe  ]
+then
+	let "DecoderBuildFlag=0"
+fi
+
+if [  "$DecoderBuildFlag" -eq 1  ]
+then
+	echo "decoder build success!"
+else
+	echo "decoder build failed!"
+fi
+
+#************************************************
+#call VP make file
+echo "VP building....."
+cd ${CurDir}
+cd ${VPMakeDir}
+make clean >>${MakefileLogFile}
+make >>${MakefileLogFile}
+
+cd ${CurDir}
+cd ${VPBinDir}
+if [ !  -e libwelsvp.so  ]
+then
+	let "VPBuildFlag=0"
+fi
+
+if [  "$VPBuildFlag" -eq 1  ]
+then
+	echo "VP build success!"
+else
+	echo "VP  build failed!"
+fi
+
+
+#****************************
+cd ${CurDir}
+rm -f *.a *.exe *.so
+
+for file in ${CodecBinDir}/*
+do
+	cp ${file}  ./
+	echo "file ${file}   under  ../openh264/bin/"
+done
+
+for file in ${VPBinDir}/*
+do
+	cp ${file}  ./
+	echo "file ${file}   under  ../openh264/bin/"
+done
+
+
+
+
+
+
+
+
+
--- /dev/null
+++ b/testbin/AutoBuild_Windows_VS2008.bat
@@ -1,0 +1,59 @@
+echo off
+SET usage="this file must located in ..\testbin\ based on our code structure  "
+echo %usage%
+
+echo "Auto build of openH264 by VS2008"
+
+SET VCBUILDEXE="C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages\vcbuild.exe"
+
+SET CurDir=%~dp0
+SET EncoderProjectDir="..\codec\build\win32\enc\"
+SET DecoderProjectDir="..\codec\build\win32\dec\"
+SET VPProjectDir="..\processing\build\win32\"
+
+SET CodecBinDir="..\codec\build\win32\bin\"
+SET VPBinDir="..\processing\bin\"
+
+SET EncoderBuildFlag=1
+SET DecoderBuildFlag=1
+SET VPBuildFlag=1
+SET MakefileLogFile="${CurDir}\CodecVPBuild.log"
+
+rem ************************************************
+rem call VP build
+echo "Welsvp Building....."
+cd %VPProjectDir%
+rem vcclean 
+%VCBUILDEXE% WelsVP_2008.vcproj
+
+
+rem ************************************************
+rem call WelsEncoder build
+echo "WelsEncoder Building....."
+
+cd %CurDir%
+cd %EncoderProjectDir%
+rem vcclean 
+%VCBUILDEXE% WelsEncCore.vcproj
+%VCBUILDEXE% WelsEncPlus.vcproj
+%VCBUILDEXE% encConsole.vcproj
+
+rem ************************************************
+rem call WelsDecoder build
+echo "WelsDecoder Building....."
+
+cd %CurDir%
+cd %DecoderProjectDir%
+rem vcclean 
+%VCBUILDEXE% WelsDecCore.vcproj
+%VCBUILDEXE% WelsDecPlus.vcproj
+%VCBUILDEXE% decConsole.vcproj
+
+cd %CurDir%
+echo "this is the end of auto build..."
+pause
+
+rem TBD
+
+
+
--- /dev/null
+++ b/testbin/AutoBuild_Windows_VS2010.bat
@@ -1,0 +1,66 @@
+echo off
+SET usage="this file must located in ..\testbin\ based on our code structure  "
+echo %usage%
+echo "Auto build of openH264 by VS2010"
+
+SET VCENVSETBAT="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
+
+Rem ************************************************
+rem reset the dev env for VS2010
+echo "reset the developing env for VS2010"
+call %VCENVSETBAT%
+
+
+SET VCMSBUILDEXE_RELEASE=MSbuild /t:Rebuild /p:Configuration=Release
+SET VCMSBUILDEXE_DEBUG=MSbuild /t:Rebuild /p:Configuration=Debug
+
+SET CurDir=%~dp0
+SET EncoderProjectDir="..\codec\build\win32\enc\"
+SET DecoderProjectDir="..\codec\build\win32\dec\"
+SET VPProjectDir="..\processing\build\win32\"
+
+SET CodecBinDir="..\codec\build\win32\bin\"
+SET VPBinDir="..\processing\bin\"
+
+SET EncoderBuildFlag=1
+SET DecoderBuildFlag=1
+SET VPBuildFlag=1
+SET MakefileLogFile="${CurDir}\CodecVPBuild.log"
+
+
+
+rem ************************************************
+rem call WelsEncoder build
+echo "WelsEncoder Building....."
+
+cd %CurDir%
+cd %EncoderProjectDir%
+echo current directory is %EncoderProjectDir%
+rem vcclean 
+
+echo %VCMSBUILDEXE_RELEASE% WelsEncoder_2010.sln
+%VCMSBUILDEXE_RELEASE% WelsEncoder_2010.sln
+%VCMSBUILDEXE_DEBUG% WelsEncoder_2010.sln
+
+rem ************************************************
+rem call WelsDecoder build
+echo "WelsDecoder Building....."
+
+cd %CurDir%
+cd %DecoderProjectDir%
+echo current directory is %DecoderProjectDir%
+rem vcclean 
+
+echo %VCMSBUILDEXE_RELEASE% WelsDecoder_2010.sln
+
+%VCMSBUILDEXE_RELEASE% WelsDecoder_2010.sln
+%VCMSBUILDEXE_DEBUG% WelsDecoder_2010.sln
+
+cd %CurDir%
+echo "this is the end of auto build..."
+pause
+
+rem TBD
+
+
+
--- /dev/null
+++ b/testbin/AutoBuild_Windows_VS2012.bat
@@ -1,0 +1,66 @@
+echo off
+SET usage="this file must located in ..\testbin\ based on our code structure  "
+echo %usage%
+echo "Auto build of openH264 by VS2012"
+
+SET VCENVSETBAT="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\vcvars32.bat"
+
+Rem ************************************************
+rem reset the dev env for VS2012
+echo "reset the developing env for VS2012"
+call %VCENVSETBAT%
+
+
+SET VCMSBUILDEXE_RELEASE=MSbuild /t:Rebuild /p:Configuration=Release
+SET VCMSBUILDEXE_DEBUG=MSbuild /t:Rebuild /p:Configuration=Debug
+
+SET CurDir=%~dp0
+SET EncoderProjectDir="..\codec\build\win32\enc\"
+SET DecoderProjectDir="..\codec\build\win32\dec\"
+SET VPProjectDir="..\processing\build\win32\"
+
+SET CodecBinDir="..\codec\build\win32\bin\"
+SET VPBinDir="..\processing\bin\"
+
+SET EncoderBuildFlag=1
+SET DecoderBuildFlag=1
+SET VPBuildFlag=1
+SET MakefileLogFile="${CurDir}\CodecVPBuild.log"
+
+
+
+rem ************************************************
+rem call WelsEncoder build
+echo "WelsEncoder Building....."
+
+cd %CurDir%
+cd %EncoderProjectDir%
+echo current directory is %EncoderProjectDir%
+rem vcclean 
+
+echo %VCMSBUILDEXE_RELEASE% WelsEncoder_2012.sln
+%VCMSBUILDEXE_RELEASE% WelsEncoder_2012.sln
+%VCMSBUILDEXE_DEBUG% WelsEncoder_2012.sln
+
+rem ************************************************
+rem call WelsDecoder build
+echo "WelsDecoder Building....."
+
+cd %CurDir%
+cd %DecoderProjectDir%
+echo current directory is %DecoderProjectDir%
+rem vcclean 
+
+echo %VCMSBUILDEXE_RELEASE% WelsDecoder_2012.sln
+
+%VCMSBUILDEXE_RELEASE% WelsDecoder_2012.sln
+%VCMSBUILDEXE_DEBUG% WelsDecoder_2012.sln
+
+cd %CurDir%
+echo "this is the end of auto build..."
+pause
+
+rem TBD
+
+
+
--- /dev/null
+++ b/testbin/AutoClean_Linux.sh
@@ -1,0 +1,53 @@
+#!/bin/bash
+
+usage="this file must located in ../testbin/ based on our code structure  "
+echo $usage
+
+CurDir=`pwd`
+EncoderMakeDir="../codec/build/linux/enc/"
+DecoderMakeDir="../codec/build/linux/dec/"
+VPMakeDir="../processing/build/linux/"
+
+CodecBinDir="../codec/build/linux/bin/"
+VPBinDir="../bin/linux"
+
+let "EncoderBuildFlag=1"
+let "DecoderBuildFlag=1"
+let "VPBuildFlag=1"
+MakefileLogFile="${CurDir}/CodecVPBuild.log"
+
+#************************************************
+#call Encoder make file
+echo "encoder cleanning....."
+cd ${EncoderMakeDir}
+make clean >${MakefileLogFile}
+#make >>${MakefileLogFile}
+
+
+
+#************************************************
+#call Decoder make file
+echo "decoder cleanning....."
+cd ${CurDir}
+cd ${DecoderMakeDir}
+make clean >>${MakefileLogFile}
+#make >>${MakefileLogFile}
+
+
+
+#************************************************
+#call VP make file
+echo "VP cleanning....."
+cd ${CurDir}
+cd ${VPMakeDir}
+make clean >>${MakefileLogFile}
+#make >>${MakefileLogFile}
+
+cd ${CurDir}
+
+rm -f *.exe *.so *.a *.log
+rm -fr ../bin  # remove the bin directory
+
+
+
+
--- /dev/null
+++ b/testbin/CmdLineExample.sh
@@ -1,0 +1,6 @@
+chmod 777 ../bin/linux/welsenc.exe
+../bin/linux/welsenc.exe welsenc_vd_1d.cfg
+../bin/linux/welsenc.exe welsenc_vd_rc.cfg
+
+../bin/linux/welsdec.exe test_vd_1d.264 test_vd_1d.yuv
+../bin/linux/welsdec.exe test_vd_1d.264 test_vd_rc.yuv
--- /dev/null
+++ b/testbin/CmdLineReadMe
@@ -1,0 +1,20 @@
+/* Instant Runable Configurations */
+//for encoder configure files
+welsenc_vd_1d.cfg
+welsenc_vd_rc.cfg
+
+//the actual generated decoder EXE files are in folder ../bin/win32/release/ with Release build
+//user may copy "decConsole.exe" and "welsdec.dll" into ../bin
+//Now assume the generated EXE files are in folder ../bin
+
+Example Command Line for encoding in Windows:
+../bin/encConsole.exe welsenc_vd_1d.cfg
+../bin/encConsole.exe welsenc_vd_rc.cfg
+
+Example Command Line for decoding in Windows
+../bin/decConsole.exe welsenc_vd_1d.264 welsenc_vd_1d.yuv
+../bin/decConsole.exe welsenc_vd_rc.264 welsenc_vd_rc.yuv
+
+Example shell script for Linux for encoder & decoder:
+CmdLineExample.sh
+
--- /dev/null
+++ b/testbin/layer2.cfg
@@ -1,0 +1,39 @@
+# Layer Configuration File
+
+
+#============================== INPUT / OUTPUT ==============================
+SourceWidth     640                     # Input  frame width
+SourceHeight    384                    # Input  frame height
+FrameRateIn     24                      # Input  frame rate [Hz]
+FrameRateOut    24                     # Output frame rate [Hz]
+InputFile       CiscoVT2people_640x384_24fps.yuv # Input  file
+ReconFile       rec_layer2.yuv          # Reconstructed file
+
+#============================== CODING ==============================
+ProfileIdc      66          # value of profile_idc (or 0 for auto detection)
+
+InitialQP       24			# Quantization parameters for base quality layer
+#================================ RATE CONTROL ===============================
+SpatialBitrate		600		# Unit: kbps, controled by DisableRC also
+#============================== MultiSlice Slice Argument ==============================
+# for S/M Slice(s) mode settings
+SliceMode			0		# 0: sigle slice mode; >0: multiple slices mode, see below;
+SliceSize			1500
+SliceNum			1		# multiple slices number specified
+
+SlicesAssign0		960		# count number of MBs in slice #0
+SlicesAssign1		0		# count number of MBs in slice #1
+SlicesAssign2		0		# count number of MBs in slice #2
+SlicesAssign3		0		# count number of MBs in slice #3 -- seting here is for better testing
+SlicesAssign4		0		# count number of MBs in slice #4
+SlicesAssign5		0		# count number of MBs in slice #5
+SlicesAssign6		0		# count number of MBs in slice #6
+SlicesAssign7		0		# count number of MBs in slice #7
+
+### DESIGN OF SLICE MODE ####
+# 0 SM_SINGLE_SLICE			| SliceNum==1
+# 1 SM_FIXEDSLCNUM_SLICE	| according to SliceNum			| Enabled dynamic slicing for multi-thread
+# 2 SM_RASTER_SLICE			| according to SlicesAssign		| Need input of MB numbers each slice. In addition, if other constraint in slice_argument is presented, need to follow the constraints. Typically if MB num and slice size are both constrained, re-encoding may be involved.
+# 3 SM_ROWMB_SLICE			| according to PictureMBHeight	| Typical of single row of mbs each slice?+ slice size constraint which including re-encoding
+# 4 SM_DYN_SLICE			| according to SliceSize		| Dynamic slicing (have no idea about slice_nums until encoding current frame)
+
--- /dev/null
+++ b/testbin/layer2_vd.cfg
@@ -1,0 +1,39 @@
+# Layer Configuration File
+
+
+#============================== INPUT / OUTPUT ==============================
+SourceWidth     640                     # Input  frame width
+SourceHeight    384                    # Input  frame height
+FrameRateIn     24                      # Input  frame rate [Hz]
+FrameRateOut    24                     # Output frame rate [Hz]
+InputFile       CiscoVT2people_640x384_24fps.yuv # Input  file
+ReconFile       rec_layer2.yuv          # Reconstructed file
+
+#============================== CODING ==============================
+ProfileIdc      66          # value of profile_idc (or 0 for auto detection)
+
+InitialQP       24			# Quantization parameters for base quality layer
+#================================ RATE CONTROL ===============================
+SpatialBitrate		600		# Unit: kbps, controled by DisableRC also
+#============================== MultiSlice Slice Argument ==============================
+# for S/M Slice(s) mode settings
+SliceMode			0		# 0: sigle slice mode; >0: multiple slices mode, see below;
+SliceSize			1500
+SliceNum			1		# multiple slices number specified
+
+SlicesAssign0		960		# count number of MBs in slice #0
+SlicesAssign1		0		# count number of MBs in slice #1
+SlicesAssign2		0		# count number of MBs in slice #2
+SlicesAssign3		0		# count number of MBs in slice #3 -- seting here is for better testing
+SlicesAssign4		0		# count number of MBs in slice #4
+SlicesAssign5		0		# count number of MBs in slice #5
+SlicesAssign6		0		# count number of MBs in slice #6
+SlicesAssign7		0		# count number of MBs in slice #7
+
+### DESIGN OF SLICE MODE, 100804, Sijia ####
+# 0 SM_SINGLE_SLICE			| SliceNum==1
+# 1 SM_FIXEDSLCNUM_SLICE	| according to SliceNum			| Enabled dynamic slicing for multi-thread
+# 2 SM_RASTER_SLICE			| according to SlicesAssign		| Need input of MB numbers each slice. In addition, if other constraint in slice_argument is presented, need to follow the constraints. Typically if MB num and slice size are both constrained, re-encoding may be involved.
+# 3 SM_ROWMB_SLICE			| according to PictureMBHeight	| Specially for TP. Typical of single row of mbs each slice?+ slice size constraint which including re-encoding
+# 4 SM_DYN_SLICE			| according to SliceSize		| Dynamic slicing (have no idea about slice_nums until encoding current frame)
+
--- /dev/null
+++ b/testbin/layer2_vd_rc.cfg
@@ -1,0 +1,39 @@
+# Layer Configuration File
+
+
+#============================== INPUT / OUTPUT ==============================
+SourceWidth     640                     # Input  frame width
+SourceHeight    384                    # Input  frame height
+FrameRateIn     24                      # Input  frame rate [Hz]
+FrameRateOut    24                     # Output frame rate [Hz]
+InputFile       CiscoVT2people_640x384_24fps.yuv # Input  file
+ReconFile       rec_layer2.yuv          # Reconstructed file
+
+#============================== CODING ==============================
+ProfileIdc      66          # value of profile_idc (or 0 for auto detection)
+
+InitialQP       24			# Quantization parameters for base quality layer
+#================================ RATE CONTROL ===============================
+SpatialBitrate		600		# Unit: kbps, controled by DisableRC also
+#============================== MultiSlice Slice Argument ==============================
+# for S/M Slice(s) mode settings
+SliceMode			0		# 0: sigle slice mode; >0: multiple slices mode, see below;
+SliceSize			1500
+SliceNum			1		# multiple slices number specified
+
+SlicesAssign0		960		# count number of MBs in slice #0
+SlicesAssign1		0		# count number of MBs in slice #1
+SlicesAssign2		0		# count number of MBs in slice #2
+SlicesAssign3		0		# count number of MBs in slice #3 -- seting here is for better testing
+SlicesAssign4		0		# count number of MBs in slice #4
+SlicesAssign5		0		# count number of MBs in slice #5
+SlicesAssign6		0		# count number of MBs in slice #6
+SlicesAssign7		0		# count number of MBs in slice #7
+
+### DESIGN OF SLICE MODE, 100804, Sijia ####
+# 0 SM_SINGLE_SLICE			| SliceNum==1
+# 1 SM_FIXEDSLCNUM_SLICE	| according to SliceNum			| Enabled dynamic slicing for multi-thread
+# 2 SM_RASTER_SLICE			| according to SlicesAssign		| Need input of MB numbers each slice. In addition, if other constraint in slice_argument is presented, need to follow the constraints. Typically if MB num and slice size are both constrained, re-encoding may be involved.
+# 3 SM_ROWMB_SLICE			| according to PictureMBHeight	| Specially for TP. Typical of single row of mbs each slice?+ slice size constraint which including re-encoding
+# 4 SM_DYN_SLICE			| according to SliceSize		| Dynamic slicing (have no idea about slice_nums until encoding current frame)
+
--- /dev/null
+++ b/testbin/welsenc.cfg
@@ -1,0 +1,63 @@
+# Cisco Scalable H.264/AVC Extension Encoder Configuration File
+
+#============================== GENERAL ==============================
+OutputFile              test.264               # Bitstream file
+MaxFrameRate            30                     # Maximum frame rate [Hz]
+FramesToBeEncoded       -1                    # Number of frames (at input frame rate)
+
+GOPSize                 4                     # GOP Size (at maximum frame rate), 16
+IntraPeriod            0                    # Intra Period ( multipler of GoP size or -1)
+EnableSpsPpsIDAddition  1
+
+EnableFrameCropping 	1 		       # enable frame cropping flag
+
+#============================== LOOP FILTER ==============================
+LoopFilterDisableIDC       0                   # Loop filter idc (0: on, 1: off, 
+                                               # 2: on except for slice boundaries,
+                                               # 3: two stage. slice boundries on in second stage
+                                               # 4: Luma on but Chroma off (w.r.t. idc=0)  
+                                               # 5: Luma on except on slice boundaries, but Chroma off in enh. layer (w.r.t. idc=2)
+                                               # 6: Luma on in two stage. slice boundries on in second stage, but Chroma off (w.r.t. idc=3)
+LoopFilterAlphaC0Offset	0                      # AlphaOffset(-6..+6): valid range
+LoopFilterBetaOffset	0                      # BetaOffset (-6..+6): valid range
+
+InterLayerLoopFilterDisableIDC       0         # filter idc for inter-layer deblocking (0: on, 1: off, 
+                                               # 2: on except for slice boundaries,
+                                               # 3: two stage. slice boundries on in second stage
+                                               # 4: Luma on but Chroma off in enh. layer (w.r.t. idc=0)  
+                                               # 5: Luma on except on slice boundaries, but Chroma off in enh. layer (w.r.t. idc=2)
+                                               # 6: Luma on in two stage. slice boundries on in second stage, but Chroma off (w.r.t. idc=3)
+InterLayerLoopFilterAlphaC0Offset 0            # AlphaOffset for inter-layer deblocking
+InterLayerLoopFilterBetaOffset    0            # BetaOffset for inter-layer deblocking
+
+#============================== SOFTWARE IMPLEMENTATION ==============================
+MultipleThreadIdc			    1	# 0: auto(dynamic imp. internal encoder); 1: multiple threads imp. disabled; > 1: count number of threads;
+
+#============================== RATE CONTROL ==============================
+EnableRC				1						# ENABLE RC
+TargetBitrate			5000				    # Unit: kbps, controled by EnableRC also
+
+#============================== DENOISE CONTROL ==============================
+EnableDenoise                   0              # Enable Denoise (1: enable, 0: disable)
+
+#============================== SCENE CHANGE DETECTION CONTROL =======================
+EnableSceneChangeDetection			1			# Enable Scene Change Detection (1: enable, 0: disable)
+
+#============================== BACKGROUND DETECTION CONTROL ==============================
+EnableBackgroundDetection		 1     # BGD control(1: enable, 0: disable)
+
+#============================== ADAPTIVE QUANTIZATION CONTROL =======================
+EnableAdaptiveQuantization			1			# Enable Adaptive Quantization (1: enable, 0: disable)
+
+#============================== LONG TERM REFERENCE CONTROL ==============================
+EnableLongTermReference             0              # Enable Long Term Reference (1: enable, 0: disable)
+LtrMarkPeriod                       30             # Long Term Reference Marking Period 
+
+#============================== LAYER DEFINITION ==============================
+PrefixNALAddingCtrl		0						# Control flag of adding prefix unit (0: off, 1: on)
+												# It shall always be on in SVC contexts (i.e. when there are CGS/MGS/spatial enhancement layers)
+												# Can be disabled when no inter spatial layer prediction in case of its value as 0
+NumLayers              1                      # Number of layers
+//LayerCfg                layer0.cfg		# Layer 0 configuration file
+//LayerCfg                layer1.cfg		# Layer 1 configuration file
+LayerCfg                layer2.cfg		# Layer 2 configuration file
--- /dev/null
+++ b/testbin/welsenc_vd_1d.cfg
@@ -1,0 +1,63 @@
+# Cisco Scalable H.264/AVC Extension Encoder Configuration File
+
+#============================== GENERAL ==============================
+OutputFile              test_vd_1d.264               # Bitstream file
+MaxFrameRate            30                     # Maximum frame rate [Hz]
+FramesToBeEncoded       -1                    # Number of frames (at input frame rate)
+
+GOPSize                 4                     # GOP Size (at maximum frame rate), 16
+IntraPeriod            0                    # Intra Period ( multipler of GoP size or -1)
+EnableSpsPpsIDAddition  1
+
+EnableFrameCropping 	1 		       # enable frame cropping flag
+
+#============================== LOOP FILTER ==============================
+LoopFilterDisableIDC       0                   # Loop filter idc (0: on, 1: off, 
+                                               # 2: on except for slice boundaries,
+                                               # 3: two stage. slice boundries on in second stage
+                                               # 4: Luma on but Chroma off (w.r.t. idc=0)  
+                                               # 5: Luma on except on slice boundaries, but Chroma off in enh. layer (w.r.t. idc=2)
+                                               # 6: Luma on in two stage. slice boundries on in second stage, but Chroma off (w.r.t. idc=3)
+LoopFilterAlphaC0Offset	0                      # AlphaOffset(-6..+6): valid range
+LoopFilterBetaOffset	0                      # BetaOffset (-6..+6): valid range
+
+InterLayerLoopFilterDisableIDC       0         # filter idc for inter-layer deblocking (0: on, 1: off, 
+                                               # 2: on except for slice boundaries,
+                                               # 3: two stage. slice boundries on in second stage
+                                               # 4: Luma on but Chroma off in enh. layer (w.r.t. idc=0)  
+                                               # 5: Luma on except on slice boundaries, but Chroma off in enh. layer (w.r.t. idc=2)
+                                               # 6: Luma on in two stage. slice boundries on in second stage, but Chroma off (w.r.t. idc=3)
+InterLayerLoopFilterAlphaC0Offset 0            # AlphaOffset for inter-layer deblocking
+InterLayerLoopFilterBetaOffset    0            # BetaOffset for inter-layer deblocking
+
+#============================== SOFTWARE IMPLEMENTATION ==============================
+MultipleThreadIdc			    1	# 0: auto(dynamic imp. internal encoder); 1: multiple threads imp. disabled; > 1: count number of threads;
+
+#============================== RATE CONTROL ==============================
+EnableRC				0						# ENABLE RC
+TargetBitrate			5000				    # Unit: kbps, controled by EnableRC also
+
+#============================== DENOISE CONTROL ==============================
+EnableDenoise                   0              # Enable Denoise (1: enable, 0: disable)
+
+#============================== SCENE CHANGE DETECTION CONTROL =======================
+EnableSceneChangeDetection			1			# Enable Scene Change Detection (1: enable, 0: disable)
+
+#============================== BACKGROUND DETECTION CONTROL ==============================
+EnableBackgroundDetection		 1     # BGD control(1: enable, 0: disable)
+
+#============================== ADAPTIVE QUANTIZATION CONTROL =======================
+EnableAdaptiveQuantization			0			# Enable Adaptive Quantization (1: enable, 0: disable)
+
+#============================== LONG TERM REFERENCE CONTROL ==============================
+EnableLongTermReference             1              # Enable Long Term Reference (1: enable, 0: disable)
+LtrMarkPeriod                       30             # Long Term Reference Marking Period 
+
+#============================== LAYER DEFINITION ==============================
+PrefixNALAddingCtrl		0						# Control flag of adding prefix unit (0: off, 1: on)
+												# It shall always be on in SVC contexts (i.e. when there are CGS/MGS/spatial enhancement layers)
+												# Can be disabled when no inter spatial layer prediction in case of its value as 0
+NumLayers              1                      # Number of layers
+//LayerCfg                layer0_vd.cfg		# Layer 0 configuration file
+//LayerCfg                layer1_vd.cfg		# Layer 1 configuration file
+LayerCfg                layer2_vd.cfg		# Layer 2 configuration file
--- /dev/null
+++ b/testbin/welsenc_vd_rc.cfg
@@ -1,0 +1,63 @@
+# Cisco Scalable H.264/AVC Extension Encoder Configuration File
+
+#============================== GENERAL ==============================
+OutputFile              test_vd_rc.264               # Bitstream file
+MaxFrameRate            30                     # Maximum frame rate [Hz]
+FramesToBeEncoded       -1                    # Number of frames (at input frame rate), -1
+
+GOPSize                 8                     # GOP Size (at maximum frame rate), 16
+IntraPeriod            0                    # Intra Period ( multipler of GoP size or -1)
+EnableSpsPpsIDAddition  1
+
+EnableFrameCropping 	1 		       # enable frame cropping flag
+
+#============================== LOOP FILTER ==============================
+LoopFilterDisableIDC       0                   # Loop filter idc (0: on, 1: off, 
+                                               # 2: on except for slice boundaries,
+                                               # 3: two stage. slice boundries on in second stage
+                                               # 4: Luma on but Chroma off (w.r.t. idc=0)  
+                                               # 5: Luma on except on slice boundaries, but Chroma off in enh. layer (w.r.t. idc=2)
+                                               # 6: Luma on in two stage. slice boundries on in second stage, but Chroma off (w.r.t. idc=3)
+LoopFilterAlphaC0Offset	0                      # AlphaOffset(-6..+6): valid range
+LoopFilterBetaOffset	0                      # BetaOffset (-6..+6): valid range
+
+InterLayerLoopFilterDisableIDC       0         # filter idc for inter-layer deblocking (0: on, 1: off, 
+                                               # 2: on except for slice boundaries,
+                                               # 3: two stage. slice boundries on in second stage
+                                               # 4: Luma on but Chroma off in enh. layer (w.r.t. idc=0)  
+                                               # 5: Luma on except on slice boundaries, but Chroma off in enh. layer (w.r.t. idc=2)
+                                               # 6: Luma on in two stage. slice boundries on in second stage, but Chroma off (w.r.t. idc=3)
+InterLayerLoopFilterAlphaC0Offset 0            # AlphaOffset for inter-layer deblocking
+InterLayerLoopFilterBetaOffset    0            # BetaOffset for inter-layer deblocking
+
+#============================== SOFTWARE IMPLEMENTATION ==============================
+MultipleThreadIdc			    1	# 0: auto(dynamic imp. internal encoder); 1: multiple threads imp. disabled; > 1: count number of threads;
+
+#============================== RATE CONTROL ==============================
+EnableRC			1						# ENABLE RC
+TargetBitrate			600				    # Unit: kbps, controled by EnableRC also
+
+#============================== DENOISE CONTROL ==============================
+EnableDenoise                   1              # Enable Denoise (1: enable, 0: disable)
+
+#============================== SCENE CHANGE DETECTION CONTROL =======================
+EnableSceneChangeDetection			1			# Enable Scene Change Detection (1: enable, 0: disable)
+
+#============================== BACKGROUND DETECTION CONTROL ==============================
+EnableBackgroundDetection		 1     # BGD control(1: enable, 0: disable)
+
+#============================== ADAPTIVE QUANTIZATION CONTROL =======================
+EnableAdaptiveQuantization			1			# Enable Adaptive Quantization (1: enable, 0: disable)
+
+#============================== LONG TERM REFERENCE CONTROL ==============================
+EnableLongTermReference             1              # Enable Long Term Reference (1: enable, 0: disable)
+LtrMarkPeriod                       30             # Long Term Reference Marking Period 
+
+#============================== LAYER DEFINITION ==============================
+PrefixNALAddingCtrl		0						# Control flag of adding prefix unit (0: off, 1: on)
+												# It shall always be on in SVC contexts (i.e. when there are CGS/MGS/spatial enhancement layers)
+												# Can be disabled when no inter spatial layer prediction in case of its value as 0
+NumLayers              1                      # Number of layers
+//LayerCfg                layer0_vd.cfg		# Layer 0 configuration file
+//LayerCfg                layer1_vd.cfg		# Layer 1 configuration file
+LayerCfg                layer2_vd_rc.cfg		# Layer 2 configuration file