edith
Clone
https://git.tahinli.com/Tahinli/edith.git
0 watching0 forksRust18.3 MiBf2bee6bTahinli2 months ago781 commits
| 1 | //! What this editor can really decode and encode, in one place and in two |
| 2 | //! halves. |
| 3 | //! |
| 4 | //! The *software* half is what this binary was built with: a table, because |
| 5 | //! "is `rav1e` linked into this build" is a question the build already answered |
| 6 | //! and probing for it would only be a slower way of reading the manifest. |
| 7 | //! |
| 8 | //! The *hardware* half is a different answer on every machine and is therefore |
| 9 | //! never a table: [`crate::hw::caps`] asks the plugin, the plugin asks the |
| 10 | //! driver, and what comes back is the intersection of the GPU's entrypoints |
| 11 | //! with the codecs the plugin implements. No plugin, an older plugin or no |
| 12 | //! driver all read the same way -- "software only" -- because that is what they |
| 13 | //! mean for the file a user is about to write. |
| 14 | |
| 15 | use crate; |
| 16 | |
| 17 | /// The codecs a hardware line can name, in the order it lists them. |
| 18 | const HW_CODECS: = |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | ; |
| 24 | |
| 25 | /// The software half: the codec, the crate that carries it here, and which |
| 26 | /// halves of the job that crate does. Named crates rather than a bare "SW", |
| 27 | /// because the answer to "why is my HEVC file so large" is `oxideav-h265 |
| 28 | /// intra`, and the row that says so is the row that answers it. |
| 29 | const SW_CODECS: = |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | ; |
| 41 | |
| 42 | /// The hardware line as a front-end shows it: one measurement per process, |
| 43 | /// costing the plugin's VA-API init (~90 ms) the first time. Ask it off a |
| 44 | /// render thread. |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | /// The software line. Pure and constant -- a caller may ask it per repaint. |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | /// What the plugin answered, in words. Separate from [`hardware`] so the |
| 61 | /// wording can be tested against a machine this test suite does not have. |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | /// Which halves of the job one seat does. Never both empty: a codec with |
| 86 | /// neither is not listed at all. |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 |