shithub: openh264

Download patch

ref: 679cc4ac6cfd265711e31b243351e04bb57fb36c
parent: 1a394d14328a2ecfd4d4b3fa5169e8d564f2bd73
parent: c6a136c742cf0c982187a021d79c0387beea28af
author: lyao2 <lyao2@cisco.com>
date: Thu Sep 11 09:02:02 EDT 2014

Merge pull request #1346 from ruil2/ltr_limit

using default value for LTR.

--- a/codec/api/svc/codec_app_def.h
+++ b/codec/api/svc/codec_app_def.h
@@ -182,7 +182,7 @@
 
 typedef struct {
   bool   bEnableLongTermReference; // 1: on, 0: off
-  int	   iLTRRefNum;
+  int	   iLTRRefNum; //TODO: not supported to set it arbitrary yet
 } SLTRConfig;
 typedef struct {
   unsigned int
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -3834,7 +3834,7 @@
   int32_t uiGopSize			= 1 << (sConfig.iTemporalLayerNum - 1);
   if (sConfig.iUsageType == SCREEN_CONTENT_REAL_TIME) {
     if (sConfig.bEnableLongTermReference) {
-      sConfig.iLTRRefNum = WELS_CLIP3 (sConfig.iLTRRefNum, 1, LONG_TERM_REF_NUM_SCREEN);
+      sConfig.iLTRRefNum = LONG_TERM_REF_NUM_SCREEN;//WELS_CLIP3 (sConfig.iLTRRefNum, 1, LONG_TERM_REF_NUM_SCREEN);
       iNumRefFrame = WELS_MAX (1, WELS_LOG2 (uiGopSize)) + sConfig.iLTRRefNum;
     } else {
       sConfig.iLTRRefNum = 0;
@@ -3842,7 +3842,7 @@
     }
   } else {
     if (sConfig.bEnableLongTermReference) {
-      sConfig.iLTRRefNum = WELS_CLIP3 (sConfig.iLTRRefNum, 1, LONG_TERM_REF_NUM);
+      sConfig.iLTRRefNum = LONG_TERM_REF_NUM;//WELS_CLIP3 (sConfig.iLTRRefNum, 1, LONG_TERM_REF_NUM);
     } else {
       sConfig.iLTRRefNum = 0;
     }