Add Clarity boost mode

This commit is contained in:
redphx
2025-05-14 17:21:50 +07:00
parent e502e49d64
commit 3290a36886
12 changed files with 103 additions and 38 deletions

View File

@@ -22,6 +22,7 @@ export function patchVideoApi() {
const playerOptions = {
processing: getStreamPref(StreamPref.VIDEO_PROCESSING),
processingMode: getStreamPref(StreamPref.VIDEO_PROCESSING_MODE),
sharpness: getStreamPref(StreamPref.VIDEO_SHARPNESS),
saturation: getStreamPref(StreamPref.VIDEO_SATURATION),
contrast: getStreamPref(StreamPref.VIDEO_CONTRAST),

View File

@@ -1,9 +1,9 @@
import { StreamPref, StorageKey, type PrefTypeMap } from "@/enums/pref-keys";
import { DeviceVibrationMode, StreamPlayerType, StreamVideoProcessing, VideoPowerPreference, VideoRatio, VideoPosition, StreamStat, StreamStatPosition } from "@/enums/pref-values";
import { DeviceVibrationMode, StreamPlayerType, StreamVideoProcessing, VideoPowerPreference, VideoRatio, VideoPosition, StreamStat, StreamStatPosition, StreamVideoProcessingMode } from "@/enums/pref-values";
import { STATES } from "../global";
import { KeyboardShortcutDefaultId } from "../local-db/keyboard-shortcuts-table";
import { MkbMappingDefaultPresetId } from "../local-db/mkb-mapping-presets-table";
import { t } from "../translation";
import { t, ut } from "../translation";
import { BaseSettingsStorage } from "./base-settings-storage";
import { CE } from "../html";
import type { SettingActionOrigin, SettingDefinitions } from "@/types/setting-definition";
@@ -179,6 +179,18 @@ export class StreamSettingsStorage extends BaseSettingsStorage<StreamPref> {
highest: StreamVideoProcessing.CAS,
},
},
[StreamPref.VIDEO_PROCESSING_MODE]: {
label: ut('clarity-boost-mode'),
default: StreamVideoProcessingMode.PERFORMANCE,
options: {
[StreamVideoProcessingMode.QUALITY]: ut('quality'),
[StreamVideoProcessingMode.PERFORMANCE]: ut('performance'),
},
suggest: {
lowest: StreamVideoProcessingMode.PERFORMANCE,
highest: StreamVideoProcessingMode.QUALITY,
},
},
[StreamPref.VIDEO_POWER_PREFERENCE]: {
label: t('renderer-configuration'),
default: VideoPowerPreference.DEFAULT,