edith
Clone
https://git.tahinli.com/Tahinli/edith.git
0 watching0 forksRust18.3 MiBff99ad6Tahinli6 days ago1055 commits
| 1 | //! The VP8 software seat: one span of `ec-vp8` through the same loop |
| 2 | //! [`super::run_vp9`] drives `ec-vp9` through, and the same door -- the |
| 3 | //! [`Render`] every other seat's pictures go through, the same speed and |
| 4 | //! lateness rules, the same way a refusal is named on stderr. Export reads the |
| 5 | //! same [`Stream`] to decode its sources. |
| 6 | //! |
| 7 | //! `ec-vp8` takes one demuxed block (one complete frame) at a time, which is |
| 8 | //! exactly what the demuxer hands out, so every access unit goes straight into |
| 9 | //! the decoder. A shown frame comes back as the picture it displays. A hidden |
| 10 | //! frame (an alt-ref or golden update that is not shown) comes back as `None`: |
| 11 | //! unlike VP9's, a hidden VP8 frame is a block of its own in WebM and mp4, so it |
| 12 | //! takes a container slot and sends nothing into it. VP8 has no reorder delay and |
| 13 | //! no `show_existing_frame`, so nothing is held back at the end of the stream. |
| 14 | //! |
| 15 | //! Seeking has only one kind of landing point: a key frame. The demuxer's sync |
| 16 | //! samples are exactly those, so a span starts at the key frame at or before |
| 17 | //! the target, decodes through it, and sends nothing before the target. |
| 18 | |
| 19 | use SyncSender; |
| 20 | |
| 21 | use ; |
| 22 | |
| 23 | use ; |
| 24 | use crateDemuxer; |
| 25 | use crateSpeed; |
| 26 | |
| 27 | /// One VP8 decode, pulled a picture at a time: the decoder and the display index |
| 28 | /// of the next slot. A hidden frame still takes a slot, so the index moves past |
| 29 | /// it without a picture. |
| 30 | pub |
| 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 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | /// The VP8 software seat over `[start_frame, end_frame)`. A span decodes from |
| 85 | /// the key frame at or before `start_frame`; pictures before the target are |
| 86 | /// decoded (the target references them) but never sent. |
| 87 | /// |
| 88 | /// A refusal out of `ec-vp8` fails the span in words: named on stderr, the |
| 89 | /// pictures decoded so far stand, and no garbage is sent. |
| 90 | // The eight inputs every software span takes (`run_vp9` has the same shape); a |
| 91 | // one-off struct would only ever be built and taken apart here. |
| 92 | |
| 93 | pub |
| 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 | |
| 144 | /// `ec-vp8` hands back 8-bit 4:2:0 planes already cropped to the frame, which |
| 145 | /// is the tightly packed I420 every converter here takes -- no narrowing, only |
| 146 | /// the copy that lets the planes outlive the decoder's buffer. |
| 147 | |
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | /// Queues one picture through the shared [`Render`]. `true` when the consumer |
| 159 | /// went away, so the span stops rather than keeps decoding into a void. |
| 160 | |
| 161 | |
| 162 | |
| 163 |