Skip to content

Commit 7da9b62

Browse files
committed
Add UI for automatic tone mapping settings
1 parent 9a5a5bf commit 7da9b62

File tree

3 files changed

+41
-4
lines changed

3 files changed

+41
-4
lines changed

sources/base/schema/schema-automaticToneMapping.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
"type" : "boolean",
99
"format": "checkbox",
10-
"title" : "edt_automatic_tone_mapping_enable_title",
10+
"title" : "edt_conf_general_enable_title",
1111
"default" : false,
1212
"required" : true,
1313
"propertyOrder" : 1
@@ -22,6 +22,11 @@
2222
"maximum" : 255,
2323
"default" : 155,
2424
"required" : true,
25+
"options": {
26+
"dependencies": {
27+
"enable": true
28+
}
29+
},
2530
"propertyOrder" : 2
2631
},
2732
"tone_mapping_u_threshold" :
@@ -34,6 +39,11 @@
3439
"maximum" : 255,
3540
"default" : 175,
3641
"required" : true,
42+
"options": {
43+
"dependencies": {
44+
"enable": true
45+
}
46+
},
3747
"propertyOrder" : 3
3848
},
3949
"tone_mapping_v_threshold" :
@@ -46,6 +56,11 @@
4656
"maximum" : 255,
4757
"default" : 160,
4858
"required" : true,
59+
"options": {
60+
"dependencies": {
61+
"enable": true
62+
}
63+
},
4964
"propertyOrder" : 4
5065
},
5166
"time_to_tone_mapping" :
@@ -59,6 +74,11 @@
5974
"default" : 30,
6075
"append" : "edt_append_s",
6176
"required" : true,
77+
"options": {
78+
"dependencies": {
79+
"enable": true
80+
}
81+
},
6282
"propertyOrder" : 5
6383
}
6484
},

www/i18n/en.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,14 +1253,13 @@
12531253
"chk_lchCorrection": "LCH color correction",
12541254
"grabber_calibration_expl": "This tool allows you to create a new calibrated HDR LUT for your grabber (or external flatbuffers source) as close to the actual input colors as possible.<br/>You need an HDR10 video source that can display this web page, for example: Windows 10 with HDR enabled in the properties of the graphics driver.<br/>The screen may flicker during calibration. The process typically takes about few minutes on a Intel 7 Windows PC (depending on the host CPU resources and the video capturing framerate).<br/><b>The calculations are very intensive and put a strain on your equipment <svg data-src='svg/performance_undervoltage.svg' class='svg4hyperhdr ms-1'></svg></b>You can disable LCH color correction to reduce the load a bit<br/>You can monitor the progress in HyperHDR logs using the browser from other device.<br/><br/><br/><b>1</b> If everything is properly connected, this page should be displayed on the TV screen (as HDR content) and live preview in HyperHDR (captured by the grabber).</br><b>2</b> Absolute minimum capturing resolution is 1280x720 (we will verify this). Recommended is 1920x1080 YUV/NV12. Aspect 1920/1080 must be preserved.<br/><b>3</b> You must disable 'Quarter of frame mode' in your grabber properties if it's enabled.<br/><b>4</b> You must set the grabber's video format to MJPEG/YUV/NV12/P010.<br/><b>5</b> Before you run the process please put your WWW browser in the full-screen mode (F11 key, we will verify this).</br><b>6</b> <b>If you are calibrating using Windows 11, turn off features such as 'Night light', 'Automatic manage color for apps' and 'Auto-HDR'. Do not change the color balance in the graphics driver. The GFX output should support e.g. 10 or 12 bit RGB in full PC range.</b><br/><br/>After completing the calibration, your new LUT table file (lut_lin_tables.3d) will be created in the user's HyperHDR home directory and is immediately ready to use when you just enable HDR tone mapping. Please verify HyperHDR logs for details.",
12551255
"edt_automatic_tone_mapping_title" : "Automatic tone mapping",
1256-
"edt_automatic_tone_mapping_enable_title" : "Enable automatic tone mapping",
1257-
"edt_automatic_tone_mapping_enable_expl" : "Automatic tone mapping is only available for YUV/NV12/P010 formats with 'Quarter of frame' mode enabled",
1256+
"edt_automatic_tone_mapping_enable_explain" : "Automatic tone mapping control is only available for <span style='color:red;'>'YUV/NV12/P010'</span> video formats with <span style='color:red;'>'Quarter of frame'</span> mode enabled. Please configure them in the USB grabber settings.",
12581257
"edt_automatic_tone_mapping_y_threshold_title" : "Brightness threshold (Y)",
12591258
"edt_automatic_tone_mapping_y_threshold_expl" : "The brightness level that separates raw dark HDR material from the SDR signal",
12601259
"edt_automatic_tone_mapping_u_threshold_title" : "Blue chroma threshold (U)",
12611260
"edt_automatic_tone_mapping_u_threshold_expl" : "Blue chroma level that separates raw pale HDR material from the SDR signal",
12621261
"edt_automatic_tone_mapping_v_threshold_title" : "Red chroma threshold (V)",
12631262
"edt_automatic_tone_mapping_v_threshold_expl" : "Red chroma level that separates raw pale HDR material from the SDR signal",
12641263
"edt_automatic_tone_mapping_time_title" : "Time to turn on tone mapping",
1265-
"edt_automatic_tone_mapping_time_title_expl" : "Time to turn on tone mapping if the signal does not exceed the configured threshold levels"
1264+
"edt_automatic_tone_mapping_time_expl" : "Time to turn on tone mapping if the signal does not exceed the configured threshold levels"
12661265
}

