shithub: openh264

Download patch

ref: 9506f71b435e1c27ba0bd52bc6b953fe385995d9
parent: fb4c907ecbb3c4af9ac372060a55efa1f0de1f11
parent: 6e40991cc7697ee01666e0df8d4a1ff127a0eddc
author: ruil2 <[email protected]>
date: Fri Jul 4 06:43:41 EDT 2014

Merge pull request #1060 from mstorsjo/loopfilter-multithreading

Only force iLoopFilterDisableIdc to 2 if multithreading has been enabled

--- a/codec/encoder/core/inc/param_svc.h
+++ b/codec/encoder/core/inc/param_svc.h
@@ -293,9 +293,11 @@
   SUsedPicRect.iWidth = ((iPicWidth >> 1) << 1);
   SUsedPicRect.iHeight = ((iPicHeight >> 1) << 1);
 
+  iMultipleThreadIdc = pCodingParam.iMultipleThreadIdc;
+
   /* Deblocking loop filter */
   iLoopFilterDisableIdc	= pCodingParam.iLoopFilterDisableIdc;	// 0: on, 1: off, 2: on except for slice boundaries,
-  if (iLoopFilterDisableIdc == 0) // Loop filter requested to be enabled
+  if (iLoopFilterDisableIdc == 0 && iMultipleThreadIdc != 1) // Loop filter requested to be enabled, with threading enabled
     iLoopFilterDisableIdc = 2; // Disable loop filter on slice boundaries since that's not allowed with multithreading
   iLoopFilterAlphaC0Offset = pCodingParam.iLoopFilterAlphaC0Offset;	// AlphaOffset: valid range [-6, 6], default 0
   iLoopFilterBetaOffset = pCodingParam.iLoopFilterBetaOffset;	// BetaOffset:	valid range [-6, 6], default 0
@@ -331,8 +333,6 @@
   /* Enable int32_t term reference */
   bEnableLongTermReference	= pCodingParam.bEnableLongTermReference ? true : false;
   iLtrMarkPeriod = pCodingParam.iLtrMarkPeriod;
-
-  iMultipleThreadIdc = pCodingParam.iMultipleThreadIdc;
 
   /* For ssei information */
   bEnableSSEI		= pCodingParam.bEnableSSEI;
--- a/test/api/encoder_test.cpp
+++ b/test/api/encoder_test.cpp
@@ -97,7 +97,7 @@
   },
   {
     "res/Cisco_Absolute_Power_1280x720_30fps.yuv",
-    "f4377e3d23748d5f997cd286bc71cc75fbc72013", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1
+    "2bc06262d87fa0897ad4c336cc4047d5a67f7203", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1
   },
   {
     "res/CiscoVT2people_320x192_12fps.yuv",