edith
Clone
https://git.tahinli.com/Tahinli/edith.git
0 watching0 forksRust18.3 MiBb8aec29Tahinli2 months ago966 commits
| 1 | //! The stream's matrix reaching the picture a player shows, through the door |
| 2 | //! the window itself opens ([`PlaybackSession`]) rather than through the |
| 3 | //! converter alone. |
| 4 | //! |
| 5 | //! Two fixtures, one picture: `test_bt601.mkv` and `test_h264.mkv` are the same |
| 6 | //! `testsrc2` at 1280x720 through the same encoder, and their first frames were |
| 7 | //! byte-identical while every file was converted as BT.601 -- the FNV constant |
| 8 | //! below is that shared frame, measured before this change. What separates them |
| 9 | //! now is only what they *say*: the first tags SMPTE 170M in its container, the |
| 10 | //! second tags nothing and is 720 lines, so the heuristic calls it BT.709. |
| 11 | //! |
| 12 | //! ```text |
| 13 | //! cargo test -p engine --release --test matrix_render -- --test-threads=1 |
| 14 | //! ``` |
| 15 | |
| 16 | use PathBuf; |
| 17 | use ; |
| 18 | |
| 19 | use PlaybackSession; |
| 20 | use Matrix; |
| 21 | |
| 22 | /// Frame 0 of either fixture as the engine converted it before it read a single |
| 23 | /// colour tag: BT.601 limited, both files. |
| 24 | const LEGACY_601_FRAME: u64 = 0x872e_4f9c_4165_0c9e; |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | /// The first frame of `name`, and the matrix the engine resolved for it. Pinned |
| 39 | /// to the software decoder so the bytes are the same on a machine with a VA-API |
| 40 | /// plugin and one without -- hence `--test-threads=1`. |
| 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 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 |