www/js/processing.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ $(document).ready( function() {
4949
//blackborder
5050
$('#conf_cont').append(createOptPanel('<svg data-src="svg/image_processing_blackborder.svg" fill="currentColor" class="svg4hyperhdr"></svg>', $.i18n("edt_conf_bb_heading_title"), 'editor_container_blackborder', 'btn_submit_blackborder'));
5151
$('#conf_cont').append(createHelpTable(window.schema.blackborderdetector.properties, $.i18n("edt_conf_bb_heading_title")));
52+
53+
//automatic tone mapping
54+
$('#conf_cont').append(createOptPanel('<svg data-src="svg/hdr.svg" fill="currentColor" class="svg4hyperhdr"></svg>', $.i18n("edt_automatic_tone_mapping_title"), 'editor_container_automatic_tone_mapping', 'btn_submit_automatic_tone_mapping'));
55+
$('#conf_cont').append(createHelpTable(window.schema.automaticToneMapping.properties, $.i18n("edt_automatic_tone_mapping_title")));
5256
}
5357

5458
//color
@@ -103,13 +107,27 @@ $(document).ready( function() {
103107
$('#btn_submit_blackborder').off().on('click',function() {
104108
requestWriteConfig(editor_blackborder.getValue());
105109
});
110+
111+
//tone mapping
112+
editor_automatic_tone_mapping = createJsonEditor('editor_container_automatic_tone_mapping', {
113+
automaticToneMapping: window.schema.automaticToneMapping
114+
}, true, true, undefined, false);
115+
116+
editor_automatic_tone_mapping.on('change',function() {
117+
editor_automatic_tone_mapping.validate().length ? $('#btn_submit_automatic_tone_mapping').attr('disabled', true) : $('#btn_submit_automatic_tone_mapping').attr('disabled', false);
118+
});
119+
120+
$('#btn_submit_automatic_tone_mapping').off().on('click',function() {
121+
requestWriteConfig(editor_automatic_tone_mapping.getValue());
122+
});
106123

107124
//create introduction
108125
if(window.showOptHelp)
109126
{
110127
createHint("intro", $.i18n('conf_colors_color_intro'), "editor_container_color");
111128
createHint("intro", $.i18n('conf_colors_smoothing_intro'), "editor_container_smoothing");
112129
createHint("intro", $.i18n('conf_colors_blackborder_intro'), "editor_container_blackborder");
130+
createHint("intro", $.i18n('edt_automatic_tone_mapping_enable_explain'), "editor_container_automatic_tone_mapping");
113131
}
114132

115133
removeOverlay();

0 commit comments

Comments
 (0)