MCPcopy Create free account
hub / github.com/cisco/openh264 / WelsGetPaddingOffset

Function WelsGetPaddingOffset

codec/encoder/core/src/au_set.cpp:476–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474}
475
476static inline bool WelsGetPaddingOffset (int32_t iActualWidth, int32_t iActualHeight, int32_t iWidth,
477 int32_t iHeight, SCropOffset& pOffset) {
478 if ((iWidth < iActualWidth) || (iHeight < iActualHeight))
479 return false;
480
481 // make actual size even
482 iActualWidth -= (iActualWidth & 1);
483 iActualHeight -= (iActualHeight & 1);
484
485 pOffset.iCropLeft = 0;
486 pOffset.iCropRight = (iWidth - iActualWidth) / 2;
487 pOffset.iCropTop = 0;
488 pOffset.iCropBottom = (iHeight - iActualHeight) / 2;
489
490 return (iWidth > iActualWidth) || (iHeight > iActualHeight);
491}
492int32_t WelsInitSps (SWelsSPS* pSps, SSpatialLayerConfig* pLayerParam, SSpatialLayerInternal* pLayerParamInternal,
493 const uint32_t kuiIntraPeriod, const int32_t kiNumRefFrame,
494 const uint32_t kuiSpsId, const bool kbEnableFrameCropping, bool bEnableRc,

Callers 1

WelsInitSpsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected