The transform reaches both render paths
Browse files at this commitf4e379fb38edca6c02b6f439a6cc9cfee50d37f8Parent: 5984e27- feat
- the transform reaches both render paths
3 changed files +104 -7
- crates/engine/src/decode.rs +49 -4
- crates/engine/src/export.rs +38 -3
- crates/engine/src/playback.rs +17 -0
crates/engine/src/decode.rsmodified+49 -4
| @@ -17,6 +17,7 @@ use crate::hw::HwSession; | ||
| 17 | 17 | use crate::project::Speed; |
| 18 | 18 | use crate::scale::Composer; |
| 19 | 19 | use crate::tonemap::{self, ToneMapper}; |
| 20 | +use crate::transform::TransformParams; | |
| 20 | 21 | |
| 21 | 22 | /// One decoded picture, ready to hand to a renderer. |
| 22 | 23 | pub struct Frame { |
| @@ -176,6 +177,7 @@ struct SpanCmd { | ||
| 176 | 177 | start: u32, |
| 177 | 178 | end: u32, |
| 178 | 179 | color: ColorParams, |
| 180 | + transform: TransformParams, | |
| 179 | 181 | canvas: Composer, |
| 180 | 182 | tone: tonemap::Preset, |
| 181 | 183 | /// The clip's own playback speed ([`crate::project::Clip::speed`]), for |
| @@ -308,6 +310,7 @@ impl Worker { | ||
| 308 | 310 | start: u32, |
| 309 | 311 | end: u32, |
| 310 | 312 | color: ColorParams, |
| 313 | + transform: TransformParams, | |
| 311 | 314 | canvas: Composer, |
| 312 | 315 | tone: tonemap::Preset, |
| 313 | 316 | speed: Speed, |
| @@ -331,6 +334,7 @@ impl Worker { | ||
| 331 | 334 | start, |
| 332 | 335 | end, |
| 333 | 336 | color, |
| 337 | + transform, | |
| 334 | 338 | canvas, |
| 335 | 339 | tone, |
| 336 | 340 | speed, |
| @@ -433,6 +437,9 @@ impl DecodeSession { | ||
| 433 | 437 | start_frame, |
| 434 | 438 | end_frame, |
| 435 | 439 | ColorParams::default(), |
| 440 | + // No clip, no transform either: the file-level API hands back the | |
| 441 | + // pictures the file holds, untouched. | |
| 442 | + TransformParams::default(), | |
| 436 | 443 | // No project, no canvas: the file-level API hands back the |
| 437 | 444 | // pictures the file holds, at the size it holds them. |
| 438 | 445 | Composer::passthrough(), |
| @@ -512,6 +519,7 @@ impl DecodeSession { | ||
| 512 | 519 | start_frame: u32, |
| 513 | 520 | len: u32, |
| 514 | 521 | color: ColorParams, |
| 522 | + transform: TransformParams, | |
| 515 | 523 | canvas: Composer, |
| 516 | 524 | ) -> crate::Result<FrameStream> { |
| 517 | 525 | let still = Still::open(path)?; |
| @@ -538,6 +546,7 @@ impl DecodeSession { | ||
| 538 | 546 | // the project is watching. |
| 539 | 547 | let first = Render::new( |
| 540 | 548 | color, |
| 549 | + transform, | |
| 541 | 550 | ColorDescription::default(), |
| 542 | 551 | canvas, |
| 543 | 552 | tonemap::Preset::default(), |
| @@ -610,6 +619,7 @@ impl DecodeSession { | ||
| 610 | 619 | start_frame: u32, |
| 611 | 620 | end_frame: u32, |
| 612 | 621 | color: ColorParams, |
| 622 | + transform: TransformParams, | |
| 613 | 623 | canvas: Composer, |
| 614 | 624 | tone: tonemap::Preset, |
| 615 | 625 | ) -> crate::Result<(VideoMeta, FrameStream)> { |
| @@ -650,6 +660,7 @@ impl DecodeSession { | ||
| 650 | 660 | start_frame, |
| 651 | 661 | end_frame, |
| 652 | 662 | color, |
| 663 | + transform, | |
| 653 | 664 | canvas, |
| 654 | 665 | tone, |
| 655 | 666 | // A file-level open has no clip and no speed to skip frames |
| @@ -677,6 +688,7 @@ impl DecodeSession { | ||
| 677 | 688 | start_frame: u32, |
| 678 | 689 | end_frame: u32, |
| 679 | 690 | color: ColorParams, |
| 691 | + transform: TransformParams, | |
| 680 | 692 | canvas: Composer, |
| 681 | 693 | tone: tonemap::Preset, |
| 682 | 694 | speed: Speed, |
| @@ -687,6 +699,7 @@ impl DecodeSession { | ||
| 687 | 699 | start_frame, |
| 688 | 700 | end_frame, |
| 689 | 701 | color, |
| 702 | + transform, | |
| 690 | 703 | canvas, |
| 691 | 704 | tone, |
| 692 | 705 | speed, |
| @@ -710,6 +723,7 @@ fn span_worker( | ||
| 710 | 723 | start_frame: u32, |
| 711 | 724 | end_frame: u32, |
| 712 | 725 | color: ColorParams, |
| 726 | + transform: TransformParams, | |
| 713 | 727 | canvas: Composer, |
| 714 | 728 | tone: tonemap::Preset, |
| 715 | 729 | speed: Speed, |
| @@ -740,6 +754,7 @@ fn span_worker( | ||
| 740 | 754 | start: start_frame, |
| 741 | 755 | end: end_frame, |
| 742 | 756 | color, |
| 757 | + transform, | |
| 743 | 758 | canvas, |
| 744 | 759 | tone, |
| 745 | 760 | speed, |
| @@ -919,6 +934,7 @@ fn run_span( | ||
| 919 | 934 | start, |
| 920 | 935 | end, |
| 921 | 936 | color, |
| 937 | + transform, | |
| 922 | 938 | canvas, |
| 923 | 939 | tone, |
| 924 | 940 | speed, |
| @@ -947,7 +963,7 @@ fn run_span( | ||
| 947 | 963 | // The stream's own colour and peak brightness: properties of the stream, so |
| 948 | 964 | // neither can change while one range decodes -- but the grade, the canvas |
| 949 | 965 | // and the rendition are the *span's*, so this is built per span. |
| 950 | - let mut render = Render::new(color, opened.meta.color, canvas, tone, opened.peak); | |
| 966 | + let mut render = Render::new(color, transform, opened.meta.color, canvas, tone, opened.peak); | |
| 951 | 967 | if let Some(reused) = opened.position_hw(path, start) { |
| 952 | 968 | // Cancelled during the init (or the seek): leave without decoding. |
| 953 | 969 | if abort.hit() { |
| @@ -1007,6 +1023,9 @@ fn run_span( | ||
| 1007 | 1023 | /// project resolution, byte for byte and allocation for allocation. |
| 1008 | 1024 | struct Render { |
| 1009 | 1025 | color: ColorParams, |
| 1026 | + /// This clip's placement, on top of whatever the canvas's own fit policy | |
| 1027 | + /// already does ([`crate::scale::Composer::place_transformed`]). | |
| 1028 | + transform: TransformParams, | |
| 1010 | 1029 | /// What the source's samples mean -- the stream's own matrix and range, |
| 1011 | 1030 | /// which is what the conversion below is done in rather than the BT.601 it |
| 1012 | 1031 | /// used to assume of every file. |
| @@ -1021,6 +1040,10 @@ struct Render { | ||
| 1021 | 1040 | /// across the worker's whole range. Empty unless the clip needs one: it is |
| 1022 | 1041 | /// tone-mapped in place, graded in place, or both. |
| 1023 | 1042 | graded: (Vec<u8>, Vec<u8>, Vec<u8>), |
| 1043 | + /// Where [`Composer::place_transformed`]'s owned picture lands, so a | |
| 1044 | + /// transformed frame's planes live as long as `self` -- matching what | |
| 1045 | + /// [`Composer::place`] already hands back by borrowing `self.canvas`. | |
| 1046 | + placed: (Vec<u8>, Vec<u8>, Vec<u8>), | |
| 1024 | 1047 | } |
| 1025 | 1048 | |
| 1026 | 1049 | /// What [`Render::frame`] converts a tone-mapped picture in: the tone map's |
| @@ -1038,6 +1061,7 @@ impl Render { | ||
| 1038 | 1061 | /// reference rendition reads (see [`tonemap::Preset`]). |
| 1039 | 1062 | fn new( |
| 1040 | 1063 | color: ColorParams, |
| 1064 | + transform: TransformParams, | |
| 1041 | 1065 | desc: ColorDescription, |
| 1042 | 1066 | canvas: Composer, |
| 1043 | 1067 | preset: tonemap::Preset, |
| @@ -1045,6 +1069,7 @@ impl Render { | ||
| 1045 | 1069 | ) -> Self { |
| 1046 | 1070 | Self { |
| 1047 | 1071 | color, |
| 1072 | + transform, | |
| 1048 | 1073 | desc, |
| 1049 | 1074 | canvas, |
| 1050 | 1075 | // corner-cut: the ceiling is that the map reads limited-range codes |
| @@ -1058,6 +1083,7 @@ impl Render { | ||
| 1058 | 1083 | Transfer::Hlg => Some(ToneMapper::new(tonemap::Transfer::Hlg, preset, peak)), |
| 1059 | 1084 | }, |
| 1060 | 1085 | graded: (Vec::new(), Vec::new(), Vec::new()), |
| 1086 | + placed: (Vec::new(), Vec::new(), Vec::new()), | |
| 1061 | 1087 | } |
| 1062 | 1088 | } |
| 1063 | 1089 | |
| @@ -1071,6 +1097,12 @@ impl Render { | ||
| 1071 | 1097 | height: u32, |
| 1072 | 1098 | ) -> Frame { |
| 1073 | 1099 | let passthrough = self.canvas.is_passthrough(width, height); |
| 1100 | + // A transform still has a picture to place even where the canvas | |
| 1101 | + // itself would hand this size back untouched -- moving, scaling, | |
| 1102 | + // rotating or cropping a passthrough-sized clip is still a placement, | |
| 1103 | + // and must not be silently dropped by the fused conversion below. | |
| 1104 | + let transform_active = !self.transform.is_identity(); | |
| 1105 | + let skip_placement = passthrough && !transform_active; | |
| 1074 | 1106 | // Everything that has to happen to the samples before the canvas sees |
| 1075 | 1107 | // them, on one copy: the tone map (HDR streams only) and, unless the |
| 1076 | 1108 | // conversion below can fuse it, the grade. An SDR stream that is either |
| @@ -1080,7 +1112,8 @@ impl Render { | ||
| 1080 | 1112 | // picture a viewer is shown, so its brightness and saturation mean what |
| 1081 | 1113 | // they say in the SDR the tone map just produced, not in the 10-stop |
| 1082 | 1114 | // HDR the file was in. |
| 1083 | - let (y, u, v, desc) = if self.tone.is_some() || (!passthrough && !self.color.is_identity()) | |
| 1115 | + let (y, u, v, desc) = if self.tone.is_some() | |
| 1116 | + || (!skip_placement && !self.color.is_identity()) | |
| 1084 | 1117 | { |
| 1085 | 1118 | let (gy, gu, gv) = &mut self.graded; |
| 1086 | 1119 | gy.clear(); |
| @@ -1104,7 +1137,7 @@ impl Render { | ||
| 1104 | 1137 | } else { |
| 1105 | 1138 | (y, u, v, self.desc) |
| 1106 | 1139 | }; |
| 1107 | - if passthrough { | |
| 1140 | + if skip_placement { | |
| 1108 | 1141 | return Frame { |
| 1109 | 1142 | index, |
| 1110 | 1143 | width, |
| @@ -1120,7 +1153,15 @@ impl Render { | ||
| 1120 | 1153 | ), |
| 1121 | 1154 | }; |
| 1122 | 1155 | } |
| 1123 | - let (y, u, v, width, height) = self.canvas.place(y, u, v, width, height); | |
| 1156 | + let (y, u, v, width, height) = if transform_active { | |
| 1157 | + let (py, pu, pv, w, h) = self | |
| 1158 | + .canvas | |
| 1159 | + .place_transformed(y, u, v, width, height, &self.transform); | |
| 1160 | + self.placed = (py, pu, pv); | |
| 1161 | + (&self.placed.0[..], &self.placed.1[..], &self.placed.2[..], w, h) | |
| 1162 | + } else { | |
| 1163 | + self.canvas.place(y, u, v, width, height) | |
| 1164 | + }; | |
| 1124 | 1165 | Frame { |
| 1125 | 1166 | index, |
| 1126 | 1167 | width, |
| @@ -1384,6 +1425,7 @@ mod tests { | ||
| 1384 | 1425 | 0, |
| 1385 | 1426 | u32::MAX, |
| 1386 | 1427 | ColorParams::default(), |
| 1428 | + TransformParams::default(), | |
| 1387 | 1429 | Composer::passthrough(), |
| 1388 | 1430 | tonemap::Preset::default(), |
| 1389 | 1431 | Speed::NORMAL, |
| @@ -1405,6 +1447,7 @@ mod tests { | ||
| 1405 | 1447 | 0, |
| 1406 | 1448 | u32::MAX, |
| 1407 | 1449 | ColorParams::default(), |
| 1450 | + TransformParams::default(), | |
| 1408 | 1451 | Composer::passthrough(), |
| 1409 | 1452 | tonemap::Preset::default(), |
| 1410 | 1453 | ) |
| @@ -1453,6 +1496,7 @@ mod tests { | ||
| 1453 | 1496 | 0, |
| 1454 | 1497 | u32::MAX, |
| 1455 | 1498 | ColorParams::default(), |
| 1499 | + TransformParams::default(), | |
| 1456 | 1500 | Composer::passthrough(), |
| 1457 | 1501 | tonemap::Preset::default(), |
| 1458 | 1502 | Speed::NORMAL, |
| @@ -1536,6 +1580,7 @@ mod tests { | ||
| 1536 | 1580 | 0, |
| 1537 | 1581 | u32::MAX, |
| 1538 | 1582 | ColorParams::default(), |
| 1583 | + TransformParams::default(), | |
| 1539 | 1584 | Composer::passthrough(), |
| 1540 | 1585 | tonemap::Preset::default(), |
| 1541 | 1586 | ) |
crates/engine/src/export.rsmodified+38 -3
| @@ -82,6 +82,7 @@ use crate::project::{Lane, LaneKind, Project, Rate}; | ||
| 82 | 82 | use crate::scale::{blend_i420, Composer}; |
| 83 | 83 | use crate::subtitle::{Cue, SubtitleTrack}; |
| 84 | 84 | use crate::tonemap::{self, ToneMapper}; |
| 85 | +use crate::transform::TransformParams; | |
| 85 | 86 | |
| 86 | 87 | /// Progress is reported in permille: an atomic integer the render loop can read |
| 87 | 88 | /// without a lock, fine enough for any progress bar. |
| @@ -1083,8 +1084,10 @@ struct Dissolve<'a> { | ||
| 1083 | 1084 | mapper: Option<&'a ToneMapper>, |
| 1084 | 1085 | remap: Option<(Matrix, Matrix)>, |
| 1085 | 1086 | grade: Option<crate::color::ColorParams>, |
| 1087 | + transform: TransformParams, | |
| 1086 | 1088 | canvas: Composer, |
| 1087 | 1089 | graded: (Vec<u8>, Vec<u8>, Vec<u8>), |
| 1090 | + transformed: (Vec<u8>, Vec<u8>, Vec<u8>), | |
| 1088 | 1091 | } |
| 1089 | 1092 | |
| 1090 | 1093 | /// The track's cues where the *exported* timeline puts them, which is the only |
| @@ -1643,6 +1646,14 @@ impl CopyPlan { | ||
| 1643 | 1646 | { |
| 1644 | 1647 | return None; |
| 1645 | 1648 | } |
| 1649 | + // A moved, scaled, rotated or cropped clip is a different picture | |
| 1650 | + // than the source's own packets, exactly as a grade is. | |
| 1651 | + if project | |
| 1652 | + .composite_transform_at(span.start) | |
| 1653 | + .is_some_and(|params| !params.is_identity()) | |
| 1654 | + { | |
| 1655 | + return None; | |
| 1656 | + } | |
| 1646 | 1657 | let path = &entries.get(source)?.path; |
| 1647 | 1658 | if sources.get(source)?.is_none() { |
| 1648 | 1659 | if !crate::demux::is_matroska(path) { |
| @@ -2537,6 +2548,9 @@ fn run( | ||
| 2537 | 2548 | && project |
| 2538 | 2549 | .composite_color_at(span.start) |
| 2539 | 2550 | .is_none_or(|params| params.is_identity()) |
| 2551 | + && project | |
| 2552 | + .composite_transform_at(span.start) | |
| 2553 | + .is_none_or(|params| params.is_identity()) | |
| 2540 | 2554 | && dissolve.is_none(); |
| 2541 | 2555 | let want = untouched.then(|| encoder.dma_want(meta)).flatten(); |
| 2542 | 2556 | // Opened at the file's own frame, which is the only place the |
| @@ -2566,7 +2580,12 @@ fn run( | ||
| 2566 | 2580 | // is touched. Scratch outside the frame loop: it is refilled per frame |
| 2567 | 2581 | // and its allocation survives the whole span. |
| 2568 | 2582 | let grade = project.composite_color_at(span.start).copied(); |
| 2583 | + let transform = project | |
| 2584 | + .composite_transform_at(span.start) | |
| 2585 | + .copied() | |
| 2586 | + .unwrap_or_default(); | |
| 2569 | 2587 | let mut graded = (Vec::new(), Vec::new(), Vec::new()); |
| 2588 | + let mut transformed = (Vec::new(), Vec::new(), Vec::new()); | |
| 2570 | 2589 | // ...and the canvas it is placed on, which is where a source of another |
| 2571 | 2590 | // resolution becomes a picture at the project's. The same `Composer` |
| 2572 | 2591 | // playback composes with, given the same policy, so an export is what |
| @@ -2595,12 +2614,17 @@ fn run( | ||
| 2595 | 2614 | mapper: b_mapper, |
| 2596 | 2615 | remap: b_remap, |
| 2597 | 2616 | grade: project.composite_color_at(b_start).copied(), |
| 2617 | + transform: project | |
| 2618 | + .composite_transform_at(b_start) | |
| 2619 | + .copied() | |
| 2620 | + .unwrap_or_default(), | |
| 2598 | 2621 | canvas: Composer::new( |
| 2599 | 2622 | meta.width, |
| 2600 | 2623 | meta.height, |
| 2601 | 2624 | project.composite_fit_at(b_start), |
| 2602 | 2625 | ), |
| 2603 | 2626 | graded: (Vec::new(), Vec::new(), Vec::new()), |
| 2627 | + transformed: (Vec::new(), Vec::new(), Vec::new()), | |
| 2604 | 2628 | }) |
| 2605 | 2629 | }) |
| 2606 | 2630 | .transpose()?; |
| @@ -2688,9 +2712,11 @@ fn run( | ||
| 2688 | 2712 | width, |
| 2689 | 2713 | height, |
| 2690 | 2714 | grade, |
| 2715 | + transform, | |
| 2691 | 2716 | remap, |
| 2692 | 2717 | mapper, |
| 2693 | 2718 | &mut graded, |
| 2719 | + &mut transformed, | |
| 2694 | 2720 | &mut canvas, |
| 2695 | 2721 | )), |
| 2696 | 2722 | }; |
| @@ -2718,8 +2744,9 @@ fn run( | ||
| 2718 | 2744 | } |
| 2719 | 2745 | Some(Frame::Pixels(by, bu, bv, bw, bh)) => { |
| 2720 | 2746 | let (by, bu, bv, _, _) = place_picture( |
| 2721 | - by, bu, bv, bw, bh, d.grade, d.remap, d.mapper, | |
| 2722 | - &mut d.graded, &mut d.canvas, | |
| 2747 | + by, bu, bv, bw, bh, d.grade, d.transform, d.remap, | |
| 2748 | + d.mapper, &mut d.graded, &mut d.transformed, | |
| 2749 | + &mut d.canvas, | |
| 2723 | 2750 | ); |
| 2724 | 2751 | let idx_in_window = done_here + r - d.tail_start; |
| 2725 | 2752 | let t = dissolve_weight(idx_in_window, d.window); |
| @@ -2854,9 +2881,11 @@ fn place_picture<'a>( | ||
| 2854 | 2881 | width: u32, |
| 2855 | 2882 | height: u32, |
| 2856 | 2883 | grade: Option<crate::color::ColorParams>, |
| 2884 | + transform: TransformParams, | |
| 2857 | 2885 | remap: Option<(Matrix, Matrix)>, |
| 2858 | 2886 | mapper: Option<&ToneMapper>, |
| 2859 | 2887 | graded: &'a mut (Vec<u8>, Vec<u8>, Vec<u8>), |
| 2888 | + transformed: &'a mut (Vec<u8>, Vec<u8>, Vec<u8>), | |
| 2860 | 2889 | canvas: &'a mut Composer, |
| 2861 | 2890 | ) -> (&'a [u8], &'a [u8], &'a [u8], u32, u32) { |
| 2862 | 2891 | // The planes are borrowed from the decoder (and `Black::picture` hands the |
| @@ -2891,7 +2920,13 @@ fn place_picture<'a>( | ||
| 2891 | 2920 | }; |
| 2892 | 2921 | // Grade first, place second: the grade is the clip's own pixels and the |
| 2893 | 2922 | // bars around them are not the clip (see `scale::Composer`). |
| 2894 | - canvas.place(y, u, v, width, height) | |
| 2923 | + if transform.is_identity() { | |
| 2924 | + canvas.place(y, u, v, width, height) | |
| 2925 | + } else { | |
| 2926 | + let (py, pu, pv, w, h) = canvas.place_transformed(y, u, v, width, height, &transform); | |
| 2927 | + *transformed = (py, pu, pv); | |
| 2928 | + (&transformed.0[..], &transformed.1[..], &transformed.2[..], w, h) | |
| 2929 | + } | |
| 2895 | 2930 | } |
| 2896 | 2931 | |
| 2897 | 2932 | /// Which matrix pair a span's samples are rewritten by on the way into a file |
crates/engine/src/playback.rsmodified+17 -0
| @@ -28,6 +28,7 @@ use crate::demux::{Codec, Demuxer, VideoMeta}; | ||
| 28 | 28 | use crate::eq::EqParams; |
| 29 | 29 | use crate::project::{Clip, Edge, Lane, LaneKind, Project, Rate, Source, Span, Speed, SubClip}; |
| 30 | 30 | use crate::scale::{Composer, FitPolicy}; |
| 31 | +use crate::transform::TransformParams; | |
| 31 | 32 | |
| 32 | 33 | /// How long the feeder waits out a full ring. The ring holds a second, so this |
| 33 | 34 | /// only has to be short next to that; it costs one wakeup per 10 ms of audio. |
| @@ -510,6 +511,7 @@ impl PlaybackSession { | ||
| 510 | 511 | 0, |
| 511 | 512 | u32::MAX, |
| 512 | 513 | ColorParams::default(), |
| 514 | + TransformParams::default(), | |
| 513 | 515 | Composer::passthrough(), |
| 514 | 516 | // The default rendition: a file just opened is a project nobody has |
| 515 | 517 | // picked one for, exactly as it is a project nobody has graded. |
| @@ -738,6 +740,7 @@ impl PlaybackSession { | ||
| 738 | 740 | 0, |
| 739 | 741 | span.map_or(1, |s| s.len), |
| 740 | 742 | ColorParams::default(), |
| 743 | + TransformParams::default(), | |
| 741 | 744 | Composer::passthrough(), |
| 742 | 745 | )?; |
| 743 | 746 | Ok(Self { |
| @@ -870,6 +873,7 @@ impl PlaybackSession { | ||
| 870 | 873 | 0, |
| 871 | 874 | 1, |
| 872 | 875 | ColorParams::default(), |
| 876 | + TransformParams::default(), | |
| 873 | 877 | Composer::passthrough(), |
| 874 | 878 | )?; |
| 875 | 879 | (meta, stream) |
| @@ -879,6 +883,7 @@ impl PlaybackSession { | ||
| 879 | 883 | 0, |
| 880 | 884 | u32::MAX, |
| 881 | 885 | ColorParams::default(), |
| 886 | + TransformParams::default(), | |
| 882 | 887 | Composer::passthrough(), |
| 883 | 888 | // The saved rendition, from the document rather than from the |
| 884 | 889 | // project (which is built below): this placeholder is what the |
| @@ -1603,6 +1608,10 @@ impl PlaybackSession { | ||
| 1603 | 1608 | .composite_color_at(start) |
| 1604 | 1609 | .copied() |
| 1605 | 1610 | .unwrap_or_default(), |
| 1611 | + self.project | |
| 1612 | + .composite_transform_at(start) | |
| 1613 | + .copied() | |
| 1614 | + .unwrap_or_default(), | |
| 1606 | 1615 | Composer::new( |
| 1607 | 1616 | self.meta.width, |
| 1608 | 1617 | self.meta.height, |
| @@ -1646,6 +1655,11 @@ impl PlaybackSession { | ||
| 1646 | 1655 | .composite_color_at(start) |
| 1647 | 1656 | .copied() |
| 1648 | 1657 | .unwrap_or_default(); |
| 1658 | + let transform = self | |
| 1659 | + .project | |
| 1660 | + .composite_transform_at(start) | |
| 1661 | + .copied() | |
| 1662 | + .unwrap_or_default(); | |
| 1649 | 1663 | // ...and the canvas it is placed on: the project's resolution |
| 1650 | 1664 | // and this clip's own fit policy, constant across the span for |
| 1651 | 1665 | // the reason the grade is. Built where it is handed over rather |
| @@ -1684,6 +1698,7 @@ impl PlaybackSession { | ||
| 1684 | 1698 | start_frame, |
| 1685 | 1699 | end_frame, |
| 1686 | 1700 | color, |
| 1701 | + transform, | |
| 1687 | 1702 | canvas(), |
| 1688 | 1703 | tone, |
| 1689 | 1704 | decode_speed, |
| @@ -1698,6 +1713,7 @@ impl PlaybackSession { | ||
| 1698 | 1713 | start_frame, |
| 1699 | 1714 | end_frame, |
| 1700 | 1715 | color, |
| 1716 | + transform, | |
| 1701 | 1717 | canvas(), |
| 1702 | 1718 | tone, |
| 1703 | 1719 | decode_speed, |
| @@ -3578,6 +3594,7 @@ fn matches_timeline( | ||
| 3578 | 3594 | 0, |
| 3579 | 3595 | 0, |
| 3580 | 3596 | ColorParams::default(), |
| 3597 | + TransformParams::default(), | |
| 3581 | 3598 | Composer::passthrough(), |
| 3582 | 3599 | // A zero-length range decodes nothing, so no table is built and the |
| 3583 | 3600 | // rendition cannot matter here. |