shithub: openh264

Download patch

ref: d292179095be94d8f4ddaf97d21b1c793c039afa
parent: 8beb3c8c09db358068d8f9d081c9a3a274b6e768
parent: f176bf563758506ba89b843217ef87b6de9586c3
author: volvet <[email protected]>
date: Thu Mar 6 08:39:57 EST 2014

Merge pull request #424 from ruil2/encoder_interface

remove inter-deblock related parameters--review request #148

--- a/codec/api/svc/codec_app_def.h
+++ b/codec/api/svc/codec_app_def.h
@@ -232,10 +232,6 @@
   int		iLoopFilterDisableIdc;	// 0: on, 1: off, 2: on except for slice boundaries
   int		iLoopFilterAlphaC0Offset;// AlphaOffset: valid range [-6, 6], default 0
   int		iLoopFilterBetaOffset;	// BetaOffset:	valid range [-6, 6], default 0
-  int		iInterLayerLoopFilterDisableIdc; // Employed based upon inter-layer, same comment as above
-  int		iInterLayerLoopFilterAlphaC0Offset;	// InterLayerLoopFilterAlphaC0Offset
-  int		iInterLayerLoopFilterBetaOffset;	// InterLayerLoopFilterBetaOffset
-
   /*pre-processing feature*/
   bool    bEnableDenoise;	    // denoise control
   bool    bEnableBackgroundDetection;// background detection control //VAA_BACKGROUND_DETECTION //BGD cmd
--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -164,26 +164,6 @@
           pSvcParam.iLoopFilterBetaOffset	= -6;
         else if (pSvcParam.iLoopFilterBetaOffset > 6)
           pSvcParam.iLoopFilterBetaOffset	= 6;
