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

Method RcvGetColumnGroupIndex

srtcore/fec.cpp:2314–2490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2312}
2313
2314int FECFilterBuiltin::RcvGetColumnGroupIndex(int32_t seqno, EHangStatus& w_status)
2315{
2316 // The column is only the column, not yet
2317 // exactly the index of the column group in the container.
2318 // It's like:
2319
2320 // 0 1 2 3 4
2321 // [A] ' ' ' '
2322 // [A] [A] ' ' '
2323 // [A] [A] [A] ' '
2324 // [A] [A] [A] [A] '++
2325 // [A]+[A] [A] [A] [A]+
2326 // [B] [A]+[A] [A] [A]+
2327 // [B] [B] [A]+[A] [A]+
2328 // [B] [B] [B] [A]+[A]+
2329 // [B] [B] [B] [B] [A]++
2330 // [B]+[B] [B] [B] [B]
2331 // [B] [B] [B] [B]
2332 // [B] [B] [B]
2333 // [B] [B]
2334 // [B]
2335 //
2336 // The same groups laid out in the container:
2337 //
2338 // [A]0 [A]1 [A]2 [A]3 [A]4 [B]0 [B]1 [B]2 [B]3 [B]4
2339
2340 // This means, vert_gx returns the number for the
2341 // logical column, but we only know this column,
2342 // not the exact group that is assigned to this
2343 // packet. That is, in the above picture, if the
2344 // vert_gx resulted in 3, we still don't know if
2345 // this is A3 or B3.
2346 //
2347 // To know it, we need to first take the base
2348 // sequence number for the very first column group
2349 // in the container. Every next group in this
2350 // container is shifted by the 'slip' factor,
2351 // which in this case is m_number_cols + 1. The base
2352 // sequence shifted by m_number_cols*m_number_rows
2353 // becomes the sequence number of the next
2354 // group in the same column.
2355 //
2356 // If a single column is dismissed, then the
2357 // column 1 will become column 0, but the column
2358 // 1 in the next series will also become column 0.
2359 // All due to that the very base sequence for
2360 // all groups will be the one in the first series
2361 // column 1, now 0.
2362 //
2363 // Therefore, once we have the column, let's extract
2364 // the column base sequence.
2365 // As we can't count on that packets will surely come to close a group
2366 // or just a particular sequence number will be received, we simply have
2367 // to check all past groups at the moment when this packet is received:
2368 //
2369 // 1. Take the sequence number and determine both the GROUP INDEX and the
2370 // COLUMN INDEX of this group.
2371 //

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected