edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
| 1 | //! bench: TrueHD decode throughput for lanes/bench.md ("lane benchaudio"). |
| 2 | //! |
| 3 | //! usage: bench dec <in.thd> <out.s32le> [reps] |
| 4 | //! |
| 5 | //! Splits a raw TrueHD elementary stream (as ffmpeg's `truehd` muxer writes it) into access |
| 6 | //! units with `frame_length`, decodes each with `TrueHdDecoder`, `reps` times (default 5), and |
| 7 | //! keeps the best wall time. The decoded interleaved S32 samples of the last run are written to |
| 8 | //! `out.s32le`. The lossless self-checks (`check_stats`) are printed; any failure count other |
| 9 | //! than zero means the decode is not trustworthy. |
| 10 | use black_box; |
| 11 | use Instant; |
| 12 | |
| 13 | use ; |
| 14 | |
| 15 | /// Decode the whole stream once: (S32 bytes, channels, rate, access units, lossless failures). |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 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 |