diff --git a/COPYING b/COPYING
index a9d8844e42393a8ca9b79fb1cc81aa983b916cc3..0227899c94523ffb16b26e6a85ff55add99123e4 100644
--- a/COPYING
+++ b/COPYING
@@ -3,7 +3,7 @@ License, included below. This software may be subject to other third party
 and contributor rights, including patent rights, and no such rights are
 granted under this license.   
 
-Copyright (c) 2010-2017, ITU/ISO/IEC
+Copyright (c) 2010-2019, ITU/ISO/IEC
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/README.md b/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..b695964769c896c17c0b5f6690e79da19d7c0ca3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,97 @@
+How to build VTM
+================
+
+The software uses CMake to create platform-specific build files. 
+
+Build instructions for plain CMake (suggested)
+----------------------------------------------
+
+**Note:** A working CMake installation is required for building the software.
+
+CMake generates configuration files for the compiler environment/development environment on each platform. 
+The following is a list of examples for Windows (MS Visual Studio), macOS (Xcode) and Linux (make).
+
+Open a command prompt on your system and change into the root directory of this project.
+
+Create a build directory in the root directory:
+```bash
+mkdir build 
+```
+
+Use one of the following CMake commands, based on your platform. Feel free to change the commands to satisfy
+your needs.
+
+**Windows Visual Studio 2015 64 Bit:**
+```bash
+cd build
+cmake .. -G "Visual Studio 14 2015 Win64"
+```
+Then open the generated solution file in MS Visual Studio.
+
+**macOS Xcode:**
+```bash
+cd build
+cmake .. -G "Xcode"
+```
+Then open the generated work space in Xcode.
+
+**Linux**
+
+For generating Linux Release Makefile:
+```bash
+cd build
+cmake .. -DCMAKE_BUILD_TYPE=Release
+```
+For generating Linux Debug Makefile:
+```bash
+cd build
+cmake .. -DCMAKE_BUILD_TYPE=Debug
+```
+
+Then type
+```bash
+make -j
+```
+
+For more details, refer to the CMake documentation: https://cmake.org/cmake/help/latest/
+
+Build instructions for make
+---------------------------
+
+**Note:** The build instructions in this section require the make tool and Python to be installed, which are
+part of usual Linux and macOS environments. See below for installation instruction for Python and GnuWin32 
+on Windows.
+
+Open a command prompt on your system and change into the root directory of this project.
+
+To use the default system compiler simply call:
+```bash
+make all
+```
+For MSYS2 and MinGW: Open an MSYS MinGW 64-Bit terminal and change into the root directory of this project.
+
+Call:
+```bash
+make all toolset=gcc
+```
+
+
+Tool Installation on Windows
+----------------------------
+Download CMake: http://www.cmake.org/ and install it.
+
+Python and GnuWin32 are not mandatory, but they simplify the build process for the user.
+
+python:    https://www.python.org/downloads/release/python-371/
+
+gnuwin32:  https://sourceforge.net/projects/getgnuwin32/files/getgnuwin32/0.6.30/GetGnuWin32-0.6.3.exe/download
+
+To use MinGW, install MSYS2: http://repo.msys2.org/distrib/msys2-x86_64-latest.exe
+
+Installation instructions: https://www.msys2.org/
+
+Install the needed toolchains:
+```bash
+pacman -S --needed base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain git subversion mingw-w64-i686-cmake mingw-w64-x86_64-cmake
+```
+
diff --git a/README.txt b/README.txt
deleted file mode 100644
index 8c8f02715a0dac363cb2721636ae51c789eb3184..0000000000000000000000000000000000000000
--- a/README.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-NextSoftware/VVCSoftware_VTM build howto:
-
-The software uses cmake to create the needed build files. 
-Download cmake: http://www.cmake.org/ and install it.
-
-=================== Windows only =======================
-Python and gnuwin32 are not mandatory, but they simplifiy the build process for the user.
-python:    https://www.python.org/downloads/release/python-371/
-gnuwin32:  https://sourceforge.net/projects/getgnuwin32/files/getgnuwin32/0.6.30/GetGnuWin32-0.6.3.exe/download
-
-To use MinGW, install MSYS2:
-http://repo.msys2.org/distrib/msys2-x86_64-latest.exe
-
-Installation instructions:
-https://www.msys2.org/
-
-and install the needed toolchains.
-pacman -S --needed base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain git subversion mingw-w64-i686-cmake mingw-w64-x86_64-cmake
-========================================================
-
-========= Build instructions for plain cmake ===========
-Open a command prompt on your system and change into the root directory
-of this project (location of README.txt).
-
-Create a build directory in the root directory:
-mkdir build 
-
-After that use one of the following cmake commands. Feel free to change the 
-commands to satisfy your needs.
-
-Windows sample for Visual Studio 2015 64 Bit:
-cd build
-cmake .. -G "Visual Studio 14 2015 Win64"
-
-Linux Release Makefile sample:
-cd build
-cmake .. -DCMAKE_BUILD_TYPE=Release
-
-Linux Debug Makefile sample:
-cd build
-cmake .. -DCMAKE_BUILD_TYPE=Debug
-
-MACOSX Xcode sample:
-cd build
-cmake .. -G "Xcode"
-========================================================
-
-============= Build instructions for make ==============
-remark:
-If you installed python and gnuwin32 on Windows operating systems, 
-you will be able to use make.
-
-Open a command prompt on your system and change into the root directory
-of this project (location of README.txt).
-
-to use the default system compiler simply call:
-make all
-
-Using MSYS2 and MinGW:
-Open an MSYS MinGW 64-Bit terminal and change into the root directory
-of this project (location of README.txt).
-
-Call:
-make all toolset=gcc
-========================================================
diff --git a/doc/Makefile b/doc/Makefile
index 084c4f3fdd34c793dea857b04f054dae1638cf10..c1f5a58b96c11088f7c284b98d9ab58f46b1444d 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -6,8 +6,13 @@ LATEX:=$(shell which xelatex || which pdflatex || which latex)
 BIBTOOL:=$(shell which bibtool || echo \\\# skipping bibtool )
 BIBTOOL_DB=~/mpeg/doc/bib/jctvc.bib
 
+LATEXFLAGS:="-shell-escape"
+
 all: $(DOCNUM).pdf
 
+clean:
+	rm -fr _minted-software-manual software-manual.bbl software-manual.blg software-manual.lot software-manual.out software-manual.log software-manual.toc software-manual.aux software-manual.pdf
+
 %.aux: %.tex
 	$(LATEX) $(LATEXFLAGS) $<
 
diff --git a/doc/gop-structure-example.pdf b/doc/figures/gop-structure-example.pdf
similarity index 100%
rename from doc/gop-structure-example.pdf
rename to doc/figures/gop-structure-example.pdf
diff --git a/doc/jvetdoc.cls b/doc/jvetdoc.cls
new file mode 100644
index 0000000000000000000000000000000000000000..bdc22890e30fb89bfc9ac4a60b0b17d920c2af7b
--- /dev/null
+++ b/doc/jvetdoc.cls
@@ -0,0 +1,148 @@
+%%
+%% jvetdoc: Copyright (c) 2011 BBC Research & Development
+%% All rights reserved.
+%%
+%% Permission to use, copy, modify, and/or distribute this software for any
+%% purpose with or without fee is hereby granted, provided that the above
+%% copyright notice and this permission notice appear in all copies.
+%%
+%% Neither the names of the BBC, ITU, ISO, IEC nor the names of its
+%% contributors may be used to endorse or promote products derived from
+%% this software without specific prior written permission.
+%%
+%% THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+%% WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+%% MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+%% ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+%% WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{jvetdoc}[2019/01/31 JVET document class]
+
+\LoadClassWithOptions{article}
+
+% typeset using Times New Roman
+\RequirePackage{ifxetex}
+\ifxetex
+  % use the correct fonts when using XeTeX
+  \RequirePackage{fontspec}
+  \defaultfontfeatures{Mapping=tex-text}
+  \setmainfont{Times New Roman}
+\else
+  \RequirePackage{times}
+\fi
+
+% expand the margins
+\RequirePackage{geometry}
+\geometry{tmargin=1.6cm,lmargin=1in,rmargin=2.5cm,bmargin=1in,nohead}
+
+% require graphicx for loading the logos in the header
+\RequirePackage{graphicx}
+
+% don't number the abstract
+\renewenvironment{abstract}{\section*{Abstract}}{}
+
+% format the date in iso style
+\RequirePackage{datetime}
+\renewcommand{\dateseparator}{-}
+\newdateformat{JVET@yyyymmdddate}{%
+	\THEYEAR\dateseparator\twodigit{\THEMONTH}\dateseparator\twodigit{\THEDAY}}
+
+% all pages only have a footer
+\RequirePackage{fancyhdr}
+\pagestyle{fancy}
+\renewcommand{\headrulewidth}{0pt}
+\fancyhead{}
+\cfoot{\thepage}
+\rfoot{Date saved: \JVET@yyyymmdddate\today}
+
+% macros for document metadata
+\RequirePackage[normalem]{ulem}
+\def\@jvetdocnum{\uline{xxx}}
+\def\@jvetdocstatus{\uline{TODO: Add \texttt{\textbackslash{}jvetdocstatus}}}
+\def\@jvetdocpurpose{\uline{TODO: Add \texttt{\textbackslash{}jvetdocpurpose}}}
+\def\@jvetdocsource{\uline{TODO: Add \texttt{\textbackslash{}jvetdocsource}}}
+\def\@jvetmeeting{\uline{TODO: Add \texttt{\textbackslash{}jvetmeeting}}}
+\newcommand{\jvetdocnum}[1]{\def\@jvetdocnum{\mbox{#1}}}
+\newcommand{\jvetdocstatus}[1]{\def\@jvetdocstatus{\mbox{#1}}}
+\newcommand{\jvetdocpurpose}[1]{\def\@jvetdocpurpose{\mbox{#1}}}
+\newcommand{\jvetdocsource}[1]{\def\@jvetdocsource{\mbox{#1}}}
+\newcommand{\jvetmeeting}[1]{\def\@jvetmeeting{\mbox{#1}}}
+
+% affiliation block in the author list
+\newenvironment{affiliation}{%
+	\begin{tabular}[t]{@{}>{\renewcommand{\\}{, }}l@{}}%
+}{%
+	\end{tabular}%
+}
+
+\RequirePackage{array}
+
+\RequirePackage{ifthen}
+\newcounter{jvet@author@column}
+\newcommand{\@jvet@switch@author@column}{%
+	\ifthenelse{\value{jvet@author@column} = 1}{%
+		% do nothing
+	}{%
+		\addtocounter{jvet@author@column}{1}%
+		&
+	}%
+}
+
+\newcommand*{\email}[1]{\@jvet@switch@author@column\textit{#1}}
+\newcommand*{\tel}[1]{\@jvet@switch@author@column\textrm{#1}}
+
+% Make a title at the top of the current page.
+\renewcommand\maketitle{%
+	% none of the title is put in the header (it is too difficult to
+	% make the page match the word style in this case)
+	\vspace*{-1.7cm}
+	\begin{raggedright}
+	\rule{0pt}{0.74cm}% strut incase images aren't loaded
+	\IfFileExists{logos/itu}{\includegraphics[height=0.74cm]{logos/itu}}{}
+	\IfFileExists{logos/iso}{\includegraphics[height=0.74cm]{logos/iso}}{}
+	\IfFileExists{logos/iec}{\includegraphics[height=0.74cm]{logos/iec}}{}
+	\\
+	\textbf{Joint Video Experts Team (JVET)}\\[0ex]
+	\textbf{of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11}
+		\hfill Document: JVET-\@jvetdocnum\\[0ex]
+	\@jvetmeeting
+
+	\vspace{0.5\baselineskip}
+
+	\newcommand{\@strutb}{\rule{0pt}{2.5ex}}
+	\begin{tabular}{lp{0.78\textwidth}}
+	\@strutb \it Title: & \@title \\
+	\@strutb \it Status: & \@jvetdocstatus \\
+	\@strutb \it Purpose: & \@jvetdocpurpose \\
+	\@strutb \it Author(s): & %
+		\setcounter{jvet@author@column}{0}
+		\let\@and\\
+		\renewcommand{\and}{\@and\setcounter{jvet@author@column}{0}}
+		\newcommand{\@NLtoPAR}{\renewcommand{\\}{\par}}
+		\begin{tabular}[t]{@{}>{\@NLtoPAR}p{3in}|>{\@NLtoPAR}p{2in}@{}}%
+			\@author
+		\end{tabular}\\
+	\@strutb \it Source: & \@jvetdocsource \\
+	\end{tabular}
+	\end{raggedright}
+
+	% draw a short horizontal line to delimit the title from body
+	{\center\rule{0.35\textwidth}{1pt}\\}
+}
+
+%
+\RequirePackage{parskip}
+\RequirePackage[compact]{titlesec}
+%\titlespacing{\section}{0pt}{*0}{*0}
+%\titlespacing{\subsection}{0pt}{*0}{*0}
+%\titlespacing{\subsubsection}{0pt}{*0}{*0}
+
+\titlespacing*{\section}
+{0pt}{5ex}{2ex}
+\titlespacing*{\subsection}
+{0pt}{5ex}{2ex}
+\titlespacing*{\subsection}
+{0pt}{5ex}{2ex}
diff --git a/doc/software-manual.pdf b/doc/software-manual.pdf
index 0b4925cf32a94097c096cdc47707a5dbbebe3637..34b144cc8b9a980a393cc3c1a4a8bba40a247126 100644
Binary files a/doc/software-manual.pdf and b/doc/software-manual.pdf differ
diff --git a/doc/software-manual.tex b/doc/software-manual.tex
index 616d32b3fd9a13f18fe0d34868c21e8ff09b4bbc..e816dbe34f6722ddf22932558b173a04cfbcabca 100644
--- a/doc/software-manual.tex
+++ b/doc/software-manual.tex
@@ -1,4 +1,4 @@
-\documentclass[a4paper,11pt]{jctvcdoc}
+\documentclass[a4paper,11pt]{jvetdoc}
 
 \usepackage{geometry}[2010/02/12]
 
@@ -22,6 +22,18 @@
 \usepackage{algorithm2e}
 \usepackage{amsmath}
 
+\urlstyle{same}
+
+% code highlighting
+\usepackage{minted,xcolor}
+\definecolor{bggray}{gray}{0.95}
+\setminted{
+bgcolor=bggray,
+xleftmargin=3ex,
+breaklines=true,
+fontsize=\footnotesize}
+
+
 \usepackage[strings]{underscore}
 \usepackage{csquotes}
 \MakeOuterQuote{"}
@@ -72,7 +84,7 @@
 }
 
 \newenvironment{OptionTableNoShorthand}[2]{%
-	\footnotesize
+	\scriptsize
 	\def\arraystretch{1.8}
 	\clearOptions
 	\begin{longtable}{l<{\makecell[tl]{\optOption}}%
@@ -105,7 +117,7 @@
 }
 
 \newenvironment{SEIListTable}[1]{%
-	\footnotesize
+	\scriptsize
 	\def\arraystretch{1.8}
 	\clearOptions
 	\begin{longtable}{c<{\makecell[tl]{\optOption}}%
@@ -138,7 +150,7 @@
 }
 
 \newenvironment{MacroTable}[1]{%
-	\footnotesize
+	\scriptsize
 	\def\arraystretch{1.3}
 	\clearOptions
 	\begin{longtable}{lcp{0.5\textwidth}}
@@ -166,7 +178,7 @@
 	\end{longtable}
 }
 
-\title{HM Software Manual}
+\title{VTM Software Manual}
 \author{%
 	Frank Bossen
 	\email{frank@bossentech.com}
@@ -174,36 +186,37 @@
 	David Flynn
 	\email{dflynn@blackberry.com}
 	\and
-  Karl Sharman
+	Xiang Li
+	\email{xlxiangli@tencent.com}
+	\and
+	Karl Sharman
 	\email{karl.sharman@eu.sony.com}
 	\and
 	Karsten S\"uhring
 	\email{karsten.suehring@hhi.fraunhofer.de}
 }
 
-\jctvcmeeting{}
-\jctvcdocnum{Software Manual}
-\jctvcdocstatus{Software AHG working document}
-\jctvcdocpurpose{Information}
-\jctvcdocsource{AHG chairs}
+\jvetmeeting{}
+\jvetdocnum{Software Manual}
+\jvetdocstatus{Software AHG working document}
+\jvetdocpurpose{Information}
+\jvetdocsource{AHG chairs}
 
 \begin{document}
 \maketitle
 \begin{abstract}
-This document is a user manual describing usage of reference software
-for the HEVC project. It applies to version 16.13
-of the software.
+This document is a user manual describing usage of the VTM reference software
+for the VVC project. It applies to version 4.0 of the software.
 \end{abstract}
 
 \tableofcontents
 \listoftables
 
 
-
 \section{General Information}
 Reference software is being made available to provide a reference
-implementation of the HEVC standard being developed by the Joint
-Collaborative Team on Video Coding (JCT-VC) regrouping experts from
+implementation of the HEVC standard being developed by the Joint 
+Video Experts Team (JVET) regrouping experts from
 ITU-T SG 16 and ISO/IEC SC29 WG11. One of the main goals of the
 reference software is to provide a basis upon which to conduct
 experiments in order to determine which coding tools provide desired
@@ -211,61 +224,165 @@ coding performance. It is not meant to be a particularly efficient
 implementation of anything, and one may notice its apparent
 unsuitability for a particular use. It should not be construed to be a
 reflection of how complex a production-quality implementation of a
-future HEVC standard would be.
+future VVC standard would be.
 
 This document aims to provide guidance on the usage of the reference
 software. It is widely suspected to be incomplete and suggestions for
 improvements are welcome. Such suggestions and general inquiries may be
-sent to the general JCT-VC email reflector on
-\url{jct-vc@lists.rwth-aachen.de} (registration required).
+sent to the general JVET email reflector on
+\url{https://lists.rwth-aachen.de/postorius/lists/jvet.lists.rwth-aachen.de/} 
+(registration required).
 
 \subsection*{Bug reporting}
-Bugs should be reported on the issue tracker set up at
-\url{http://hevc.kw.bbc.co.uk/trac/}
+Bugs should be reported on the issue tracker set up at:
+
+\url{https://jvet.hhi.fraunhofer.de/trac/vvc/}
 
 \section{Installation and compilation}
-The software may be retrieved from one of the following SVN servers
-(mirrored):
-\begin{itemize}
-\item \url{https://hevc.hhi.fraunhofer.de/svn/svn_HEVCSoftware/}
-\item \url{svn://hevc.kw.bbc.co.uk/svn/jctvc-hm/}
-\end{itemize}
+The software may be retrieved from the GitLab server located at:
 
-Table~\ref{tab:project-files} enumerates various project files that are
-provided for development environments.
+\url{https://vcgit.hhi.fraunhofer.de/jvet/VVCSoftware_VTM}
+
+Table~\ref{tab:project-files} lists the compiler environments and versions 
+for which building the software is tested.
+
+Note that the software makes use of C++11 language features, which may not
+be available in older compilers.
 
 \begin{table}[ht]
-\footnotesize
-\caption{Available project files}
+\caption{Supported compilers}
 \label{tab:project-files}
 \centering
 \begin{tabular}{ll}
 \hline
- \thead{Environment} &
- \thead{Location of project file} \\
-% Environment          & Location of project file \\
+ \thead{Compiler environment} &
+ \thead{Versions} \\
 \hline
-MS Visual Studio 2008 (VC9)   & build/HM_vc9.sln \\
-MS Visual Studio 2010 (VC10)  & build/HM_vc2010.sln \\
-MS Visual Studio 2012 (VC11)  & build/HM_vc2012.sln \\
-MS Visual Studio 2013 (VC12)  & build/HM_vc2013.sln \\
-Xcode                         & HM.xcodeproj \\
-Eclipse                       & .project .cproject \\
-make/gcc (e.g. Linux)         & build/linux/makefile \\
+MS Visual Studio  & 2015 and 2017 \\
+GCC               & 5.4 and 7.3 \\
+Xcode/clang       & latest \\
 \hline
 \end{tabular}
 \end{table}
 
-For encoding large picture sizes (like UHDTV) it is strongly advised to build 64-bit
-binaries and to use a 64-bit OS. This will allow the software to use more than 2GB of RAM.
+By default the software is built as 64-bit binaries to be used on a 64-bit OS. 
+This allows the software to use more than 2GB of RAM.
+
+The software uses CMake to create platform-specific build files. 
+
+\subsection {Build instructions for plain CMake (suggested)}
+
+\textbf{Note:} A working CMake installation is required for building the software.
+
+CMake generates configuration files for the compiler environment/development
+environment on each platform. The following is a list of examples for Windows
+(MS Visual Studio), macOS (Xcode) and Linux (make).
+
+Open a command prompt on your system and change into the root directory
+of this project.
+
+Create a build directory in the root directory:
+\begin{minted}{bash}
+mkdir build 
+\end{minted}
+Use one of the following CMake commands, based on your platform. Feel free to change the 
+commands to satisfy your needs.
+
+\textbf{Windows Visual Studio 2015 64 Bit:}
+\begin{minted}{bash}
+cd build
+cmake .. -G "Visual Studio 14 2015 Win64"
+\end{minted}
+Then open the generated solution file in MS Visual Studio.
+
+\textbf{macOS Xcode:}
+\begin{minted}{bash}
+cd build
+cmake .. -G "Xcode"
+\end{minted}
+Then open the generated work space in Xcode.
+
+\textbf{Linux}
+
+For generating Linux Release Makefile:
+\begin{minted}{bash}
+cd build
+cmake .. -DCMAKE_BUILD_TYPE=Release
+\end{minted}
+For generating Linux Debug Makefile:
+\begin{minted}{bash}
+cd build
+cmake .. -DCMAKE_BUILD_TYPE=Debug
+\end{minted}
+Then type
+\begin{minted}{bash}
+make -j
+\end{minted}
+to build the software.
+
+For more details, refer to the CMake documentation: \url{https://cmake.org/cmake/help/latest/}
+
+\subsection {Build instructions for make}
+
+\textbf{Note:}
+The build instructions in this section require the make tool and Python
+to be installed, which are part of usual Linux and macOS environments. 
+See section \ref{windowsinstall} for installation instruction for Python 
+and GnuWin32 on Windows.
+
+Open a command prompt on your system and change into the root directory
+of this project.
+
+To use the default system compiler simply call:
+\begin{minted}{bash}
+make all
+\end{minted}
+For MSYS2 and MinGW:
+Open an MSYS MinGW 64-Bit terminal and change into the root directory
+of this project.
+
+Call:
+\begin{minted}{bash}
+make all toolset=gcc
+\end{minted}
+
+\subsection{Tool Installation on Windows}
+\label{windowsinstall}
+
+Download CMake: \url{http://www.cmake.org/} and install it.
+
+Python and GnuWin32 are not mandatory, but they simplify the build process for the user.
+
+\begin{table}[ht]
+\footnotesize
+\centering
+\begin{tabular}{ll}
+\hline
+Python     &    \url{https://www.python.org/downloads/release/python-371/} \\
+GnuWin32   &    \url{https://sourceforge.net/projects/getgnuwin32/files/getgnuwin32/0.6.30/GetGnuWin32-0.6.3.exe/download} \\
+\hline
+\end{tabular}
+\end{table}
+
+To use MinGW, install MSYS2:
+\url{http://repo.msys2.org/distrib/msys2-x86_64-latest.exe}
+
+Installation instructions:
+\url{https://www.msys2.org/}
+
+Install the needed toolchains:
+\begin{minted}{bash}
+pacman -S --needed base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain git subversion mingw-w64-i686-cmake mingw-w64-x86_64-cmake
+\end{minted}
 
 %%%%
 %%%%
 %%%%
 \section{Using the encoder}
-\begin{verbatim}
+
+\begin{minted}{bash}
 TAppEncoder 	[--help] [-c config.cfg] [--parameter=value]
-\end{verbatim}
+\end{minted}
 
 \begin{table}[ht]
 \footnotesize
@@ -417,7 +534,7 @@ its list of reference pictures is \verb|-1 1|.
 \caption{A GOP structure}
 \label{fig:gop-example}
 \centering
-\includegraphics[width=0.7\textwidth]{gop-structure-example}
+\includegraphics[width=0.7\textwidth]{figures/gop-structure-example}
 \end{figure}
 
 Inter RPS prediction may be used for Frame2, Frame3 and Frame4, hence
@@ -2936,9 +3053,9 @@ Numerous constants that guard individual adoptions are defined within
 \clearpage
 \section{Using the decoder}
 \subsection{General}
-\begin{verbatim}
+\begin{minted}{bash}
 TAppDecoder -b str.bin -o dec.yuv [options]
-\end{verbatim}
+\end{minted}
 
 \begin{OptionTableNoShorthand}{Decoder options}{tab:decoder-options}
 \Option{(--help)} &
@@ -3089,7 +3206,7 @@ way, which in turn can be loaded into a suitable YUV player for overlay of the
 reconstructed YUV sequence, or can be used for statistical analysis at a
 selectable scope (e.g. block/picture/sequence level). An example implementation
 for such visualization is available with the open-source YUView player
-(https://github.com/IENT/YUView). 
+(\url{https://github.com/IENT/YUView}). 
 
 
 \subsection{Usage}
@@ -3127,7 +3244,7 @@ Specifies which traces should be saved, and for which POCs.
 \end{OptionTableNoShorthand}
 
 Concrete examples of calls for  generating a block statistics file are:
-\begin{verbatim}
+\begin{minted}{bash}
 bin/DecoderAppStatic -b str/BasketballDrive_1920x1080_QP37.vvc \
     --TraceFile="stats/BasketballDrive_1920x1080_QP37_coded.vtmbmsstats" \
     --TraceRule="D_BLOCK_STATISTICS_CODED:poc>=0"
@@ -3135,7 +3252,7 @@ bin/DecoderAppStatic -b str/BasketballDrive_1920x1080_QP37.vvc \
 bin/DecoderAppStatic -b str/BasketballDrive_1920x1080_QP37.vvc \
     --TraceFile="stats/BasketballDrive_1920x1080_QP37_all.vtmbmsstats" \
     --TraceRule="D_BLOCK_STATISTICS_ALL:poc>=0"   
-\end{verbatim}
+\end{minted}
 
 
 \subsection{Block statistics file formats}
@@ -3244,16 +3361,16 @@ In order to add further block statistics, do the following:
 \begin{description}
 \item[source/Lib/CommonLib/dtrace_blockstatistics.h]
   Add your statistic to the BlockStatistic enum:	
-\begin{verbatim}
+\begin{minted}{c++}
 enum class BlockStatistic {
   // general
   PredMode,
   PartSize,
   Depth,
-\end{verbatim}
+\end{minted}
   
 Further, add your statistic to the map blockstatistic2description:
-\begin{verbatim}
+\begin{minted}{c++}
 static const std::map<BlockStatistic, 
   std::tuple<std::string, BlockStatisticType, std::string>> 
   blockstatistic2description =
@@ -3268,7 +3385,7 @@ static const std::map<BlockStatistic,
     std::tuple<std::string, BlockStatisticType, std::string>
     {"MVL0", BlockStatisticType::Vector, "Scale: 4"}},
   YOURS
-\end{verbatim}
+\end{minted}
 
 
 \item[source/Lib/CommonLib/dtrace_blockstatistics.cpp] All code for
@@ -3276,28 +3393,28 @@ static const std::map<BlockStatistic,
   getAndStoreBlockStatistics. This function is called once for each
   CTU, after it has been en/decoded. The following macros have been
   defined to facilitate writing of block statistics:
-\begin{verbatim}
+\begin{minted}{c++}
 DTRACE_BLOCK_SCALAR(ctx,channel,cs_cu_pu,stat_type,val)   
 DTRACE_BLOCK_SCALAR_CHROMA(ctx,channel,cs_cu_pu,stat_type,val)
 DTRACE_BLOCK_VECTOR(ctx,channel,cu_pu,stat_type,v_x,v_y)    
 DTRACE_BLOCK_AFFINETF(ctx,channel,pu,stat_type,v_x0,v_y0,v_x1,v_y1,v_x2,v_y2) 
-\end{verbatim}
+\end{minted}
 
 An example:
-\begin{verbatim}
+\begin{minted}{c++}
 DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL, 
   cu, GetBlockStatisticName(BlockStatistic::PredMode), cu.predMode);
-\end{verbatim}
+\end{minted}
 
 
 \item[Block statistics for debugging] The statistics can also be used
   to write out other data, not just syntax elements. Add your
   statistics to dtrace_blockstatistics.h. Where it should be used the
   following headers have to be included:
-\begin{verbatim}
+\begin{minted}{c++}
 #include "dtrace_next.h"
 #include "dtrace_blockstatistics.h"
-\end{verbatim}
+\end{minted}
 \end{description}
 
 \end{document}