-      } else if (strTag[0].compare ("InterLayerLoopFilterDisableIDC") == 0) {
-        pSvcParam.iInterLayerLoopFilterDisableIdc = (int8_t)atoi (strTag[1].c_str());
-        if (pSvcParam.iInterLayerLoopFilterDisableIdc > 6 || pSvcParam.iInterLayerLoopFilterDisableIdc < 0) {
-          fprintf (stderr, "Invalid parameter in iInterLayerLoopFilterDisableIdc: %d.\n",
-                   pSvcParam.iInterLayerLoopFilterDisableIdc);
-          iRet = 1;
-          break;
-        }
-      } else if (strTag[0].compare ("InterLayerLoopFilterAlphaC0Offset") == 0) {
-        pSvcParam.iInterLayerLoopFilterAlphaC0Offset	= (int8_t)atoi (strTag[1].c_str());
-        if (pSvcParam.iInterLayerLoopFilterAlphaC0Offset < -6)
-          pSvcParam.iInterLayerLoopFilterAlphaC0Offset	= -6;
-        else if (pSvcParam.iInterLayerLoopFilterAlphaC0Offset > 6)
-          pSvcParam.iInterLayerLoopFilterAlphaC0Offset	= 6;
-      } else if (strTag[0].compare ("InterLayerLoopFilterBetaOffset") == 0) {
-        pSvcParam.iInterLayerLoopFilterBetaOffset	= (int8_t)atoi (strTag[1].c_str());
-        if (pSvcParam.iInterLayerLoopFilterBetaOffset < -6)
-          pSvcParam.iInterLayerLoopFilterBetaOffset	= -6;
-        else if (pSvcParam.iInterLayerLoopFilterBetaOffset > 6)
-          pSvcParam.iInterLayerLoopFilterBetaOffset	= 6;
       } else if (strTag[0].compare ("MultipleThreadIdc") == 0) {
         // # 0: auto(dynamic imp. internal encoder); 1: multiple threads imp. disabled; > 1: count number of threads;
         pSvcParam.iMultipleThreadIdc	= atoi (strTag[1].c_str());
--- a/codec/encoder/core/inc/param_svc.h
+++ b/codec/encoder/core/inc/param_svc.h
@@ -169,10 +169,7 @@
   param.iLoopFilterDisableIdc		= 1;	// 0: on, 1: off, 2: on except for slice boundaries
   param.iLoopFilterAlphaC0Offset	= 0;	// AlphaOffset: valid range [-6, 6], default 0
   param.iLoopFilterBetaOffset		= 0;	// BetaOffset:	valid range [-6, 6], default 0
-  param.iInterLayerLoopFilterDisableIdc		= 1;	// Employed based upon inter-layer, same comment as above
-  param.iInterLayerLoopFilterAlphaC0Offset	= 0;	// InterLayerLoopFilterAlphaC0Offset
-  param.iInterLayerLoopFilterBetaOffset		= 0;	// InterLayerLoopFilterBetaOffset
-
+ 
   /* Rate Control */
   param.bEnableRc		= kbEnableRc;
   param.iRCMode			= 0;
@@ -327,9 +324,6 @@
 #endif
   iLoopFilterAlphaC0Offset = 0;	// AlphaOffset: valid range [-6, 6], default 0
   iLoopFilterBetaOffset	= 0;	// BetaOffset:	valid range [-6, 6], default 0
-  iInterLayerLoopFilterDisableIdc	= iLoopFilterDisableIdc;	// Employed based upon inter-layer, same comment as above
-  iInterLayerLoopFilterAlphaC0Offset = 0;
-  iInterLayerLoopFilterBetaOffset	= 0;
 
   bEnableFrameCroppingFlag	= true;
 
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -866,10 +866,6 @@
     pDqLayer->iLoopFilterDisableIdc	                = pParam->iLoopFilterDisableIdc;
     pDqLayer->iLoopFilterAlphaC0Offset				= (pParam->iLoopFilterAlphaC0Offset) << 1;
     pDqLayer->iLoopFilterBetaOffset					= (pParam->iLoopFilterBetaOffset) << 1;
-    //inter-layer deblocking
-    pDqLayer->uiDisableInterLayerDeblockingFilterIdc	= pParam->iInterLayerLoopFilterDisableIdc;
-    pDqLayer->iInterLayerSliceAlphaC0Offset				= (pParam->iInterLayerLoopFilterAlphaC0Offset) << 1;
-    pDqLayer->iInterLayerSliceBetaOffset				= (pParam->iInterLayerLoopFilterBetaOffset) << 1;
     //parallel deblocking
     pDqLayer->bDeblockingParallelFlag                  = pParam->bDeblockingParallelFlag;
 
@@ -3710,9 +3706,6 @@
     pNewParam->iLoopFilterDisableIdc					= WELS_CLIP3 (pNewParam->iLoopFilterDisableIdc, 0, 6);
     pNewParam->iLoopFilterAlphaC0Offset				= WELS_CLIP3 (pNewParam->iLoopFilterAlphaC0Offset, -6, 6);
     pNewParam->iLoopFilterBetaOffset					= WELS_CLIP3 (pNewParam->iLoopFilterBetaOffset, -6, 6);
-    pNewParam->iInterLayerLoopFilterDisableIdc		= WELS_CLIP3 (pNewParam->iInterLayerLoopFilterDisableIdc, 0, 6);
-    pNewParam->iInterLayerLoopFilterAlphaC0Offset	= WELS_CLIP3 (pNewParam->iInterLayerLoopFilterAlphaC0Offset, -6, 6);
-    pNewParam->iInterLayerLoopFilterBetaOffset		= WELS_CLIP3 (pNewParam->iInterLayerLoopFilterBetaOffset, -6, 6);
     pNewParam->fMaxFrameRate							= WELS_CLIP3 (pNewParam->fMaxFrameRate, MIN_FRAME_RATE, MAX_FRAME_RATE);
 
     // we can not use direct struct based memcpy due some fields need keep unchanged as before
@@ -3746,13 +3739,7 @@
     pOldParam->iLoopFilterDisableIdc	= pNewParam->iLoopFilterDisableIdc;	// 0: on, 1: off, 2: on except for slice boundaries
     pOldParam->iLoopFilterAlphaC0Offset	= pNewParam->iLoopFilterAlphaC0Offset;// AlphaOffset: valid range [-6, 6], default 0
     pOldParam->iLoopFilterBetaOffset		= pNewParam->iLoopFilterBetaOffset;	// BetaOffset:	valid range [-6, 6], default 0
-    pOldParam->iInterLayerLoopFilterDisableIdc	=
-      pNewParam->iInterLayerLoopFilterDisableIdc; // Employed based upon inter-layer, same comment as above
-    pOldParam->iInterLayerLoopFilterAlphaC0Offset	=
-      pNewParam->iInterLayerLoopFilterAlphaC0Offset;	// InterLayerLoopFilterAlphaC0Offset
-    pOldParam->iInterLayerLoopFilterBetaOffset		=
-      pNewParam->iInterLayerLoopFilterBetaOffset;	// InterLayerLoopFilterBetaOffset
-
+   
     /* Rate Control */
     pOldParam->bEnableRc			= pNewParam->bEnableRc;
     pOldParam->iRCMode	    	= pNewParam->iRCMode;
--- a/testbin/welsenc.cfg
+++ b/testbin/welsenc.cfg
@@ -23,16 +23,6 @@
                                                # 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;