\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}{0.4} \begin{tikzpicture}[scale=\scale,every node/.style={scale=\scale},on grid ] \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=1.8, 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); % %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 \end{tikzpicture}