Expose VPP TM brightness/contrast gain options

This commit is contained in:
nyanmisaka 2022-06-16 23:55:55 +08:00
parent 0bd774dd45
commit cbfa0acfb3
3 changed files with 28 additions and 9 deletions

View File

@ -125,13 +125,24 @@
</div>
</div>
<div class="checkboxListContainer checkboxContainer-withDescription fldVppTonemapping hide">
<div class="vppTonemappingOptions hide">
<div class="checkboxListContainer checkboxContainer-withDescription">
<label>
<input type="checkbox" is="emby-checkbox" id="chkVppTonemapping" />
<span>${EnableVppTonemapping}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${AllowVppTonemappingHelp}</div>
</div>
<div class="inputContainer">
<input is="emby-input" type="number" id="txtVppTonemappingBrightness" pattern="[0-9]*" min="0" max="100" step=".00001" label="${LabelVppTonemappingBrightness}" />
<div class="fieldDescription">${LabelVppTonemappingBrightnessHelp}</div>
</div>
<div class="inputContainer">
<input is="emby-input" type="number" id="txtVppTonemappingContrast" pattern="[0-9]*" min="1" max="2" step=".00001" label="${LabelVppTonemappingContrast}" />
<div class="fieldDescription">${LabelVppTonemappingContrastHelp}</div>
</div>
</div>
<div class="tonemappingOptions hide">
<div class="checkboxListContainer checkboxContainer-withDescription">
<label>

View File

@ -37,6 +37,8 @@ import alert from '../../components/alert';
page.querySelector('#txtTonemappingThreshold').value = config.TonemappingThreshold;
page.querySelector('#txtTonemappingPeak').value = config.TonemappingPeak;
page.querySelector('#txtTonemappingParam').value = config.TonemappingParam || '';
page.querySelector('#txtVppTonemappingBrightness').value = config.VppTonemappingBrightness;
page.querySelector('#txtVppTonemappingContrast').value = config.VppTonemappingContrast;
page.querySelector('#selectEncoderPreset').value = config.EncoderPreset || '';
page.querySelector('#txtH264Crf').value = config.H264Crf || '';
page.querySelector('#txtH265Crf').value = config.H265Crf || '';
@ -91,6 +93,8 @@ import alert from '../../components/alert';
config.TonemappingThreshold = form.querySelector('#txtTonemappingThreshold').value;
config.TonemappingPeak = form.querySelector('#txtTonemappingPeak').value;
config.TonemappingParam = form.querySelector('#txtTonemappingParam').value || '0';
config.VppTonemappingBrightness = form.querySelector('#txtVppTonemappingBrightness').value;
config.VppTonemappingContrast = form.querySelector('#txtVppTonemappingContrast').value;
config.EncoderPreset = form.querySelector('#selectEncoderPreset').value;
config.H264Crf = parseInt(form.querySelector('#txtH264Crf').value || '0');
config.H265Crf = parseInt(form.querySelector('#txtH265Crf').value || '0');
@ -205,9 +209,9 @@ import alert from '../../components/alert';
}
if (systemInfo.OperatingSystem.toLowerCase() === 'linux' && (this.value == 'qsv' || this.value == 'vaapi')) {
page.querySelector('.fldVppTonemapping').classList.remove('hide');
page.querySelector('.vppTonemappingOptions').classList.remove('hide');
} else {
page.querySelector('.fldVppTonemapping').classList.add('hide');
page.querySelector('.vppTonemappingOptions').classList.add('hide');
}
if (this.value == 'qsv') {

View File

@ -1643,5 +1643,9 @@
"Sample": "Sample",
"ThemeSong": "Theme Song",
"ThemeVideo": "Theme Video",
"EnableSplashScreen": "Enable the splash screen"
"EnableSplashScreen": "Enable the splash screen",
"LabelVppTonemappingBrightness": "VPP Tone mapping brightness gain:",
"LabelVppTonemappingBrightnessHelp": "Apply brightness gain in VPP tone mapping. Both recommended and default values are 0.",
"LabelVppTonemappingContrast": "VPP Tone mapping contrast gain:",
"LabelVppTonemappingContrastHelp": "Apply contrast gain in VPP tone mapping. The recommended and default values are 1.2 and 1."
}