110 lines
3.5 KiB
Plaintext
110 lines
3.5 KiB
Plaintext
\usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,%
|
|
decorations.pathreplacing,decorations.pathmorphing,shapes,%
|
|
matrix,shapes.symbols,plotmarks,decorations.markings,shadows,backgrounds}
|
|
|
|
|
|
\pgfdeclarelayer{background}
|
|
\pgfdeclarelayer{foreground}
|
|
\pgfdeclarelayer{L0}
|
|
\pgfdeclarelayer{L1}
|
|
\pgfdeclarelayer{L2}
|
|
\pgfdeclarelayer{L3}
|
|
\pgfsetlayers{background,L0,L1,L2,L3,main,foreground}
|
|
|
|
\newcommand{\scale}{1}
|
|
|
|
\begin{tikzpicture}[scale=\scale,on grid, ->,>=stealth']
|
|
|
|
\begin{scope}[scale=0.4]
|
|
|
|
\definecolor{LCUFill}{rgb}{0,0.5,1}
|
|
\definecolor{DrawColor}{rgb}{0,0,0.5}
|
|
\definecolor{LCUFill}{rgb}{1,1,1}
|
|
\definecolor{DrawColor}{rgb}{0,0,0}
|
|
|
|
\tikzstyle{TextStyle}=[scale=.75,text centered]
|
|
|
|
\tikzstyle{CTU}=[draw=DrawColor, fill=LCUFill, very thick]
|
|
\tikzstyle{CU}=[draw=DrawColor, thin]
|
|
\tikzstyle{PU}=[draw=DrawColor, thin, densely dashed]
|
|
|
|
\node[TextStyle] at (8,16.5) {$64\times64$ - CTU};
|
|
\draw[CTU] (0,0) rectangle ++(16,16); % 64x64
|
|
|
|
%% 32x32
|
|
\draw[CU] (0,0) rectangle ++(8,8); % 32x32
|
|
\draw[CU] (8,8) rectangle ++(8,8); % 32x32
|
|
|
|
%% Q1
|
|
\draw[CU] (0,8) rectangle ++(4,4); % 16x16
|
|
\draw[CU] (4,12) rectangle ++(4,4); % 16x16
|
|
\draw[CU] (4,12) rectangle ++(2,2); % 8x8
|
|
\draw[CU] (6,14) rectangle ++(2,2); % 8x8
|
|
|
|
%% Q3
|
|
\draw[CU] (0,0) rectangle ++(4,4); % 16x16
|
|
\draw[CU] (4,4) rectangle ++(4,4); % 16x16
|
|
\draw[CU] (4,4) rectangle ++(2,2); % 8x8
|
|
\draw[CU] (6,6) rectangle ++(2,2); % 8x8
|
|
|
|
\draw[PU] (4,4) rectangle ++(1,1); % 4x4
|
|
\draw[PU] (5,5) rectangle ++(1,1); % 4x4
|
|
|
|
\node[TextStyle] at (12,12) {$32\times32$};
|
|
\node[TextStyle] at (2,14) {$16\times16$};
|
|
\node[TextStyle] at (5,13) {$8\times8$};
|
|
|
|
\node[TextStyle] (CULabel) at (9.5,6) {CU};
|
|
\draw[black, -latex] (CULabel) to (7,7);
|
|
|
|
\node[TextStyle] (PULabel) at (2.5,5.5) {PU};
|
|
\draw[black, -latex] (PULabel) to (4.5,4.5);
|
|
\end{scope}
|
|
|
|
% %H.264
|
|
% \node[TextStyle] (PULabel) at (10.5,4.5) {\textcolor{red}{MB}};
|
|
% \draw[black, -latex] (PULabel) to (13,3);
|
|
% \draw[CU, draw=red] (12,0) rectangle ++(4,4); % 16x16
|
|
% \draw[CU, draw=red] (14,0) rectangle ++(2,2); % 8x8
|
|
% \draw[CU, draw=red] (12,2) rectangle ++(2,2); % 8x8
|
|
% \draw[CU, draw=red] (15,0) rectangle ++(1,1); % 4x4
|
|
% \draw[CU, draw=red] (14,1) rectangle ++(1,1); % 4x4
|
|
|
|
\tikzset{
|
|
level 1/.style={level distance = 1.6cm, sibling distance=1.6cm},
|
|
level 2/.style={level distance = 1.6cm, sibling distance=.7cm},
|
|
level 3/.style={level distance = 1.6cm, sibling distance=.55cm},
|
|
treenode/.style = {align=center, inner sep=0pt, text centered, font=\sffamily},
|
|
node_split/.style = {treenode, circle,inner sep=1pt, white, font=\sffamily\bfseries, draw=black, fill=black},
|
|
node_cu/.style = {treenode, circle, draw, thick, font=\sffamily\bfseries\scriptsize, text width=.95em}
|
|
}
|
|
|
|
\node [node_split,scale=1/\scale] at (11cm,15*.4cm) {}
|
|
child{ node [node_split] {}
|
|
child{ node [node_cu] {1} }
|
|
child{ node [node_split] {}
|
|
child{ node [node_cu] {2} }
|
|
child{ node [node_cu] {3} }
|
|
child{ node [node_cu] {4} }
|
|
child{ node [node_cu] {5} }
|
|
}
|
|
child{ node [node_cu] {5} }
|
|
child{ node [node_cu] {6} }
|
|
}
|
|
child{ node [node_cu] {7} }
|
|
child{ node [node_split] {}
|
|
child{ node [node_cu] {8} }
|
|
child{ node [node_split] {}
|
|
child{ node [node_cu] {9} }
|
|
child{ node [node_cu] {10} }
|
|
child{ node [node_cu] {11} }
|
|
child{ node [node_cu] {12} }
|
|
}
|
|
child{ node [node_cu] {13} }
|
|
child{ node [node_cu] {14} }
|
|
}
|
|
child{ node [node_cu] {15} }
|
|
;
|
|
|
|
\end{tikzpicture}
|