Keep the PGS source resolution through the sup2vob conversion

VobSub conversions of PGS material were downscaled to the 720x480/576
DVD frame — a 1080p source came out of the mux at one quarter of its
authored size. The framework's sup2vob façade now always runs the
upstream CLI's `--full` mode: fullFramePassthrough keeps every frame's
object geometry verbatim, and the idx size line (which the VobSub
importer carries into track.width/height and the muxer writes into the
subpic track) is the PGS's own PCS canvas, e.g. 1920x1080. The
frame-rate-derived DVD frame stays as fallback for streams that define
no usable canvas. The conversion output is byte-identical to running
`sup2vob --full` on the same .sup.

The vendored upstream sources stay untouched apart from one comment —
the passthrough is enabled in the adaptation layer, same as the CLI
does with its flag. This applies to both PGS paths, which share the
conversion: .sup drag-import and PGS-from-MKV via
MP42PgsToVobSubConverter.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Scott GarrettandClaude Code committed 2026-11-28 21:13:57 -05:00
1 parent 57772086a5
commit 837aa1c098
4 files changed
+35 -15

No files matched your search

+6 -5
View File
@@ -164,9 +164,9 @@ MP42_OBJC_DIRECT_MEMBERS
// Phase 2 — the vendored sup2vob conversion rides the VobSub importer
// wholesale: its .sup support already converts to a temp idx/sub pair
// (DVD resolution, global 4-color palette) and its demux emits the
// raw-SPU subpic samples with gap-clearing that the subp mux path
// wants. Re-inventing any of it here would just drift.
// (the PGS canvas resolution, global 4-color palette) and its demux
// emits the raw-SPU subpic samples with gap-clearing that the subp
// mux path wants. Re-inventing any of it here would just drift.
_tempDirectory = [[NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory:YES]
URLByAppendingPathComponent:[NSString stringWithFormat:@"pgsvob-%@", [NSUUID UUID].UUIDString]];
[[NSFileManager defaultManager] createDirectoryAtURL:_tempDirectory withIntermediateDirectories:YES attributes:nil error:NULL];
@@ -219,8 +219,9 @@ MP42_OBJC_DIRECT_MEMBERS
return nil;
}
// The idx `size:` line carries the DVD frame sup2vob rendered into
// (MP42VobSubImporter stores it as the track's width/height).
// The idx `size:` line carries the frame sup2vob rendered into —
// the PGS's own canvas (MP42VobSubImporter stores it as the
// track's width/height).
_frameWidth = (uint32_t)vobTrack.width;
_frameHeight = (uint32_t)vobTrack.height;