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

Method SimulateSliceInOnePartition

test/encoder/EncUT_SliceBufferReallocate.cpp:387–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385}
386
387void CSliceBufferReallocatTest::SimulateSliceInOnePartition (const int32_t kiPartNum,
388 const int32_t kiPartIdx,
389 const int32_t kiSlcNumInPart) {
390 int32_t iSlcIdxInPart = 0;
391
392 //slice within same partition will encoded by same thread in current design
393 int32_t iPartitionThrdIdx = RandAvailableThread (&m_EncContext, kiSlcNumInPart);
394 ASSERT_TRUE (-1 != iPartitionThrdIdx);
395
396 for (int32_t iSlcIdx = 0; iSlcIdx < kiSlcNumInPart; iSlcIdx++) {
397 iSlcIdxInPart = kiPartIdx + kiPartNum * iSlcIdx;
398
399 SimulateEncodedOneSlice (iSlcIdxInPart, iPartitionThrdIdx);
400
401 m_EncContext.pCurDqLayer->NumSliceCodedOfPartition[kiPartIdx] ++;
402 m_EncContext.pCurDqLayer->sSliceEncCtx.iSliceNumInFrame ++;
403 }
404}
405
406void CSliceBufferReallocatTest::SimulateSliceInOneLayer() {
407 int32_t iLayerIdx = 0;

Callers

nothing calls this directly

Calls 1

RandAvailableThreadFunction · 0.85

Tested by

no test coverage detected