Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 4 files). Show all
Unified · Split
| @@ -2468,6 +2468,7 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 2467 unmodified lines | |||
| 2468 | if (pFeatureSearchPreparation->bFMESwitchFlag | 2468 | if (pFeatureSearchPreparation->bFMESwitchFlag |
| 2469 | && !pScreenBlockFeatureStorage->bRefBlockFeatureCalculated) { | 2469 | && !pScreenBlockFeatureStorage->bRefBlockFeatureCalculated) { |
| 2470 | pScreenBlockFeatureStorage->pFeatureOfBlockPointer = pFeatureSearchPreparation->pFeatureOfBlock; | 2470 | pScreenBlockFeatureStorage->pFeatureOfBlockPointer = pFeatureSearchPreparation->pFeatureOfBlock; |
| 2471 | //TODO: use ORIGIN of reference when preprocessing is ready | ||
| 2471 | PerformFMEPreprocess( pFuncList, pCurLayer->pRefPic, pScreenBlockFeatureStorage ); | 2472 | PerformFMEPreprocess( pFuncList, pCurLayer->pRefPic, pScreenBlockFeatureStorage ); |
| 2472 | } | 2473 | } |
| 2473 | 2474 | ||
| @@ -2475,10 +2476,17 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 1 unmodified line | |||
| 2475 | if (pScreenBlockFeatureStorage->bRefBlockFeatureCalculated) { | 2476 | if (pScreenBlockFeatureStorage->bRefBlockFeatureCalculated) { |
| 2476 | //TBC int32_t iIs16x16 = pScreenBlockFeatureStorage->iIs16x16; | 2477 | //TBC int32_t iIs16x16 = pScreenBlockFeatureStorage->iIs16x16; |
| 2477 | } | 2478 | } |
| 2479 | |||
| 2480 | //assign UpdateFMESwitch pointer | ||
| 2481 | if (pFeatureSearchPreparation->bFMESwitchFlag) { | ||
| 2482 | pFuncList->pfUpdateFMESwitch = UpdateFMESwitch; | ||
| 2483 | } else { | ||
| 2484 | pFuncList->pfUpdateFMESwitch = UpdateFMESwitchNull; | ||
| 2485 | } | ||
| 2478 | } else { | 2486 | } else { |
| 2479 | //reset some status when at I_SLICE | 2487 | //reset some status when at I_SLICE |
| 2480 | pFeatureSearchPreparation->bFMESwitchFlag = true; | 2488 | pFeatureSearchPreparation->bFMESwitchFlag = true; |
| 2481 | pFeatureSearchPreparation->uiFMEGoodFrameCount = FME_DEFAULT_GOOD_FRAME_NUM; | 2489 | pFeatureSearchPreparation->uiFMEGoodFrameCount = FMESWITCH_DEFAULT_GOODFRAME_NUM; |
| 2482 | } | 2490 | } |
| 2483 | } | 2491 | } |
| 2484 | } | 2492 | } |