Skip to content

Update Convert for 10-bit and HDR#1858

Merged
ddennedy merged 4 commits into
masterfrom
10-bit_transcode
Jun 30, 2026
Merged

Update Convert for 10-bit and HDR#1858
ddennedy merged 4 commits into
masterfrom
10-bit_transcode

Conversation

@ddennedy

Copy link
Copy Markdown
Member

This pull request introduces improved support for HDR (High Dynamic Range) workflows by making the application's transcoding and conversion logic aware of the current processing mode's HDR compatibility. The main changes ensure that lossless transcodes use a 10-bit H.264 codec when HDR-compatible processing is enabled, and that color space conversions and user prompts are more accurate for HDR content. Several utility and dialog functions have been updated to reflect this logic, and some code has been refactored for clarity.

HDR-aware transcoding and conversion:

  • Added ShotcutSettings::isHdrCompatibleProcessingMode() to determine if the current processing mode supports HDR, and updated relevant dialogs and conversion logic to use this check. (src/settings.h, src/settings.cpp, src/dialogs/transcodedialog.cpp, src/transcoder.cpp, src/util.cpp, src/widgets/avformatproducerwidget.cpp) [1] [2] [3] [4] [5]

  • Lossless transcode mode now uses 10-bit H.264 when HDR-compatible processing is enabled, instead of Ut Video, and sets appropriate ffmpeg arguments for 10-bit output. (src/dialogs/transcodedialog.cpp, src/transcoder.cpp) [1] [2] [3] [4]

Color space and conversion improvements:

  • Updated logic for when to offer BT.709 color conversion and when to prompt users about probable HDR content, making it conditional on both the processing mode and color transfer characteristics. (src/util.cpp, src/widgets/avformatproducerwidget.cpp) [1] [2] [3]

  • Renamed Util::trcIsCompatible to Util::trcIsSdrCompatible for clarity and updated all references. (src/util.h, src/util.cpp) [1] [2]

Other improvements:

  • Added -hide_banner to ffmpeg job arguments to reduce log clutter. (src/jobs/ffmpegjob.cpp)

  • Updated copyright years in relevant files. (src/dialogs/transcodedialog.cpp, src/transcoder.cpp) [1] [2]

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Shotcut’s convert/transcode workflow to better support HDR by using the current processing mode to drive HDR/10‑bit decisions (codec choice, color conversion defaults, and HDR warnings).

Changes:

  • Added ShotcutSettings::isHdrCompatibleProcessingMode() and applied it to conversion prompts/defaults across UI and utility code.
  • Updated Transcoder::convertProducer() to support 10‑bit output paths (including “lossless” mode using H.264 high10) and refined frame-rate handling.
  • Reduced FFmpeg log noise by adding -hide_banner to FFmpeg job arguments.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/widgets/avformatproducerwidget.cpp Default BT.709 conversion choice now depends on HDR-capable processing mode.
src/util.h Renamed TRC helper to trcIsSdrCompatible.
src/util.cpp HDR-aware conversion advice/prompting and updated TRC compatibility helper usage.
src/transcoder.cpp HDR/10-bit-aware FFmpeg argument construction, codec/pix_fmt selection, and fps handling.
src/settings.h Declared isHdrCompatibleProcessingMode().
src/settings.cpp Implemented isHdrCompatibleProcessingMode().
src/jobs/ffmpegjob.cpp Added -hide_banner to FFmpeg args.
src/dialogs/transcodedialog.cpp UI label for “Lossless” now reflects HDR mode selection (Ut Video vs H.264).
Comments suppressed due to low confidence (1)

src/util.cpp:819

  • trcIsSdrCompatible() currently treats HLG (18) as SDR-compatible, but the rest of the app explicitly classifies TRC 18 (ARIB B67) as HDR. With the new HDR-aware prompting (getConversionAdvice()), this suppresses the “Probable HDR” warning for HLG sources in non-HDR processing modes.
bool Util::trcIsSdrCompatible(int trc)
{
    // Transfer characteristics > SMPTE240M Probably need conversion except IEC61966-2-4 is OK
    return trc <= 7 || trc == 11 || trc == 13 || trc == 14 || trc == 15 || trc == 18;
}

Comment thread src/settings.cpp
Comment thread src/transcoder.cpp
@ddennedy ddennedy added this to the 26.7 milestone Jun 30, 2026
@ddennedy ddennedy merged commit 919a7e3 into master Jun 30, 2026
4 checks passed
@ddennedy ddennedy deleted the 10-bit_transcode branch June 30, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants