The software H264 export codes Main-profile CABAC, 8x8 off
Browse files at this commit02e230833375a87538ff92d30ace4c05ebda5c6bParent: 17b5566- perf
- the software H264 export codes Main-profile CABAC, 8x8 off
1 changed file +8 -1
crates/engine/src/export.rsmodified+8 -1
| @@ -3909,11 +3909,18 @@ impl Enc { | |||
| 3909 | true => 1, | 3909 | true => 1, |
| 3910 | false => (meta.frame_rate * 2.0).round().max(1.0) as u32, | 3910 | false => (meta.frame_rate * 2.0).round().max(1.0) as u32, |
| 3911 | }; | 3911 | }; |
| 3912 | - cfg.bframes = 0; | ||
| 3913 | // Fast, the rung a fallback is allowed to cost -- the cheaper arm of | 3912 | // Fast, the rung a fallback is allowed to cost -- the cheaper arm of |
| 3914 | // the preset ladder, the one the old seat's own S1 also picked when its | 3913 | // the preset ladder, the one the old seat's own S1 also picked when its |
| 3915 | // Balanced rung halved the rate for the same bitrate. | 3914 | // Balanced rung halved the rate for the same bitrate. |
| 3916 | cfg.preset = Preset::Fast; | 3915 | cfg.preset = Preset::Fast; |
| 3916 | + // 8x8 transform off. At this rung it is half the pure-encode cost | ||
| 3917 | + // (17.2 ms/frame against 35.1 at 720p across all cores, measured at | ||
| 3918 | + // the swap) for at most 0.7 dB BD-PSNR -- against an old seat that ran | ||
| 3919 | + // Constrained Baseline and never had the transform in the first | ||
| 3920 | + // place. The export stays Main-profile CABAC, which is where the | ||
| 3921 | + // quality over the old seat lives; a constant-QP mode would be the | ||
| 3922 | + // place to revisit the rung whole. | ||
| 3923 | + cfg.transform_8x8 = false; | ||
| 3917 | let encoder = Encoder::new(cfg).map_err(|e| format!("software encoder: {e}"))?; | 3924 | let encoder = Encoder::new(cfg).map_err(|e| format!("software encoder: {e}"))?; |
| 3918 | Ok(Self::Sw { | 3925 | Ok(Self::Sw { |
| 3919 | encoder, | 3926 | encoder, |