Use nlmeans and FSRCNNX 16 for the Quality upscaling tier
ArtCNN is tuned for animation and looked unnatural on live action, and its first Direct3D compile took about a minute per model. Quality now denoises with AN3223's nlmeans (general-purpose profile, any size) and upscales with FSRCNNX 16-0-4-1, trained on general imagery, at any enlargement. Both compile in seconds; 1080p in a maximized 1440p window measured 3.2 ms per frame. The first-compile notice now covers any shader set not yet compiled on the machine but only shows after three seconds, and a set with nothing to verify at the current size clears it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
506c69b36e
commit
5b6c063ff1
9 changed files with 3941 additions and 7897 deletions
|
|
@ -10,7 +10,7 @@ import { win, isNative } from '../platform/native';
|
|||
import { WindowControls } from '../app/TopBar';
|
||||
import { navigate } from '../app/router';
|
||||
import { mpv } from './engine';
|
||||
import { UPSCALING_ORDER, hasFailed, readDiagnostics, requestEnhancement, toggleBypass, type Diagnostics } from './enhance';
|
||||
import { PREPARING_NOTICE_MS, UPSCALING_ORDER, hasFailed, readDiagnostics, requestEnhancement, toggleBypass, type Diagnostics } from './enhance';
|
||||
import { toast } from '../ui/overlays';
|
||||
import type { Item } from '../plex/types';
|
||||
|
||||
|
|
@ -242,6 +242,17 @@ const SUB_BOXES: { value: SubtitleBox; label: string }[] = [
|
|||
|
||||
type SettingsView = 'main' | 'audio' | 'subtitles' | 'quality' | 'upscaling' | 'speed' | 'version' | 'chapters' | 'subSize' | 'subBox';
|
||||
|
||||
/** True once `flag` has stayed true for `ms` (a quick blip never shows). */
|
||||
function useLasting(flag: boolean, ms: number) {
|
||||
const [on, setOn] = useState(false);
|
||||
useEffect(() => {
|
||||
if (!flag) return setOn(false);
|
||||
const t = setTimeout(() => setOn(true), ms);
|
||||
return () => clearTimeout(t);
|
||||
}, [flag, ms]);
|
||||
return on;
|
||||
}
|
||||
|
||||
/** Polls what mpv's renderer is doing while a panel shows it. */
|
||||
function useDiagnostics(enabled: boolean) {
|
||||
const [d, setD] = useState<Diagnostics | null>(null);
|
||||
|
|
@ -322,7 +333,7 @@ function SettingsPanel({ onClose }: { onClose: () => void }) {
|
|||
<div className="panel-subhead">Stages</div>
|
||||
<Option selected={prefs.enhanceDeband} label="Debanding" detail="Smooths banding in gradients" onClick={() => prefs.set('enhanceDeband', !prefs.enhanceDeband)} />
|
||||
<Option selected={prefs.enhanceSharpen} label="Sharpening" detail="AMD CAS · SDR only" onClick={() => prefs.set('enhanceSharpen', !prefs.enhanceSharpen)} />
|
||||
<Option selected={prefs.enhanceDenoise} label="Denoising" detail="ArtCNN’s denoising model while upscaling · Quality tier, SDR only" onClick={() => prefs.set('enhanceDenoise', !prefs.enhanceDenoise)} />
|
||||
<Option selected={prefs.enhanceDenoise} label="Denoising" detail="Non-local means, at any size · Quality tier, SDR only" onClick={() => prefs.set('enhanceDenoise', !prefs.enhanceDenoise)} />
|
||||
<button className={`panel-compare${st.enhance.bypass ? ' on' : ''}`} onClick={() => toggleBypass()}>
|
||||
{st.enhance.bypass ? 'Turn enhancement back on' : 'Compare with enhancement off'}
|
||||
<kbd>B</kbd>
|
||||
|
|
@ -661,6 +672,7 @@ export function PlayerOverlay() {
|
|||
const { visible, poke } = useAutoHide(st.paused || st.ended, !!panel || scrubbing || st.countdown !== null);
|
||||
const clickTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
|
||||
const seekStep = useSettings((s) => s.seekStep);
|
||||
const preparing = useLasting(st.enhance.preparing, PREPARING_NOTICE_MS);
|
||||
|
||||
const showFlash = (icon: string) => setFlash({ icon, key: Date.now() });
|
||||
|
||||
|
|
@ -806,13 +818,13 @@ export function PlayerOverlay() {
|
|||
{!st.fullscreen && <WindowControls />}
|
||||
</div>
|
||||
|
||||
{(loading || st.buffering || st.seeking || st.enhance.preparing) && !st.error && (
|
||||
{(loading || st.buffering || st.seeking || preparing) && !st.error && (
|
||||
<div className="player-center">
|
||||
<Spinner size={44} />
|
||||
{st.enhance.preparing && (
|
||||
{preparing && (
|
||||
<p className="player-preparing">
|
||||
Preparing {UPSCALING[st.enhance.active].label} upscaling
|
||||
<small>First time on this computer only · about a minute</small>
|
||||
<small>First time on this computer only</small>
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue