mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 17:27:09 +00:00
fix(engine): a tone-mapped HDR render still converts its SDR clips to the HDR primaries
This commit is contained in:
@@ -2146,7 +2146,11 @@ export async function extractAllVideoFrames(
|
||||
// Phase 3 still calls `extractVideoFramesRange` on the same past-EOF
|
||||
// mediaStart, surfacing a second raw FFmpeg error for the same clip.
|
||||
const hdrSkippedIndices = new Set<number>();
|
||||
if (!options.toneMapHdrToSdr && hdrInfo.hasHdr && hdrInfo.dominantTransfer) {
|
||||
if (
|
||||
(!options.toneMapHdrToSdr || options.hdrTransferAfterToneMap) &&
|
||||
hdrInfo.hasHdr &&
|
||||
hdrInfo.dominantTransfer
|
||||
) {
|
||||
// dominantTransfer is "majority wins" — if a composition mixes PQ and HLG
|
||||
// sources (rare but legal), the minority transfer's videos get converted
|
||||
// with the wrong curve. We treat this as caller-error: a single composition
|
||||
|
||||
Reference in New Issue
Block a user