Skip to main content

check_animation_timing

Function check_animation_timing 

Source
pub fn check_animation_timing<E, D>(
    enc: E,
    dec: D,
    pixels: PixelSlice<'_>,
    exact: bool,
    cases: &[(FrameDuration, Option<FrameDuration>)],
) -> Conformance
where E: EncoderConfig + 'static, D: DecoderConfig + 'static, <E::Job as EncodeJob>::Enc: Encoder + Send, <E::Job as EncodeJob>::AnimationFrameEnc: AnimationFrameEncoder,
Expand description

Exercise exact or ordinary timing through both generic and erased encoders. Each pair is (requested, expected_encoded); None requires rejection. Include accepted frames before and after rejected inputs to detect state mutation. Expected rounded durations must come from the destination clock, independently of the codec/quantizer under test. At least two must succeed. For exact mode each successful duration must equal its request.