! * \brief write reference picture marking syntax in pSlice header */
| 239 | * \brief write reference picture marking syntax in pSlice header |
| 240 | */ |
| 241 | void WriteRefPicMarking (SBitStringAux* pBs, SSliceHeader* pSliceHeader, SNalUnitHeaderExt* pNalHdrExt) { |
| 242 | SRefPicMarking* sRefMarking = &pSliceHeader->sRefMarking; |
| 243 | int16_t n = 0; |
| 244 | |
| 245 | if (pNalHdrExt->bIdrFlag) { |
| 246 | BsWriteOneBit (pBs, sRefMarking->bNoOutputOfPriorPicsFlag); |
| 247 | BsWriteOneBit (pBs, sRefMarking->bLongTermRefFlag); |
| 248 | } else { |
| 249 | BsWriteOneBit (pBs, sRefMarking->bAdaptiveRefPicMarkingModeFlag); |
| 250 | |
| 251 | if (sRefMarking->bAdaptiveRefPicMarkingModeFlag) { |
| 252 | int32_t iMmcoType; |
| 253 | do { |
| 254 | iMmcoType = sRefMarking->SMmcoRef[n].iMmcoType; |
| 255 | BsWriteUE (pBs, iMmcoType); |
| 256 | if (1 == iMmcoType || 3 == iMmcoType) |
| 257 | BsWriteUE (pBs, sRefMarking->SMmcoRef[n].iDiffOfPicNum - 1); |
| 258 | |
| 259 | if (2 == iMmcoType) |
| 260 | BsWriteUE (pBs, sRefMarking->SMmcoRef[n].iLongTermPicNum); |
| 261 | |
| 262 | if (3 == iMmcoType || 6 == iMmcoType) |
| 263 | BsWriteUE (pBs, sRefMarking->SMmcoRef[n].iLongTermFrameIdx); |
| 264 | |
| 265 | if (4 == iMmcoType) |
| 266 | BsWriteUE (pBs, sRefMarking->SMmcoRef[n].iMaxLongTermFrameIdx + 1); |
| 267 | |
| 268 | n ++; |
| 269 | } while (0 != iMmcoType); |
| 270 | } |
| 271 | |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | void WelsSliceHeaderWrite (sWelsEncCtx* pCtx, SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice, |
| 276 | IWelsParametersetStrategy* pParametersetStrategy) { |
no test coverage detected