This allows decoders to know that a baseline stream doesn't contain any of the features that aren't in the constrained baseline subset. Set the flags based on what profile we target.
Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 6 files). Show all
Unified · Split
| @@ -945,9 +945,13 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx) { · 944 unmodified lines | ||
| 945 | 945 | pParam->iMaxNumRefFrame, |
| 946 | 946 | iSpsId, pParam->bEnableFrameCroppingFlag, pParam->iRCMode != RC_OFF_MODE); |
| 947 | 947 | |
| 948 | − if (iDlayerCount > 1) { | |
| 948 | + if (pDlayerParam->uiProfileIdc == PRO_BASELINE) { | |
| 949 | 949 | pSps->bConstraintSet0Flag = true; |
| 950 | + } | |
| 951 | + if (pDlayerParam->uiProfileIdc <= PRO_MAIN) { | |
| 950 | 952 | pSps->bConstraintSet1Flag = true; |
| 953 | + } | |
| 954 | + if (iDlayerCount > 1) { | |
| 951 | 955 | pSps->bConstraintSet2Flag = true; |
| 952 | 956 | } |
| 953 | 957 | } else { |