edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
| 1 | //! lane-av1threads: the decoder's default frame-worker count. |
| 2 | //! |
| 3 | //! `EC_AV1_THREADS` used to default to 1, so an edith decode ran on one core. |
| 4 | //! It now defaults to `min(available_parallelism, `[`DEFAULT_CAP`]`)`, and |
| 5 | //! `EC_AV1_THREADS=1` still forces the single-threaded decoder. Frame workers |
| 6 | //! are byte-exact by the stream gates; they do not on their own reach 1080p30 |
| 7 | //! realtime on the bench stream (see `lanes/av1threads.report.md`). |
| 8 | //! |
| 9 | //! The in-frame filter bands follow the thread count: at `EC_AV1_THREADS > 1` |
| 10 | //! they default to [`split`]'s filter share, and `EC_AV1_FILTER_THREADS` |
| 11 | //! overrides it. `EC_AV1_THREADS=1` is fully serial. Reconstruction runs on |
| 12 | //! the superblock-row wavefront at `EC_AV1_RECON_THREADS` workers, which |
| 13 | //! defaults to the recon half of [`split`]. |
| 14 | |
| 15 | /// Upper bound on the default frame-worker count. |
| 16 | pub const DEFAULT_CAP: usize = 6; |
| 17 | |
| 18 | /// The default decode thread count: the core count, capped at |
| 19 | /// [`DEFAULT_CAP`]. Never less than 1. |
| 20 | pub |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | /// The in-frame `(recon, filter)` thread split for `threads` decode threads. |
| 27 | /// The recon half is the wavefront's worker count (2 to 4); the filter half |
| 28 | /// is serial at 1, otherwise half the threads (1 to 3). |
| 29 | pub |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | /// The decode thread count for an `EC_AV1_THREADS` value: the parsed value |
| 37 | /// when it is a positive integer, otherwise [`default_threads`]. |
| 38 | /// |
| 39 | /// Under `cfg(test)` the unset default is 1: the gates read thread-local |
| 40 | /// counters that frame workers never increment, so a threaded default would |
| 41 | /// blind about 150 of them. The threaded path is pinned explicitly by |
| 42 | /// [`tests::frame_workers_decode_the_same_pictures_as_one_thread`]. |
| 43 | pub |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | /// Decodes `data` with `threads` frame workers and returns every shown |
| 51 | /// picture's planes, in output order. |
| 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 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 |