edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust375.8 MiB5c8eff8Tahinli2 months ago2949 commits
| 1 | //! The BD gate's source arming, shared with `examples/enc_probe` (lane-probe). |
| 2 | //! |
| 3 | //! The probe used to build its own ffmpeg command line and dropped the gate's |
| 4 | //! `-ss` seek, so it read film B's black leader and every census taken through |
| 5 | //! it was probe-relative (59 kB where the gate's own ladder point coded 89 kB |
| 6 | //! of the same title). One definition now serves both: the gate's |
| 7 | //! `clip_frames_vf` and the probe both call [`source`], so the two can only |
| 8 | //! differ in the arguments they pass, which |
| 9 | //! `encode::tests::the_probe_arms_the_gates_source` pins. |
| 10 | |
| 11 | use cratePicture; |
| 12 | use Command; |
| 13 | |
| 14 | /// The video stream's coded size, from ffprobe. |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | /// The native BD gate's window on `clip`: a whole number of 128-wide |
| 29 | /// superblocks, at most 1920x1024, out of the MIDDLE of the coded frame, with |
| 30 | /// even offsets for 4:2:0 -- as an ffmpeg `crop` filter plus its size. |
| 31 | /// |
| 32 | /// This lives here because the probe used to be handed the crop by hand, and |
| 33 | /// a hand-written `crop=1920:1024:960:568` (a 2160-high frame that film B, |
| 34 | /// coded 3840x1608, is not) put the instrument on different pixels than the |
| 35 | /// gate: 60 kB where the gate's own q=150 point coded 90 kB. |
| 36 | /// |
| 37 | /// # Panics |
| 38 | /// When ffprobe cannot read the size, or the frame is under one superblock. |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | /// `frames` pictures of `clip` from `skip` through the filter chain `vf`, as |
| 50 | /// planar 8-bit 4:2:0 at `width`x`height` -- the BD gate's loader recipe. |
| 51 | /// |
| 52 | /// # Panics |
| 53 | /// When ffmpeg cannot be run, fails, or delivers a different number of frames. |
| 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 |