shithub: openh264

Download patch

ref: 1922b533f6ac39c76277f063319549e007fb6960
parent: 8b679cad735e15f91445d9c3488ef493393387a6
author: Sijia Chen <sijchen@cisco.com>
date: Thu Apr 9 07:45:36 EDT 2015

change the range of frame rate from 30 to 60

--- a/codec/encoder/core/inc/wels_const.h
+++ b/codec/encoder/core/inc/wels_const.h
@@ -57,7 +57,7 @@
 #define PARA_SET_TYPE_PPS		2
 
 #define MAX_VERTICAL_MV_RANGE   1024  //TODO, for allocate enough memory for transpose
-#define MAX_FRAME_RATE			30	// maximal frame rate to support
+#define MAX_FRAME_RATE			60	// maximal frame rate to support
 #define MIN_FRAME_RATE			1	// minimal frame rate need support
 
 #define MAX_BIT_RATE			INT_MAX	// maximal bit rate to support
--- a/test/encoder/EncUT_EncoderExt.cpp
+++ b/test/encoder/EncUT_EncoderExt.cpp
@@ -195,7 +195,7 @@
   pSrcPic->uiTimeStamp += 30;
 
   eOptionId = ENCODER_OPTION_FRAME_RATE;
-  fValue = static_cast<float> (rand() % 60 - 5);
+  fValue = static_cast<float> (rand() % 100 - 5);
   iResult = pPtrEnc->SetOption (eOptionId, &fValue);
 
   if (fValue <= 0)
@@ -205,7 +205,7 @@
 
     iResult = pPtrEnc->GetOption (eOptionId, &fReturn);
     EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess));
-    EXPECT_EQ (WELS_CLIP3 (fValue, 1, 30), fReturn);
+    EXPECT_EQ (WELS_CLIP3 (fValue, 1, 60), fReturn);
   }
   PrepareOneSrcFrame();
   iResult = pPtrEnc->EncodeFrame (pSrcPic, &sFbi);
@@ -599,7 +599,7 @@
   GetValidEncParamBase (&sEncParamBase);
   sEncParamBase.fMaxFrameRate = 50000;
   EncodeOneFrame (&sEncParamBase);
-  EXPECT_LE (sEncParamBase.fMaxFrameRate, 30.0);
+  EXPECT_LE (sEncParamBase.fMaxFrameRate, 60.0);
   EXPECT_GE (sEncParamBase.fMaxFrameRate, 1.0);
 
   // fMaxFrameRate = 0
@@ -606,7 +606,7 @@
   GetValidEncParamBase (&sEncParamBase);
   sEncParamBase.fMaxFrameRate = 0;
   EncodeOneFrame (&sEncParamBase);
-  EXPECT_LE (sEncParamBase.fMaxFrameRate, 30.0);
+  EXPECT_LE (sEncParamBase.fMaxFrameRate, 60.0);
   EXPECT_GE (sEncParamBase.fMaxFrameRate, 1.0);
 
   // fMaxFrameRate = -1
@@ -613,7 +613,7 @@
   GetValidEncParamBase (&sEncParamBase);
   sEncParamBase.fMaxFrameRate = -1;
   EncodeOneFrame (&sEncParamBase);
-  EXPECT_LE (sEncParamBase.fMaxFrameRate, 30.0);
+  EXPECT_LE (sEncParamBase.fMaxFrameRate, 60.0);
   EXPECT_GE (sEncParamBase.fMaxFrameRate, 1.0);
 }