\usetikzlibrary{arrows,matrix} % \usepackage{amssymb, amsmath, mathptmx} \begin{tikzpicture}[font=\scriptsize,node distance=1.1cm,scale=.7] \tikzstyle{simpleBlock}=[inner sep=0.1cm, minimum size=.9cm,text centered, minimum width=1cm, text width=1.2cm,scale=.9] \tikzstyle{processBlock}=[simpleBlock, fill=TikZColorFill, 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] \node[sumBlock] (ResidueDiff) at (0,0) {$+$}; \node[processBlock, left=.95 of ResidueDiff, text width=2.1cm] (PreProc) {Pre-processing}; \node[simpleBlock, inner sep=0.2cm, left=.5 of PreProc,text width=1cm,node distance=2.8cm] (Input) {\textbf{Input video}}; \path[blockArrow] (Input) -- (PreProc); \path[blockArrow] (PreProc) -- (ResidueDiff) node [point, midway] (p0) {}; \node[processBlock,right=2.8 of ResidueDiff, text width=1.2cm] (Transf) {$T+Q$}; % \node[processBlock,right=of Transf, text width=.7cm] (Quant) {$Q$}; \node[processBlock,right=6.4 of ResidueDiff, 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=.6 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=.6 of InvQuant] (ReconResidue) {$+$}; \node[processBlock, left=.8 of ReconResidue,text width=1cm, yshift=-.6cm] (RefBuffer) {Frame Buffer}; \path[blockArrow] (QuantFrame) -- (InvQuant); % \path[blockArrow] (InvQuant) -- (InvTransf); \path[blockArrow] (InvQuant) -- (ReconResidue); \path[blockArrow] (ReconResidue) |- (RefBuffer); \node[below=.5 of Transf, coordinate,xshift=-.7cm] (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 -| ResidueDiff) 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[draw,dashed,inner sep=5pt, fit=(p0) (inter1) (VLC)] (Encoder) {}; \node[simpleBlock, above=-.3 of Encoder] {Encoding}; \node[processBlock, below=5 of VLC, text width=1.5cm] (VLCDec) {Entropy Decoder}; \node[processBlock, left=.4 of VLCDec, text width=1.5cm] (InvQuantDec) {$Q^{-1} + T^{-1}$}; \node[sumBlock, left=.4 of InvQuantDec] (ReconSumDec) {$+$}; \node[processBlock, text width=2.1cm] at(PreProc |- InvQuantDec) (PostProc) {Post-processing}; \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) -- (PostProc) node [pos=.3] (predPosition) {}; \path[blockArrow] (PostProc) -- (Output); \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) -- (ReconSumDec); \path[blockArrow] (outputPosition) |- (RefBufferDec); \path (VLC) -- (VLCDec) node [coordinate, midway] (stopos) {}; \node [processBlock,text width=1.8cm, minimum height=1.2cm, right=1.1 of stopos] (Transmission) {Storage or Transmission}; \path[blockArrow] (VLC) -| (Transmission); \path[blockArrow] (Transmission) |- (VLCDec); \node[draw,dashed,inner sep=5pt, outer sep=0, fit=(outputPosition) (InterDec) (VLCDec)] (Decoder) {}; \node[simpleBlock, above=-.3 of Decoder] {Decoding}; \end{tikzpicture}