\usetikzlibrary{arrows,matrix} \usetikzlibrary{fit} \usetikzlibrary{intersections} \usetikzlibrary{intersections} % \usetkzobj{all} \pgfdeclarelayer{background} \pgfdeclarelayer{foreground} \pgfsetlayers{background,main,foreground} \def\scale{1} \begin{tikzpicture}[ font=\scriptsize, auto, node distance=1cm, scale=\scale, every node/.style={scale=\scale}, template/.style={thick, text centered}, block/.style={template, rectangle, text width=1.3cm, ,inner sep=3, minimum height=.6cm}, arrow/.style={template, draw, -latex}, point/.style={template, draw, fill=black, circle,inner sep=0, minimum size=3} ] % Define extra block styles \tikzstyle{sumBlock} = [template, draw, circle, inner sep=0cm, minimum size=0.3cm] \tikzstyle{refBlockNoDraw} = [block, fill=\TikZColorFill] \tikzstyle{refBlock} = [refBlockNoDraw, draw] \tikzstyle{propBlockNoDraw} = [block, fill=\TikZColorFillProp] \tikzstyle{propBlock} = [propBlockNoDraw,draw] \tikzstyle{MainArrow} = [arrow] \tikzstyle{SignallArrow} = [arrow, dashed] %% Encoder/Decoder \node [refBlock, text width=1.6cm, minimum height=1cm] (Encoder) at (0,0) {Reference \\ Encoder}; % \node [refBlockNoDraw, text width=2.6cm, minimum height=.6cm, above=-0.03 of Encoder.north west, anchor=south west] (Decoder) {Decoder}; % \path[arrow,-] (Encoder.south west) |- (Decoder.north east) |- (Encoder.south west); % \path[arrow,-,densely dotted] (Decoder.south west) -- (Decoder.south east); % Draw inside lines %% RPS \node [propBlockNoDraw, text width=2.6cm, minimum height=1cm, right=.3 of Encoder, yshift=1.3cm] (EXP) {Reference Selection \\ Transcoding}; \node [refBlockNoDraw, text width=2.6cm, above=-0.03 of EXP.north west, anchor=south west] (RPSDec) {Decoder}; \path[MainArrow,-] (EXP.south west) |- (RPSDec.north east) |- (EXP.south west); \path[MainArrow,-,densely dotted] (EXP.north west) -- (EXP.north east); % Draw inside lines \path[MainArrow] (Encoder -| EXP) node[point] {} -- (EXP); %% NALU Loss and EC optimisation \node [propBlock, above=.8 of RPSDec, text width=2.6cm, minimum height=2cm] (ConcOpt) {Loss simulation \\ \& \\ Saliency-weighted EC Optimisation}; \path[MainArrow] (RPSDec) -- (ConcOpt); \node [propBlock, right=of ConcOpt.north east, anchor=north west, text width=1.6cm] (Scalable0) {EL Encoder \\(20\%)}; \node [propBlock, right=of ConcOpt.south east, anchor=south west, text width=1.6cm] (Scalable1) {EL Encoder \\(10\%)}; \path[MainArrow] (ConcOpt.east |- Scalable0) -- (Scalable0); \path[MainArrow] (ConcOpt.east |- Scalable1) -- (Scalable1); % % %% EL encoder % \node [propBlockNoDraw, right=4cm of ConcOpt.south, anchor=south west, text width=1.4cm, minimum height=1cm] (Scalable) {EL\\Encoder}; % \node [refBlockNoDraw, text width=.2cm, right=-.025 of Scalable.south east, anchor=south west, text centered, minimum height=1cm] (ScalableNAL) {N\\[-2pt]A\\[-2pt]L}; % \DrawEdgesTwoNodes{Scalable}{ScalableNAL}; % Draw border % \path[arrow,-,densely dotted] (ScalableNAL.south west) -- (ScalableNAL.north west); % Draw inside lines % % % %% Diff % \node [sumBlock, left=.75 of Scalable] (ConcDiff) {$-$}; % \path[arrow] (ConcDiff) -- (Scalable) node[above, pos=0, xshift=.2cm] {$e^c$}; % \path[arrow] (ConcOpt.east |- ConcDiff) -- (ConcDiff) node[above, pos=1, xshift=-.3cm] {$\tilde f$}; % \path[arrow,-, shorten >=3] (p2) -- (p2 -| LossSim.north); % \path[arrow, shorten <=3] (p2 -| LossSim.north) -| (ConcDiff) node[right, pos=1, yshift=-.3cm] {$\hat f$}; % % % %% EC mode coding % \node [propBlockNoDraw, anchor=north west, text width=1.4cm, minimum height=1cm] at (ConcOpt.north -| Scalable.west) (Signalling) {EC Mode Coding}; % \node [refBlockNoDraw, text width=.2cm, right=-.025 of Signalling.south east, anchor=south west, text centered, minimum height=1cm] (SignallingNAL) {N\\[-2pt]A\\[-2pt]L}; % \DrawEdgesTwoNodes{Signalling}{SignallingNAL}; % Draw border % \path[arrow,-,densely dotted] (SignallingNAL.south west) -- (SignallingNAL.north west); % Draw inside lines % \path[arrow] (ConcOpt.east |- Signalling) -- (Signalling) node[above, pos=.45, yshift=-1] {\scriptsize M1...M4}; % \node [propBlock, minimum height=.8cm, text width=2cm, right=2 of Encoder, yshift=-1cm] (StreamParser) {Stream Parser}; \path[MainArrow] (Encoder -| StreamParser) node[point] {} -- (StreamParser); \node [propBlock, minimum height=.8cm, text width=2cm, below=.3 of StreamParser] (VideoParser) {Video analyser}; %% Input % \begin{scope}[xshift=-2.5cm, yshift=4cm] % \def\spacing{.2} % \coordinate(Input) at (0.5,0.3); % \foreach \i in {0,...,3} % \draw[thick,fill=\TikZColorFill] (\spacing*\i,-.15*\i) rectangle ++(1,1); % % \node[text width=.7cm, text centered] at (1.6,1.1) {Video Stream}; % \node[text width=.7cm, text centered] at (1.1,.1) {Input video}; % \end{scope} % \path[MainArrow, shorten <=.9cm] (Input) |- (Encoder); % \path[MainArrow] (Input |- EXP) node[point] {} |- (EXP); % \path[MainArrow, shorten <=1.2cm] (Input.east |- ConcOpt) -- (ConcOpt); \node[text width=.7cm, text centered] (Input) at (-2,4.3) {Input video}; \path[MainArrow] (Input |- Encoder) node[point] {} |- (VideoParser); \path[MainArrow] (Input) |- (Encoder); \path[MainArrow] (Input |- EXP) node[point] {} |- (EXP); \path[MainArrow] (Input.east |- ConcOpt) -- (ConcOpt); % % %% TS Mux and output \path (Encoder.south) -- (Encoder |- ConcOpt.north) node[midway] (middleRef) {}; % Find middle ref \node [propBlock, right=9 of middleRef, text width=5.5cm, rotate=-90, anchor=center, minimum height=1.1cm] (Mux) {Error robustness optimisation}; \node [right of=Mux, node distance=2.8cm, coordinate] (Out) {}; \tikzstyle{OutputLabels} = [pos=1, anchor=south east, text width=2cm, align=right] \path[MainArrow] (Encoder) -- (Mux.south |- Encoder) node[OutputLabels] {{S1}}; \path[MainArrow] (EXP) -- (Mux.south |- EXP) node[OutputLabels] {{S2}}; \path[MainArrow] (Scalable1) -- (Mux.south |- Scalable1) node[OutputLabels] {{S3}}; \path[MainArrow] (Scalable0) -- (Mux.south |- Scalable0) node[OutputLabels] {{S4}}; \path[MainArrow] (Mux) -- (Out) node[above, midway, text width=2cm, text centered] {Optimal \\ Robust Steam}; \node [text centered, text width=1.5cm, minimum height=1cm, below=.3 of Mux.east, xshift=1.9cm] (Channel) {Channel Conditions}; % \path[SignallArrow] (StreamParser.9) -| (Mux.-12); % \path[SignallArrow] (StreamParser.0) -| (Mux.-8); % \path[SignallArrow] (StreamParser.-9) -| (Mux.-4); % \path[SignallArrow] (VideoParser.7) -| (Mux.2); % \path[SignallArrow] (VideoParser.-7) -| (Mux.6); % \path[SignallArrow] (Channel) -| (Mux.12); \path[SignallArrow] (StreamParser) -| (Mux.-6) node (b1) [pos=.3, anchor=center] {\footnotesize /} node[right=-.2 of b1, yshift=-6, inner sep=0] {\footnotesize 3}; \path[SignallArrow] (VideoParser) -| (Mux.0) node (b2) at( b1 |- VideoParser) [anchor=center] {\footnotesize /} node[right=-.2 of b2, yshift=-6, inner sep=0] {\footnotesize 2}; \path[SignallArrow] (Channel) -| (Mux.6); % \node at ($ (ah) - (0.55, 0) $) {\scriptsize /}; \end{tikzpicture}