Skip to content

Refactor: Cache pipeline TX frame period at create - #1689

Draft
awilczyns wants to merge 1 commit into
mainfrom
fix/st22p-tx-frame-period-cache
Draft

Refactor: Cache pipeline TX frame period at create#1689
awilczyns wants to merge 1 commit into
mainfrom
fix/st22p-tx-frame-period-cache

Conversation

@awilczyns

Copy link
Copy Markdown
Collaborator

The three tx_st*p_if_frame_late() callbacks derived their DROP_WHEN_LATE grace window per frame as NS_PER_S / st_frame_rate(ops.fps): a float division and a table search in a transport callback, and a divide by zero for an fps outside the timing table (Coverity CID 558964). That zero is unreachable today — the session layer rejects an unknown fps at attach — so this is hardening, not a defect fix. New st_frame_period_ns() derives the period from the exact rational rate; its truncated result is bit-identical to the float form for all 11 timing-table entries.

The three tx_st*p_if_frame_late() callbacks derived their DROP_WHEN_LATE
grace window per frame as NS_PER_S / st_frame_rate(ops.fps): a float
division and a table search in a transport callback, and a divide by
zero for an fps outside the timing table (Coverity CID 558964). That
zero is unreachable today — the session layer rejects an unknown fps at
attach — so this is hardening, not a defect fix. New st_frame_period_ns()
derives the period from the exact rational rate; its truncated result is
bit-identical to the float form for all 11 timing-table entries.

Signed-off-by: Wilczynski, Andrzej <andrzej.wilczynski@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant