Preserve interlaced scan type in label and MKV output

Interlacing is detected upstream (PAL DVD -> R576i) but was dropped in
two places: the video label hardcoded a 'p' suffix, and the muxer never
wrote any scan-type flag, so MediaInfo inferred progressive and reported
576p for a 576i source.

- Add Resolution::is_interlaced() for the R*i variants.
- generate_video_label now branches i/p for the heights that can be
  interlaced (1080, 576, 480) instead of always emitting 'p'.
- MkvTrack carries interlaced + field_order; the video serializer emits
  FlagInterlaced (0x9A; 1=interlaced, 2=progressive) and, for interlaced
  content, FieldOrder (0x9D) - bottom-field-first for PAL 576i,
  top-field-first otherwise. Adds the EBML constants.
This commit is contained in:
Matthew Jackson
2026-06-24 09:47:16 -07:00
parent 2613a81f09
commit e0ce035765
4 changed files with 165 additions and 5 deletions
+8
View File
@@ -655,6 +655,14 @@ impl Resolution {
matches!(self, Resolution::R2160p | Resolution::R4320p)
}
/// True if this is an interlaced resolution (the `R*i` variants).
pub fn is_interlaced(&self) -> bool {
matches!(
self,
Resolution::R480i | Resolution::R576i | Resolution::R1080i
)
}
/// True if this is an HD (720p+) resolution.
pub fn is_hd(&self) -> bool {
!matches!(