edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
| 1 | //! Decode benchmark for ec-h265: one raw Annex-B H.265 file in, ms/frame out. |
| 2 | //! |
| 3 | //! Run (release, from the repo root; fixtures from `scripts/gen-hevcperf-fixtures.sh`): |
| 4 | //! |
| 5 | //! ```text |
| 6 | //! cargo run -p ec-h265 --release --example decode_bench -- \ |
| 7 | //! ~/.cache/hevcperf-fixtures/hevc1080_moving.hevc |
| 8 | //! ``` |
| 9 | //! |
| 10 | //! Decodes the whole file `EC_BENCH_RUNS` times (default 3) and prints the best run |
| 11 | //! as ms/frame and the realtime factor against the stream's frame rate (30 fps unless |
| 12 | //! `EC_BENCH_FPS` says otherwise). The FNV-1a checksum over every output plane is |
| 13 | //! printed too, so a speed change that alters any sample shows up here before the |
| 14 | //! conformance suite runs. |
| 15 | |
| 16 | use Instant; |
| 17 | |
| 18 | use Decoder; |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | /// Decode the whole stream once. Returns the frame count, and the output checksum when |
| 30 | /// `want_hash` is set. The checksum is kept out of the timed runs (it costs more than some |
| 31 | /// stages), so the timed runs only time the decoder. |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 |