\usepackage{polyglossia}
\setdefaultlanguage{english}

\usepackage{amssymb,amsmath}
\usepackage{nicefrac}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
\else % if luatex or xelatex
  \ifxetex
%    \usepackage{mathspec}
    \usepackage[no-sscript]{xltxtra}
    \usepackage{xunicode}
  \else
    \usepackage{fontspec}
  \fi
  \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
  \newcommand{\euro}{€}
\fi
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref
\usepackage{tabu,booktabs}
\tabulinesep=3pt

\usepackage{graphicx}
\usepackage{color}
\usepackage{fancyvrb}
\newcommand{\VerbBar}{|}
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
% fix issue with linebreaks and letter spacing in non-cpp blocks
\DefineVerbatimEnvironment{verbatim}{Verbatim}{}
% Add ',fontsize=\small' for more characters per line
\newenvironment{Shaded}{}{}
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}}
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{#1}}
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{#1}}
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.73,0.40,0.53}{#1}}
\newcommand{\ImportTok}[1]{#1}
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{#1}}}
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.73,0.13,0.13}{\textit{#1}}}
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{#1}}
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{#1}}
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}}
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
\newcommand{\BuiltInTok}[1]{#1}
\newcommand{\ExtensionTok}[1]{#1}
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.48,0.00}{#1}}
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{#1}}
\newcommand{\RegionMarkerTok}[1]{#1}
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}}
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}}
\newcommand{\NormalTok}[1]{#1}

\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}

\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\columnwidth\columnwidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\def\fps@figure{htp}% set default figure placement
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}

\ifxetex
  \usepackage[setpagesize=false, % page size defined by xetex
              unicode=false, % unicode breaks when used with xetex
              xetex]{hyperref}
\else
  \usepackage[unicode=true]{hyperref}
\fi

% read version into \oidnversion
\newread\versionfile
\openin\versionfile=tmp/version
\read\versionfile to\oidnversion
\closein\versionfile

\definecolor{IntelDarkBlue}{RGB}{0,60,113}

\hypersetup{breaklinks=true,
            bookmarks=true,
            pdfauthor={Intel Corporation},
            pdftitle={Intel® Open Image Denoise \oidnversion},
            colorlinks=true,
            citecolor=IntelDarkBlue,
            urlcolor=IntelDarkBlue,
            linkcolor=IntelDarkBlue,
            pdfborder={0 0 0}}

\copyrightyears{2018--2025}
\trademarkacknowledgment{%
Intel, the Intel logo, Xeon, Intel Xeon Phi, and Intel Core are
trademarks of Intel Corporation in the U.S. and/or other countries.
}
\optimizationdisclaimer

% no hyphenation (e.g. for trademarks)
\hyphenation{Intel Xeon}


% fix missing unicode chars in used font
\catcode`\⇐\active
\def⇐{\ensuremath{\Leftarrow}}

\catcode`\⇒\active
\def⇒{\ensuremath{\Rightarrow}}

\catcode`\←\active
\def←{\ensuremath{\leftarrow}}

\catcode`\→\active
\def→{\ensuremath{\rightarrow}}

\catcode`\∞\active
\def∞{\ensuremath{\infty}}

\catcode`\½\active
\def½{\nicefrac12}

\catcode`\⅓\active
\def⅓{\nicefrac13}

\catcode`\⅔\active
\def⅔{\nicefrac23}

\catcode`\¼\active
\def¼{\nicefrac14}

\catcode`\¾\active
\def¾{\nicefrac34}

\catcode`\∙\active
\def∙{\ensuremath{\cdot}}

% fix overfull hboxes, somehow required for xelatex
% pdflatex and lualatex is fine without
\emergencystretch=0.5em

\makeatletter%
\newcommand*{\BreakableChar}{%
  \leavevmode%
  \nobreak\hskip\z@skip%
  \discretionary{}{}{}%
  \nobreak\hskip\z@skip%
}%
\makeatother

% enable (more flexible) linebreaks in \texttt
\renewcommand{\texttt}[1]{%
\begingroup%
\protect\renewcommand{\_}{\textunderscore\BreakableChar}%
\ttfamily%
\fontdimen3\font=0.1em% interword stretch
\fontdimen4\font=0.1em% interword shrink
\hyphenchar\font=`\-% to allow hyphenation
\begingroup\lccode`~=`/\lowercase{\endgroup\def~}{/\BreakableChar}%
\catcode`/=\active%
\begingroup\lccode`~=`*\lowercase{\endgroup\def~}{*\BreakableChar}%
\catcode`*=\active%
\begingroup\lccode`~=`?\lowercase{\endgroup\def~}{?\BreakableChar}%
\catcode`?=\active%
\begingroup\lccode`~=`)\lowercase{\endgroup\def~}{)\BreakableChar}%
\catcode`)=\active%
\begingroup\lccode`~=`.\lowercase{\endgroup\def~}{.\BreakableChar}%
\catcode`.=\active%
\begingroup\lccode`~=`;\lowercase{\endgroup\def~}{;\BreakableChar}%
\catcode`;=\active%
\scantokens{#1\noexpand}%
\endgroup%
}
