T4.5: I-frame FEC ratio boost — keyframe-aware repair ratio in RaptorQFecEncoder
- Add add_source_symbol_with_keyframe() default method to FecEncoder trait - RaptorQFecEncoder tracks has_keyframe per block, uses keyframe_ratio when generating repair symbols for keyframe blocks - AdaptiveFec gains keyframe_repair_ratio (default 0.5) and wires it through build_encoder() - 3 new tests: keyframe boost, non-keyframe nominal ratio, finalize clears flag - Update status board T4.5 -> Pending Review
This commit is contained in:
@@ -61,6 +61,22 @@ pub trait FecEncoder: Send + Sync {
|
||||
/// Add a source symbol (one audio frame) to the current block.
|
||||
fn add_source_symbol(&mut self, data: &[u8]) -> Result<(), FecError>;
|
||||
|
||||
/// Add a source symbol and mark whether it belongs to a keyframe.
|
||||
///
|
||||
/// When the block contains at least one keyframe source symbol,
|
||||
/// [`generate_repair`] uses the configured keyframe ratio instead of the
|
||||
/// nominal ratio.
|
||||
///
|
||||
/// Default implementation delegates to [`add_source_symbol`] and ignores
|
||||
/// the keyframe flag.
|
||||
fn add_source_symbol_with_keyframe(
|
||||
&mut self,
|
||||
data: &[u8],
|
||||
_is_keyframe: bool,
|
||||
) -> Result<(), FecError> {
|
||||
self.add_source_symbol(data)
|
||||
}
|
||||
|
||||
/// Generate repair symbols for the current block.
|
||||
///
|
||||
/// `ratio` is the repair overhead (e.g., 0.5 = 50% more symbols than source).
|
||||
|
||||
Reference in New Issue
Block a user