MCPcopy Create free account
hub / github.com/Haivision/srt / ExtendRows

Method ExtendRows

srtcore/fec.cpp:1559–1603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1557}
1558
1559size_t FECFilterBuiltin::ExtendRows(size_t rowx)
1560{
1561 // Check if oversize. Oversize is when the
1562 // index is > 2*m_number_cols. If so, shrink
1563 // the container first.
1564
1565#if ENABLE_HEAVY_LOGGING
1566 LOGC(pflog.Debug, log << "FEC: ROW STATS BEFORE: n=" << rcv.rowq.size());
1567
1568 for (size_t i = 0; i < rcv.rowq.size(); ++i)
1569 LOGC(pflog.Debug, log << "... [" << i << "] " << rcv.rowq[i].DisplayStats());
1570#endif
1571
1572 const size_t size_in_packets = rowx * numberCols();
1573 const int n_series = int(rowx / numberRows());
1574
1575 if (CheckEmergencyShrink(n_series, size_in_packets))
1576 {
1577 HLOGC(pflog.Debug, log << "FEC: DONE Emergency resize, rowx=" << rowx << " series=" << n_series
1578 << "npackets=" << size_in_packets << " exceeds buf=" << rcvBufferSize());
1579 }
1580
1581 // Create and configure next groups.
1582 size_t old = rcv.rowq.size();
1583
1584 // First, add the number of groups.
1585 rcv.rowq.resize(rowx + 1);
1586
1587 // Starting from old size
1588 for (size_t i = old; i < rcv.rowq.size(); ++i)
1589 {
1590 // Initialize the base for the row group
1591 int32_t ibase = CSeqNo::incseq(rcv.rowq[0].base, int(i*m_number_cols));
1592 ConfigureGroup(rcv.rowq[i], ibase, 1, m_number_cols);
1593 }
1594
1595#if ENABLE_HEAVY_LOGGING
1596 LOGC(pflog.Debug, log << "FEC: ROW STATS AFTER: n=" << rcv.rowq.size());
1597
1598 for (size_t i = 0; i < rcv.rowq.size(); ++i)
1599 LOGC(pflog.Debug, log << "... [" << i << "] " << rcv.rowq[i].DisplayStats());
1600#endif
1601
1602 return rowx;
1603}
1604
1605int FECFilterBuiltin::RcvGetRowGroupIndex(int32_t seq, EHangStatus& w_status)
1606{

Callers

nothing calls this directly

Calls 2

DisplayStatsMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected