Files
doc_phd_thesis/021_VideoCoding/Figures/HybridCodingBlockDiagram.tikz
2018-07-06 17:56:46 +01:00

121 lines
5.2 KiB
Plaintext

\usetikzlibrary{arrows,matrix}
% \usepackage{amssymb, amsmath, mathptmx}
\begin{tikzpicture}[font=\scriptsize,node distance=1.1cm,scale=1]
\tikzstyle{simpleBlock}=[inner sep=0.1cm, minimum size=.9cm,text centered, minimum width=1cm, text width=1.2cm]
\tikzstyle{processBlock}=[simpleBlock, thick, draw]
\tikzstyle{sumBlock}=[draw,circle, inner sep=0cm, minimum size=0.4cm]
\tikzstyle{proposedBlock}=[processBlock, fill=gray!30]
\tikzstyle{blockArrow}=[draw,-latex]
\tikzstyle{point} = [draw, fill=black, circle,inner sep=1pt]
\coordinate (sumPoint) at (0,0);
\node[sumBlock] (ResidueDiff) at (sumPoint) {$+$};
\node[simpleBlock, inner sep=0.2cm, left of=ResidueDiff,text width=1cm,node distance=2.8cm] (Input) {\textbf{Input video}};
\path[blockArrow] (Input) -- (ResidueDiff) node [point, midway] (p0) {};
\node[processBlock,right=2.5 of ResidueDiff, text width=1.2cm] (Transf) {$T+Q$};
% \node[processBlock,right=of Transf, text width=.7cm] (Quant) {$Q$};
\node[processBlock,right=3.2 of Transf, text width=1.5cm] (VLC) {Entropy Encoder};
\path[blockArrow] (ResidueDiff) -- (Transf);
% \path[blockArrow] (Transf) -- (Quant);
\path[blockArrow] (Transf) -- (VLC) node [point,midway] (QuantFrame) {};
% \node[simpleBlock, right=of VLC, text width=1.5cm] (Output) {\textbf{HEVC bitstream}};
% \path[blockArrow] (VLC) -- (Output);
\node[processBlock, below=.3 of QuantFrame, text width=1.5cm] (InvQuant) {$Q^{-1} + T^{-1}$};
% \node[processBlock, below=.3 of InvQuant, text width=.7cm] (InvTransf) {$T^{-1}$};
\node[sumBlock, below=.3 of InvQuant] (ReconResidue) {$+$};
\node[processBlock, left=.8 of ReconResidue,text width=1cm, yshift=-.4cm] (RefBuffer) {Frame Buffer};
\path[blockArrow] (QuantFrame) -- (InvQuant);
% \path[blockArrow] (InvQuant) -- (InvTransf);
\path[blockArrow] (InvQuant) -- (ReconResidue);
\path[blockArrow] (ReconResidue) |- (RefBuffer);
\node[below=.3 of Transf, coordinate] (x1) {};
\path[blockArrow,-] (x1 -| ResidueDiff) node[point] () {} -- (x1);
\path[blockArrow] (x1) -- (ReconResidue);
\node [left=1.4 of RefBuffer,coordinate] (z0) {};
\node [processBlock,text width=1.4cm, above=.25 of z0] (Intra) {Intra prediction};
\node [processBlock,text width=1.4cm, below=.25 of z0] (Inter) {Inter prediction};
\path[blockArrow] (RefBuffer.160) -- (Intra.0);
\path[blockArrow] (RefBuffer.200) -- (Inter.0);
\node [point,left=.4 of Intra] (z1) {};
\node [point,left=.4 of Inter] (z2) {};
\path[blockArrow,-] (Intra) -- (z1);
\path[blockArrow,-] (Inter) -- (z2);
\node [coordinate,left of=z1,below of=z1,node distance=0.15cm] (w1) {};
\node [coordinate,left of=z2, above of=z2, node distance=0.15cm] (w2) {};
\path (z1) -- (z2) node [coordinate, midway] (w) {};
\path (w) -- (w -| sumPoint) node [point] (z) {};
\draw[-latex,densely dashed] (w1) to [bend left=60] (w2);
\draw [thick,blockArrow] (z1)+(0.1,-0.1) -- (z);
\path[blockArrow] (z) -- node[pos=0.96,right] {-} (ResidueDiff);
\node [below=.4 of Inter,coordinate] (inter0) {};
\node [below=.4 of Inter, xshift=0.5cm, coordinate] (inter1) {};
\path[blockArrow,-] (p0) |- (inter0);
\path[blockArrow] (inter0) -- (Inter);
\path[blockArrow,-] (Intra.south -| inter1) -- (Inter.north -| inter1);
\path[blockArrow,-] (Inter.south -| inter1) -- (inter1);
\path[blockArrow] (inter1) -| (VLC);
\node[processBlock, below=4 of VLC, text width=1.5cm] (VLCDec) {Entropy Decoder};
\node[processBlock, left=.6 of VLCDec, text width=1.5cm] (InvQuantDec) {$Q^{-1} + T^{-1}$};
\node[sumBlock, left=.6 of InvQuantDec] (ReconSumDec) {$+$};
\node[simpleBlock, inner sep=0.2cm, text width=1.2cm,node distance=2.5cm] (Output) at (Input |- VLCDec) {\textbf{Output video}} ;
\path[blockArrow] (VLCDec) -- (InvQuantDec);
\path[blockArrow] (InvQuantDec) -- (ReconSumDec);
\path[blockArrow] (ReconSumDec) -- (Output) node [pos=.3] (predPosition) {};
\node [point] at (p0 |- ReconSumDec) (outputPosition) {};
\node [below=1.8 of predPosition, coordinate] (z0) {};
\node [processBlock, left=1.5 of z0, text width=1cm] (RefBufferDec) {Frame Buffer};
\node [processBlock,text width=1.4cm, above=.25 of z0] (IntraDec) {Intra prediction};
\node [processBlock,text width=1.4cm, below=.25 of z0] (InterDec) {Inter prediction};
\path[blockArrow] (RefBufferDec.20) -- (IntraDec.180);
\path[blockArrow] (RefBufferDec.-20) -- (InterDec.180);
\node [point,right=.5 of IntraDec] (z1) {};
\node [point,right=.5 of InterDec] (z2) {};
\path[blockArrow,-] (IntraDec) -- (z1);
\path[blockArrow,-] (InterDec) -- (z2);
\node [coordinate,right of=z1,below of=z1,node distance=0.15cm] (w1) {};
\node [coordinate,right of=z2, above of=z2, node distance=0.15cm] (w2) {};
\path (z1) -- (z2) node [coordinate, midway] (w) {};
\path (w) -- (w -| ReconSumDec) node [point] (z) {};
\draw[-latex,densely dashed] (w1) to [bend right=60] (w2);
\draw [thick,blockArrow] (z1)+(-0.1,-0.1) -- (z);
\path[blockArrow] (z) -- node[pos=0.96,left] {-} (ReconSumDec);
\path[blockArrow] (outputPosition) |- (RefBufferDec);
\path (VLC) -- (VLCDec) node [coordinate, midway] (stopos) {};
\node [processBlock,text width=1.8cm, minimum height=1.2cm, right=1.5 of stopos] (Transmission) {Storage or Transmission};
\path[blockArrow] (VLC) -| (Transmission);
\path[blockArrow] (Transmission) |- (VLCDec);
\end{tikzpicture}