edith
Clone
https://git.tahinli.com/Tahinli/edith.git
0 watching0 forksRust18.3 MiBc327308Tahinli25 days ago1014 commits
| 1 | //! The raw video software seat: uncompressed pictures in an AVI (`BI_RGB` 8 bit palette, RGB555, |
| 2 | //! 24 and 32 bit, YUY2, UYVY, YVYU, I420, YV12, NV12, Y800, v210) or a QuickTime mov (`raw `, |
| 3 | //! `2vuy`, `yuvs`, `yuv2`, `v210`, `v410`, `b16g`), unpacked and flipped upright by `ec-riff`'s [`RawVideoDecoder`] and handed |
| 4 | //! to the shared intra-only stream and span loop ([`super::intra`]). Every picture is a sync |
| 5 | //! sample, so a seek is one sample read. |
| 6 | //! |
| 7 | //! YUV layouts keep their own chroma (4:2:2 averaged down to 4:2:0 as every 4:2:2 source is) and |
| 8 | //! are untagged like the rest of an AVI's pictures. RGB is turned into 4:4:4 YCbCr with the |
| 9 | //! BT.709 matrix over the full range at 8 bit, and tagged as exactly that, so the one conversion |
| 10 | //! back to RGB every source takes undoes it (to within a code or two, the chroma being averaged |
| 11 | //! down to 4:2:0 on the way, as for any 4:4:4 source). The alpha of a 32-bit DIB is dropped: the |
| 12 | //! engine composites a clip as opaque. |
| 13 | |
| 14 | use ; |
| 15 | use ; |
| 16 | use RawVideoDecoder; |
| 17 | |
| 18 | use ; |
| 19 | |
| 20 | pub RawVideoDecoder); |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | pub type Stream = Stream; |
| 35 | |
| 36 | /// An upright picture as the planar YCbCr the engine takes: RGB (any of `Bgr8`, `Rgb8`, `Bgra8`) |
| 37 | /// becomes full-range BT.709 4:4:4, NV12 is split into I420, 16-bit gray is narrowed to 10-bit |
| 38 | /// (`I010`, neutral chroma), and every other layout is left as it is (`Gray8` is given neutral |
| 39 | /// chroma by the shared fold, 4:2:2 / 4:4:4 at 10 bit are carried as they are). |
| 40 | pub |
| 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 | /// NV12 (luma, then interleaved CbCr) as I420. |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | /// 16-bit little-endian gray as `I010`: luma rounded down to 10 bit, chroma neutral (512). |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 |