The encode:: tests take the knob lock the encoder:: gates already take
Browse files at this commitc1c9418b2d40e2b6924d5409c183e5a73a61002eParent: 5c50b7f- test
- the encode:: tests take the knob lock the encoder:: gates already take
1 changed file +52 -0
- crates/ec-av1/src/encode.rs +52 -0
crates/ec-av1/src/encode.rsmodified+52 -0
| @@ -10335,6 +10335,7 @@ mod tests { | ||
| 10335 | 10335 | /// encode::tests::the_filter_search_picks_real_filters |
| 10336 | 10336 | #[test] |
| 10337 | 10337 | fn the_filter_search_picks_real_filters() { |
| 10338 | + let _knobs = crate::speed::knob_read(); | |
| 10338 | 10339 | let fctx = &crate::decode::FrameCtx::new(); |
| 10339 | 10340 | let pictures: Vec<_> = (0..3).map(|i| panned_test_card(128, 128, i * 3)).collect(); |
| 10340 | 10341 | let encoded = encode_sequence_with_ctx(&pictures, 120, 0.5, fctx).unwrap(); |
| @@ -10414,6 +10415,7 @@ mod tests { | ||
| 10414 | 10415 | /// which is why this is an equality and not a tolerance. |
| 10415 | 10416 | #[test] |
| 10416 | 10417 | fn ffmpeg_decodes_exactly_what_the_encoder_reconstructed() { |
| 10418 | + let _knobs = crate::speed::knob_read(); | |
| 10417 | 10419 | let fctx = &crate::decode::FrameCtx::new(); |
| 10418 | 10420 | if !have_ffmpeg() { |
| 10419 | 10421 | eprintln!("SKIP ffmpeg_decodes_exactly_what_the_encoder_reconstructed: no ffmpeg"); |
| @@ -10495,6 +10497,7 @@ mod tests { | ||
| 10495 | 10497 | /// keeps every non-screen stream byte-identical. |
| 10496 | 10498 | #[test] |
| 10497 | 10499 | fn a_screen_content_picture_codes_palette_blocks_ffmpeg_decodes_exactly() { |
| 10500 | + let _knobs = crate::speed::knob_read(); | |
| 10498 | 10501 | let fctx = &crate::decode::FrameCtx::new(); |
| 10499 | 10502 | let (width, height) = (192usize, 96usize); |
| 10500 | 10503 | let _ = crate::tile::take_palette_hits(); |
| @@ -10605,6 +10608,7 @@ mod tests { | ||
| 10605 | 10608 | #[test] |
| 10606 | 10609 | #[ignore = "needs the real-library manifest and ffmpeg"] |
| 10607 | 10610 | fn probe_intrabc_key_frame() { |
| 10611 | + let _knobs = crate::speed::knob_write(); | |
| 10608 | 10612 | let fctx = &crate::decode::FrameCtx::new(); |
| 10609 | 10613 | let fixtures = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) |
| 10610 | 10614 | .join("../../fixtures"); |
| @@ -10654,6 +10658,7 @@ mod tests { | ||
| 10654 | 10658 | /// exactly what the encoder did. |
| 10655 | 10659 | #[test] |
| 10656 | 10660 | fn a_repeated_pattern_key_frame_codes_intrabc_blocks_ffmpeg_decodes_exactly() { |
| 10661 | + let _knobs = crate::speed::knob_write(); | |
| 10657 | 10662 | let fctx = &crate::decode::FrameCtx::new(); |
| 10658 | 10663 | // Wide enough for the wavefront rule (`INTRABC_DELAY_SB64` = 4 |
| 10659 | 10664 | // superblocks of 64) and tall enough for a source superblock row |
| @@ -10712,6 +10717,7 @@ mod tests { | ||
| 10712 | 10717 | /// same coefficient syntax decodes clean on every intra key-frame gate). |
| 10713 | 10718 | #[test] |
| 10714 | 10719 | fn a_nearestmv_block_with_one_nonzero_coefficient_decodes_clean() { |
| 10720 | + let _knobs = crate::speed::knob_write(); | |
| 10715 | 10721 | let fctx = &crate::decode::FrameCtx::new(); |
| 10716 | 10722 | if !have_ffmpeg() { |
| 10717 | 10723 | eprintln!( |
| @@ -10846,6 +10852,7 @@ mod tests { | ||
| 10846 | 10852 | /// restoration search reads are bit-identical over the frame's own crop. |
| 10847 | 10853 | #[test] |
| 10848 | 10854 | fn the_final_filter_replay_matches_the_capture_decode_at_odd_sizes() { |
| 10855 | + let _knobs = crate::speed::knob_write(); | |
| 10849 | 10856 | let fctx = &crate::decode::FrameCtx::new(); |
| 10850 | 10857 | crate::decode::set_verify_final_replay(true); |
| 10851 | 10858 | for &(width, height) in |
| @@ -10874,6 +10881,7 @@ mod tests { | ||
| 10874 | 10881 | /// `ffprobe` is asserted to report below. |
| 10875 | 10882 | #[test] |
| 10876 | 10883 | fn a_frame_round_trips_at_its_own_size() { |
| 10884 | + let _knobs = crate::speed::knob_read(); | |
| 10877 | 10885 | let fctx = &crate::decode::FrameCtx::new(); |
| 10878 | 10886 | if !have_ffmpeg() { |
| 10879 | 10887 | eprintln!("SKIP a_frame_round_trips_at_its_own_size: no ffmpeg"); |
| @@ -10940,6 +10948,7 @@ mod tests { | ||
| 10940 | 10948 | /// the header's own size before output). |
| 10941 | 10949 | #[test] |
| 10942 | 10950 | fn an_854x480_picture_round_trips_through_its_padding() { |
| 10951 | + let _knobs = crate::speed::knob_read(); | |
| 10943 | 10952 | let fctx = &crate::decode::FrameCtx::new(); |
| 10944 | 10953 | if !have_ffmpeg() { |
| 10945 | 10954 | return; |
| @@ -11185,6 +11194,7 @@ mod tests { | ||
| 11185 | 11194 | /// or the block coder would happen to fail on it. |
| 11186 | 11195 | #[test] |
| 11187 | 11196 | fn odd_dimensions_are_refused() { |
| 11197 | + let _knobs = crate::speed::knob_read(); | |
| 11188 | 11198 | let fctx = &crate::decode::FrameCtx::new(); |
| 11189 | 11199 | for &(width, height) in &[(1921usize, 1080usize), (1920, 1081), (63, 63)] { |
| 11190 | 11200 | let picture = Picture::grey(width, height); |
| @@ -11203,6 +11213,7 @@ mod tests { | ||
| 11203 | 11213 | /// own (padded) reconstruction. |
| 11204 | 11214 | #[test] |
| 11205 | 11215 | fn sequence_round_trips_at_a_non_multiple_size() { |
| 11216 | + let _knobs = crate::speed::knob_read(); | |
| 11206 | 11217 | let fctx = &crate::decode::FrameCtx::new(); |
| 11207 | 11218 | if !have_ffmpeg() { |
| 11208 | 11219 | eprintln!("SKIP sequence_round_trips_at_a_non_multiple_size: no ffmpeg"); |
| @@ -11246,6 +11257,7 @@ mod tests { | ||
| 11246 | 11257 | /// inter tile writer's parity with it across a real multi-frame export. |
| 11247 | 11258 | #[test] |
| 11248 | 11259 | fn a_sequence_round_trips_at_the_exactly_half_straddle_size() { |
| 11260 | + let _knobs = crate::speed::knob_read(); | |
| 11249 | 11261 | let fctx = &crate::decode::FrameCtx::new(); |
| 11250 | 11262 | if !have_ffmpeg() { |
| 11251 | 11263 | eprintln!("SKIP a_sequence_round_trips_at_the_exactly_half_straddle_size: no ffmpeg"); |
| @@ -11291,6 +11303,7 @@ mod tests { | ||
| 11291 | 11303 | /// actually exercised). |
| 11292 | 11304 | #[test] |
| 11293 | 11305 | fn key_frame_and_inter_frame_both_encode_at_half_straddle_size() { |
| 11306 | + let _knobs = crate::speed::knob_read(); | |
| 11294 | 11307 | let fctx = &crate::decode::FrameCtx::new(); |
| 11295 | 11308 | let (width, height) = (640usize, 360usize); |
| 11296 | 11309 | let picture = Picture::grey(width, height); |
| @@ -11310,6 +11323,7 @@ mod tests { | ||
| 11310 | 11323 | /// only encoder-clean. |
| 11311 | 11324 | #[test] |
| 11312 | 11325 | fn a_640x360_half_straddle_round_trips_through_ffmpeg_across_three_frames() { |
| 11326 | + let _knobs = crate::speed::knob_read(); | |
| 11313 | 11327 | let fctx = &crate::decode::FrameCtx::new(); |
| 11314 | 11328 | if !have_ffmpeg() { |
| 11315 | 11329 | eprintln!( |
| @@ -11335,6 +11349,7 @@ mod tests { | ||
| 11335 | 11349 | /// encoder-clean (the test above) but decoder-clean against ffmpeg too. |
| 11336 | 11350 | #[test] |
| 11337 | 11351 | fn a_640x360_half_straddle_sequence_round_trips_through_ffmpeg() { |
| 11352 | + let _knobs = crate::speed::knob_read(); | |
| 11338 | 11353 | let fctx = &crate::decode::FrameCtx::new(); |
| 11339 | 11354 | if !have_ffmpeg() { |
| 11340 | 11355 | eprintln!( |
| @@ -11394,6 +11409,7 @@ mod tests { | ||
| 11394 | 11409 | #[test] |
| 11395 | 11410 | #[ignore = "a sweep, not a gate"] |
| 11396 | 11411 | fn probe_lambda() { |
| 11412 | + let _knobs = crate::speed::knob_read(); | |
| 11397 | 11413 | let fctx = &crate::decode::FrameCtx::new(); |
| 11398 | 11414 | let mut pictures = vec![ |
| 11399 | 11415 | ("test card".to_string(), test_card(160, 96)), |
| @@ -11425,6 +11441,7 @@ mod tests { | ||
| 11425 | 11441 | #[test] |
| 11426 | 11442 | #[ignore = "a sweep, not a gate"] |
| 11427 | 11443 | fn probe_ladder() { |
| 11444 | + let _knobs = crate::speed::knob_read(); | |
| 11428 | 11445 | let fctx = &crate::decode::FrameCtx::new(); |
| 11429 | 11446 | for (name, picture) in sweep_pictures() { |
| 11430 | 11447 | let all = ladder(&picture, &KEY_FRAME_MODES, fctx); |
| @@ -11443,6 +11460,7 @@ mod tests { | ||
| 11443 | 11460 | #[test] |
| 11444 | 11461 | #[ignore = "a sweep, not a gate"] |
| 11445 | 11462 | fn probe_split() { |
| 11463 | + let _knobs = crate::speed::knob_read(); | |
| 11446 | 11464 | let fctx = &crate::decode::FrameCtx::new(); |
| 11447 | 11465 | for (name, picture) in sweep_pictures() { |
| 11448 | 11466 | let ladder = |split: bool| { |
| @@ -11524,6 +11542,7 @@ mod tests { | ||
| 11524 | 11542 | /// over a whole picture and the reconstruction gated against ffmpeg. |
| 11525 | 11543 | #[test] |
| 11526 | 11544 | fn every_mode_decodes_to_what_the_encoder_predicted() { |
| 11545 | + let _knobs = crate::speed::knob_write(); | |
| 11527 | 11546 | let fctx = &crate::decode::FrameCtx::new(); |
| 11528 | 11547 | if !have_ffmpeg() { |
| 11529 | 11548 | eprintln!("SKIP every_mode_decodes_to_what_the_encoder_predicted: no ffmpeg"); |
| @@ -11567,6 +11586,7 @@ mod tests { | ||
| 11567 | 11586 | /// while leaving every fidelity gate intact. |
| 11568 | 11587 | #[test] |
| 11569 | 11588 | fn the_search_picks_the_direction_the_picture_runs() { |
| 11589 | + let _knobs = crate::speed::knob_write(); | |
| 11570 | 11590 | let fctx = &crate::decode::FrameCtx::new(); |
| 11571 | 11591 | // Same confound as [`every_mode_decodes_to_what_the_encoder_predicted`]: |
| 11572 | 11592 | // a filter-intra block is coded `DC_PRED` whatever mode the arm |
| @@ -11674,6 +11694,7 @@ mod tests { | ||
| 11674 | 11694 | /// directional pair has. |
| 11675 | 11695 | #[test] |
| 11676 | 11696 | fn the_search_beats_dc_alone() { |
| 11697 | + let _knobs = crate::speed::knob_read(); | |
| 11677 | 11698 | let fctx = &crate::decode::FrameCtx::new(); |
| 11678 | 11699 | for (name, picture, want) in [ |
| 11679 | 11700 | ("test card", test_card(160, 96), -0.05), |
| @@ -11716,6 +11737,7 @@ mod tests { | ||
| 11716 | 11737 | #[test] |
| 11717 | 11738 | #[ignore = "a sweep, not a gate"] |
| 11718 | 11739 | fn probe_directional() { |
| 11740 | + let _knobs = crate::speed::knob_write(); | |
| 11719 | 11741 | let fctx = &crate::decode::FrameCtx::new(); |
| 11720 | 11742 | for (name, picture) in sweep_pictures() { |
| 11721 | 11743 | let dc = ladder(&picture, &[DC_PRED], fctx); |
| @@ -11790,6 +11812,7 @@ mod tests { | ||
| 11790 | 11812 | /// the above row where it should read the left column, would swap these. |
| 11791 | 11813 | #[test] |
| 11792 | 11814 | fn the_search_picks_the_diagonal_the_picture_runs() { |
| 11815 | + let _knobs = crate::speed::knob_write(); | |
| 11793 | 11816 | let fctx = &crate::decode::FrameCtx::new(); |
| 11794 | 11817 | for (down_right, want) in [(true, D135_PRED), (false, D45_PRED)] { |
| 11795 | 11818 | let picture = diagonal(160, 96, down_right); |
| @@ -11809,6 +11832,7 @@ mod tests { | ||
| 11809 | 11832 | /// it, which is what costing the mode symbol is for. |
| 11810 | 11833 | #[test] |
| 11811 | 11834 | fn the_diagonals_beat_the_modes_that_read_no_further() { |
| 11835 | + let _knobs = crate::speed::knob_read(); | |
| 11812 | 11836 | let fctx = &crate::decode::FrameCtx::new(); |
| 11813 | 11837 | for (name, picture, want) in [ |
| 11814 | 11838 | ("down-right", diagonal(160, 96, true), -0.20), |
| @@ -11832,6 +11856,7 @@ mod tests { | ||
| 11832 | 11856 | /// something else, and a search with nothing to choose from likewise. |
| 11833 | 11857 | #[test] |
| 11834 | 11858 | fn a_mode_the_encoder_cannot_predict_is_refused() { |
| 11859 | + let _knobs = crate::speed::knob_read(); | |
| 11835 | 11860 | let fctx = &crate::decode::FrameCtx::new(); |
| 11836 | 11861 | let picture = test_card(64, 64); |
| 11837 | 11862 | let message = encode_key_frame_with_modes_with_ctx(&picture, 100, 0.5, &[13], fctx) |
| @@ -11851,6 +11876,7 @@ mod tests { | ||
| 11851 | 11876 | /// right picture. |
| 11852 | 11877 | #[test] |
| 11853 | 11878 | fn the_encoded_picture_is_the_one_that_went_in() { |
| 11879 | + let _knobs = crate::speed::knob_read(); | |
| 11854 | 11880 | let fctx = &crate::decode::FrameCtx::new(); |
| 11855 | 11881 | let picture = test_card(160, 96); |
| 11856 | 11882 | let encoded = encode_key_frame_with_ctx(&picture, 100, 0.5, fctx).unwrap(); |
| @@ -11873,6 +11899,7 @@ mod tests { | ||
| 11873 | 11899 | /// loop above this will assume. |
| 11874 | 11900 | #[test] |
| 11875 | 11901 | fn fidelity_and_rate_move_with_the_quantizer() { |
| 11902 | + let _knobs = crate::speed::knob_read(); | |
| 11876 | 11903 | let fctx = &crate::decode::FrameCtx::new(); |
| 11877 | 11904 | let picture = test_card(128, 128); |
| 11878 | 11905 | let mut previous: Option<(usize, f64)> = None; |
| @@ -11940,6 +11967,7 @@ mod tests { | ||
| 11940 | 11967 | /// average, which is the picture's own value, and codes nothing. |
| 11941 | 11968 | #[test] |
| 11942 | 11969 | fn a_flat_picture_costs_almost_nothing() { |
| 11970 | + let _knobs = crate::speed::knob_read(); | |
| 11943 | 11971 | let fctx = &crate::decode::FrameCtx::new(); |
| 11944 | 11972 | let mut picture = Picture::grey(128, 128); |
| 11945 | 11973 | picture.y.fill(97); |
| @@ -11976,6 +12004,7 @@ mod tests { | ||
| 11976 | 12004 | /// still refused is a malformed picture. |
| 11977 | 12005 | #[test] |
| 11978 | 12006 | fn a_picture_off_the_block_grid_encodes_and_a_malformed_one_is_refused() { |
| 12007 | + let _knobs = crate::speed::knob_read(); | |
| 11979 | 12008 | let fctx = &crate::decode::FrameCtx::new(); |
| 11980 | 12009 | encode_key_frame_with_ctx(&Picture::grey(40, 40), 100, 0.5, fctx) |
| 11981 | 12010 | .expect("40x40 cuts a 16x16 leaf on both axes, which is an inferred split"); |
| @@ -12059,6 +12088,7 @@ mod tests { | ||
| 12059 | 12088 | /// right-most) leaf's mode. The stream now round-trips through ffmpeg. |
| 12060 | 12089 | #[test] |
| 12061 | 12090 | fn a_single_axis_straddle_round_trips_through_ffmpeg() { |
| 12091 | + let _knobs = crate::speed::knob_read(); | |
| 12062 | 12092 | let fctx = &crate::decode::FrameCtx::new(); |
| 12063 | 12093 | if !have_ffmpeg() { |
| 12064 | 12094 | eprintln!("SKIP a_single_axis_straddle_round_trips_through_ffmpeg: no ffmpeg"); |
| @@ -12088,6 +12118,7 @@ mod tests { | ||
| 12088 | 12118 | /// synthetic pictures — real video reaches contexts a test card does not. |
| 12089 | 12119 | #[test] |
| 12090 | 12120 | fn a_frame_of_real_video_decodes_to_what_the_encoder_reconstructed() { |
| 12121 | + let _knobs = crate::speed::knob_read(); | |
| 12091 | 12122 | let fctx = &crate::decode::FrameCtx::new(); |
| 12092 | 12123 | let Ok(clip) = std::env::var("EC_AV1_CLIP") else { |
| 12093 | 12124 | eprintln!( |
| @@ -12219,6 +12250,7 @@ mod tests { | ||
| 12219 | 12250 | /// just the last one, and why this is an equality and not a tolerance. |
| 12220 | 12251 | #[test] |
| 12221 | 12252 | fn every_frame_of_a_sequence_decodes_to_what_the_encoder_reconstructed() { |
| 12253 | + let _knobs = crate::speed::knob_read(); | |
| 12222 | 12254 | let fctx = &crate::decode::FrameCtx::new(); |
| 12223 | 12255 | if !have_ffmpeg() { |
| 12224 | 12256 | eprintln!( |
| @@ -12260,6 +12292,7 @@ mod tests { | ||
| 12260 | 12292 | /// names the first differing frame, plane and position. |
| 12261 | 12293 | #[test] |
| 12262 | 12294 | fn every_frame_of_a_sequence_decodes_through_our_own_decoder() { |
| 12295 | + let _knobs = crate::speed::knob_read(); | |
| 12263 | 12296 | let fctx = &crate::decode::FrameCtx::new(); |
| 12264 | 12297 | // 256x128, not the 128x64 this started at: once a leaf could search |
| 12265 | 12298 | // its second reference (lane-av1comp4) the small card's every |
| @@ -12325,6 +12358,7 @@ mod tests { | ||
| 12325 | 12358 | /// expected to be the larger of the two). |
| 12326 | 12359 | #[test] |
| 12327 | 12360 | fn predicted_coeff_bits_track_the_tile_the_writer_wrote() { |
| 12361 | + let _knobs = crate::speed::knob_read(); | |
| 12328 | 12362 | let fctx = &crate::decode::FrameCtx::new(); |
| 12329 | 12363 | let (width, height) = (256usize, 128usize); |
| 12330 | 12364 | let pictures: Vec<Picture> = (0..5) |
| @@ -12429,6 +12463,7 @@ mod tests { | ||
| 12429 | 12463 | /// printed and only the total is asserted on. |
| 12430 | 12464 | #[test] |
| 12431 | 12465 | fn pricer_error_census_by_block_class() { |
| 12466 | + let _knobs = crate::speed::knob_read(); | |
| 12432 | 12467 | let fctx = &crate::decode::FrameCtx::new(); |
| 12433 | 12468 | let (width, height) = (256usize, 128usize); |
| 12434 | 12469 | let pictures: Vec<Picture> = (0..5) |
| @@ -12479,6 +12514,7 @@ mod tests { | ||
| 12479 | 12514 | #[test] |
| 12480 | 12515 | #[ignore = "reads the real library, needs ffmpeg"] |
| 12481 | 12516 | fn pricer_error_census_on_clips() { |
| 12517 | + let _knobs = crate::speed::knob_write(); | |
| 12482 | 12518 | if !have_ffmpeg() { |
| 12483 | 12519 | eprintln!("SKIP pricer_error_census_on_clips: no ffmpeg"); |
| 12484 | 12520 | return; |
| @@ -12546,6 +12582,7 @@ mod tests { | ||
| 12546 | 12582 | /// asserted on beyond being reachable at all. |
| 12547 | 12583 | #[test] |
| 12548 | 12584 | fn low_motion_makes_an_inter_frame_smaller_than_the_key_frame() { |
| 12585 | + let _knobs = crate::speed::knob_read(); | |
| 12549 | 12586 | let fctx = &crate::decode::FrameCtx::new(); |
| 12550 | 12587 | let (width, height) = (256usize, 128usize); |
| 12551 | 12588 | let pictures: Vec<Picture> = (0..5) |
| @@ -12583,6 +12620,7 @@ mod tests { | ||
| 12583 | 12620 | #[test] |
| 12584 | 12621 | #[ignore = "a perf probe, not a gate"] |
| 12585 | 12622 | fn stage_timing_breakdown() { |
| 12623 | + let _knobs = crate::speed::knob_read(); | |
| 12586 | 12624 | let fctx = &crate::decode::FrameCtx::new(); |
| 12587 | 12625 | use std::time::Instant; |
| 12588 | 12626 | |
| @@ -12705,6 +12743,7 @@ mod tests { | ||
| 12705 | 12743 | #[test] |
| 12706 | 12744 | #[ignore = "a perf probe, not a gate"] |
| 12707 | 12745 | fn stage_timing_breakdown_inter() { |
| 12746 | + let _knobs = crate::speed::knob_read(); | |
| 12708 | 12747 | let fctx = &crate::decode::FrameCtx::new(); |
| 12709 | 12748 | use std::time::Instant; |
| 12710 | 12749 | |
| @@ -12753,6 +12792,7 @@ mod tests { | ||
| 12753 | 12792 | #[test] |
| 12754 | 12793 | #[ignore = "needs real clips and ffmpeg; prints numbers for the lane report to judge"] |
| 12755 | 12794 | fn prune_k_quality_sweep() { |
| 12795 | + let _knobs = crate::speed::knob_read(); | |
| 12756 | 12796 | let fctx = &crate::decode::FrameCtx::new(); |
| 12757 | 12797 | if !have_ffmpeg() { |
| 12758 | 12798 | eprintln!("SKIP prune_k_quality_sweep: no ffmpeg"); |
| @@ -12853,6 +12893,7 @@ mod tests { | ||
| 12853 | 12893 | #[test] |
| 12854 | 12894 | #[ignore = "needs real clips and ffmpeg; prints numbers for the lane report to judge"] |
| 12855 | 12895 | fn prune_k_quality_sweep_inter() { |
| 12896 | + let _knobs = crate::speed::knob_read(); | |
| 12856 | 12897 | let fctx = &crate::decode::FrameCtx::new(); |
| 12857 | 12898 | if !have_ffmpeg() { |
| 12858 | 12899 | eprintln!("SKIP prune_k_quality_sweep_inter: no ffmpeg"); |
| @@ -13008,6 +13049,7 @@ mod tests { | ||
| 13008 | 13049 | /// measured - 0.5 dB; byte ceiling = measured * 1.15). |
| 13009 | 13050 | #[test] |
| 13010 | 13051 | fn real_clip_encodes_within_its_quality_and_size_budget() { |
| 13052 | + let _knobs = crate::speed::knob_read(); | |
| 13011 | 13053 | let fctx = &crate::decode::FrameCtx::new(); |
| 13012 | 13054 | if !have_ffmpeg() { |
| 13013 | 13055 | eprintln!("SKIP real_clip_encodes_within_its_quality_and_size_budget: no ffmpeg"); |
| @@ -13069,6 +13111,7 @@ mod tests { | ||
| 13069 | 13111 | /// floor = measured - 0.5 dB; byte ceiling = measured * 1.15). |
| 13070 | 13112 | #[test] |
| 13071 | 13113 | fn real_clip_encodes_within_its_quality_and_size_budget_at_a_straddle_size() { |
| 13114 | + let _knobs = crate::speed::knob_read(); | |
| 13072 | 13115 | let fctx = &crate::decode::FrameCtx::new(); |
| 13073 | 13116 | if !have_ffmpeg() { |
| 13074 | 13117 | eprintln!( |
| @@ -13126,6 +13169,7 @@ mod tests { | ||
| 13126 | 13169 | #[test] |
| 13127 | 13170 | #[ignore = "a perf probe, not a gate"] |
| 13128 | 13171 | fn sequence_bench_sanity() { |
| 13172 | + let _knobs = crate::speed::knob_read(); | |
| 13129 | 13173 | let fctx = &crate::decode::FrameCtx::new(); |
| 13130 | 13174 | use std::time::Instant; |
| 13131 | 13175 | let (width, height) = (1280usize, 720usize); |
| @@ -13149,6 +13193,7 @@ mod tests { | ||
| 13149 | 13193 | #[test] |
| 13150 | 13194 | #[ignore = "a calibration probe, not a gate"] |
| 13151 | 13195 | fn calibration_sweep_base_q_idx() { |
| 13196 | + let _knobs = crate::speed::knob_read(); | |
| 13152 | 13197 | let fctx = &crate::decode::FrameCtx::new(); |
| 13153 | 13198 | if !have_ffmpeg() { |
| 13154 | 13199 | eprintln!("SKIP calibration_sweep_base_q_idx: no ffmpeg"); |
| @@ -13472,6 +13517,7 @@ mod tests { | ||
| 13472 | 13517 | /// (`EC_AV1_ANGLE=0` restores that half). |
| 13473 | 13518 | #[test] |
| 13474 | 13519 | fn the_encoders_own_streams_are_byte_identical_to_their_pins() { |
| 13520 | + let _knobs = crate::speed::knob_read(); | |
| 13475 | 13521 | if !have_ffmpeg() { |
| 13476 | 13522 | eprintln!("SKIP the_encoders_own_streams_are_byte_identical_to_their_pins: no ffmpeg"); |
| 13477 | 13523 | return; |
| @@ -13556,6 +13602,7 @@ mod tests { | ||
| 13556 | 13602 | #[test] |
| 13557 | 13603 | #[ignore = "reads the real library"] |
| 13558 | 13604 | fn probe_screen_detect() { |
| 13605 | + let _knobs = crate::speed::knob_read(); | |
| 13559 | 13606 | if !have_ffmpeg() { |
| 13560 | 13607 | eprintln!("SKIP probe_screen_detect: no ffmpeg"); |
| 13561 | 13608 | return; |
| @@ -13649,6 +13696,7 @@ mod tests { | ||
| 13649 | 13696 | #[test] |
| 13650 | 13697 | #[ignore = "reads the real library"] |
| 13651 | 13698 | fn probe_screen_library() { |
| 13699 | + let _knobs = crate::speed::knob_read(); | |
| 13652 | 13700 | if !have_ffmpeg() { |
| 13653 | 13701 | eprintln!("SKIP probe_screen_library: no ffmpeg"); |
| 13654 | 13702 | return; |
| @@ -13993,6 +14041,7 @@ mod tests { | ||
| 13993 | 14041 | #[test] |
| 13994 | 14042 | #[ignore = "the encoder BD-rate baseline: minutes per clip, needs ffmpeg"] |
| 13995 | 14043 | fn bd_rate_vs_libaom_and_rav1e() { |
| 14044 | + let _knobs = crate::speed::knob_write(); | |
| 13996 | 14045 | if !have_ffmpeg() { |
| 13997 | 14046 | eprintln!("SKIP bd_rate_vs_libaom_and_rav1e: no ffmpeg"); |
| 13998 | 14047 | return; |
| @@ -14579,6 +14628,7 @@ mod tests { | ||
| 14579 | 14628 | #[test] |
| 14580 | 14629 | #[ignore = "the native-resolution BD arm: minutes per row, needs ffmpeg"] |
| 14581 | 14630 | fn bd_rate_screen_native() { |
| 14631 | + let _knobs = crate::speed::knob_read(); | |
| 14582 | 14632 | native_bd_arm("bd_rate_screen_native", 12, false); |
| 14583 | 14633 | } |
| 14584 | 14634 | |
| @@ -14611,6 +14661,7 @@ mod tests { | ||
| 14611 | 14661 | #[test] |
| 14612 | 14662 | #[ignore = "the long-GOP native BD arm: ~7 minutes per film row, needs ffmpeg"] |
| 14613 | 14663 | fn bd_rate_film_long_gop() { |
| 14664 | + let _knobs = crate::speed::knob_write(); | |
| 14614 | 14665 | native_bd_arm("bd_rate_film_long_gop", 48, true); |
| 14615 | 14666 | } |
| 14616 | 14667 | |
| @@ -14775,6 +14826,7 @@ mod tests { | ||
| 14775 | 14826 | #[test] |
| 14776 | 14827 | #[ignore = "needs ffmpeg and the film fixtures"] |
| 14777 | 14828 | fn tpl_intra_denominator_histogram() { |
| 14829 | + let _knobs = crate::speed::knob_read(); | |
| 14778 | 14830 | if !have_ffmpeg() { |
| 14779 | 14831 | eprintln!("SKIP tpl_intra_denominator_histogram: no ffmpeg"); |
| 14780 | 14832 | return; |