Skip to content

Commit a8567cc

Browse files
author
Pratchaya Khansomboon
committed
cs: Add video codec notes
1 parent 107695e commit a8567cc

File tree

2 files changed

+231
-2
lines changed

2 files changed

+231
-2
lines changed

cs/vcodec.tex

+228
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
\documentclass[11pt]{article}
2+
\usepackage[utf8]{inputenc}
3+
\usepackage[T1]{fontenc} % Fix weird character
4+
\usepackage{geometry}
5+
\usepackage{amsmath}
6+
\usepackage{amssymb}
7+
\usepackage{gensymb}
8+
\usepackage{spalign}
9+
\usepackage{xfrac}
10+
\usepackage{parskip}
11+
\usepackage{float} % figure[H]
12+
\usepackage[english]{babel}
13+
\usepackage[style=ieee,backend=biber,urldate=iso,date=iso]{biblatex}
14+
\usepackage[breaklinks=true,bookmarks=true,hidelinks]{hyperref}
15+
\usepackage{tikz}
16+
\usepackage{pgfplots}
17+
\usepackage{circuitikz}
18+
\usepackage{subcaption}
19+
\usepackage[yyyymmdd]{datetime}
20+
\usepackage{url}
21+
\usetikzlibrary {arrows.meta}
22+
\pgfplotsset{compat=newest,compat/show suggested version=false}
23+
24+
% Custom shape
25+
\makeatletter
26+
\pgfdeclareshape{dflowpass}{
27+
\inheritsavedanchors[from=rectangle]
28+
\inheritanchorborder[from=rectangle]
29+
\inheritanchor[from=rectangle]{center}
30+
\anchor{left}{\pgfpoint{-0.5cm}{0cm}}
31+
\anchor{right}{\pgfpoint{0.5cm}{0cm}}
32+
% Add more custom anchors if needed
33+
\backgroundpath{
34+
% Draw the switch shape (rectangle with diagonal lines)
35+
\pgfsetlinewidth{0.85pt}
36+
\pgfpathrectanglecorners{\pgfpoint{-0.5cm}{-0.5cm}}{\pgfpoint{0.5cm}{0.5cm}}
37+
\pgfpathmoveto{\pgfpoint{-0.35cm}{0.125cm}}
38+
\pgfpathlineto{\pgfpoint{0.15cm}{0.125cm}}
39+
\pgfpathlineto{\pgfpoint{0.35cm}{-0.2cm}}
40+
\pgfusepath{draw}
41+
}
42+
}
43+
\pgfdeclareshape{dfhighpass}{
44+
\inheritsavedanchors[from=rectangle]
45+
\inheritanchorborder[from=rectangle]
46+
\inheritanchor[from=rectangle]{center}
47+
\anchor{left}{\pgfpoint{-0.5cm}{0cm}}
48+
\anchor{right}{\pgfpoint{0.5cm}{0cm}}
49+
\backgroundpath{
50+
% Draw the switch shape (rectangle with diagonal lines)
51+
\pgfsetlinewidth{1pt}
52+
\pgfpathrectanglecorners{\pgfpoint{-0.5cm}{-0.5cm}}{\pgfpoint{0.5cm}{0.5cm}}
53+
\pgfpathmoveto{\pgfpoint{0.35cm}{0.125cm}}
54+
\pgfpathlineto{\pgfpoint{-0.15cm}{0.125cm}}
55+
\pgfpathlineto{\pgfpoint{-0.35cm}{-0.2cm}}
56+
\pgfusepath{draw}
57+
}
58+
}
59+
\pgfdeclareshape{dfbandpass}{
60+
\inheritsavedanchors[from=rectangle]
61+
\inheritanchorborder[from=rectangle]
62+
\inheritanchor[from=rectangle]{center}
63+
\anchor{left}{\pgfpoint{-0.5cm}{0cm}}
64+
\anchor{right}{\pgfpoint{0.5cm}{0cm}}
65+
\backgroundpath{
66+
% Draw the switch shape (rectangle with diagonal lines)
67+
\pgfsetlinewidth{1pt}
68+
\pgfpathrectanglecorners{\pgfpoint{-0.5cm}{-0.5cm}}{\pgfpoint{0.5cm}{0.5cm}}
69+
\pgfpathmoveto{\pgfpoint{-0.35cm}{-0.2cm}}
70+
\pgfpathlineto{\pgfpoint{-0.20cm}{0.125cm}}
71+
\pgfpathlineto{\pgfpoint{0.15cm}{0.125cm}}
72+
\pgfpathlineto{\pgfpoint{0.35cm}{-0.2cm}}
73+
\pgfusepath{draw}
74+
}
75+
}
76+
\pgfdeclareshape{quantizer}{
77+
\inheritsavedanchors[from=rectangle]
78+
\inheritanchorborder[from=rectangle]
79+
\inheritanchor[from=rectangle]{center}
80+
\anchor{left}{\pgfpoint{-0.5cm}{0cm}}
81+
\anchor{right}{\pgfpoint{0.5cm}{0cm}}
82+
\backgroundpath{
83+
% Draw the switch shape (rectangle with diagonal lines)
84+
\pgfsetlinewidth{0.8pt}
85+
\pgfpathrectanglecorners{\pgfpoint{-0.5cm}{-0.5cm}}{\pgfpoint{0.5cm}{0.5cm}}
86+
\pgfpathmoveto{\pgfpoint{-0.25cm}{-0.25cm}}
87+
\pgfpathlineto{\pgfpoint{0cm}{-0.25cm}}
88+
\pgfpathlineto{\pgfpoint{0cm}{0.25cm}}
89+
\pgfpathlineto{\pgfpoint{0.25cm}{0.25cm}}
90+
\pgfusepath{draw}
91+
}
92+
}
93+
\pgfdeclareshape{quantamp}{
94+
\inheritsavedanchors[from=op amp]
95+
\inheritanchorborder[from=op amp]
96+
\inheritanchor[from=op amp]{center}
97+
\inheritanchor[from=op amp]{+}
98+
\inheritanchor[from=op amp]{-}
99+
\inheritanchor[from=op amp]{out}
100+
\inheritanchor[from=op amp]{up}
101+
\inheritanchor[from=op amp]{down}
102+
\backgroundpath{
103+
\pgfsetlinewidth{0.8pt}
104+
\pgfpathmoveto{\pgfpoint{-0.5cm}{0.55cm}}
105+
\pgfpathlineto{\pgfpoint{0.5cm}{0}}
106+
\pgfpathlineto{\pgfpoint{-0.5cm}{-0.55cm}}
107+
\pgfpathclose
108+
\pgfpathmoveto{\pgfpoint{-0.35cm}{-0.2cm}}
109+
\pgfpathlineto{\pgfpoint{-0.2cm}{-0.2cm}}
110+
\pgfpathlineto{\pgfpoint{-0.2cm}{0.2cm}}
111+
\pgfpathlineto{\pgfpoint{-0.05cm}{0.2cm}}
112+
\pgfusepath{draw}
113+
}
114+
}
115+
\pgfdeclareshape{decimation}{
116+
\inheritsavedanchors[from=rectangle]
117+
\inheritanchorborder[from=rectangle]
118+
\inheritanchor[from=rectangle]{center}
119+
\anchor{left}{\pgfpoint{-0.5cm}{0.0cm}}
120+
\anchor{right}{\pgfpoint{0.5cm}{0.0cm}}
121+
\anchor{top}{\pgfpoint{0.0cm}{0.5cm}}
122+
\anchor{bot}{\pgfpoint{0.0cm}{-0.5cm}}
123+
\backgroundpath{
124+
\pgfsetlinewidth{0.8pt}
125+
\pgfpathrectanglecorners{\pgfpoint{-0.5cm}{-0.5cm}}{\pgfpoint{0.5cm}{0.5cm}}
126+
\pgfpathmoveto{\pgfpoint{-0.25cm}{0.25cm}}
127+
\pgfpathlineto{\pgfpoint{-0.25cm}{-0.25cm}}
128+
\pgfpathmoveto{\pgfpoint{-0.30cm}{-0.185cm}}
129+
\pgfpathlineto{\pgfpoint{-0.25cm}{-0.25cm}}
130+
\pgfpathlineto{\pgfpoint{-0.20cm}{-0.185cm}}
131+
\pgfusepath{draw}
132+
}
133+
}
134+
\makeatother
135+
136+
\geometry{
137+
a4paper,
138+
hmargin=2.54cm,
139+
tmargin=1.27cm,
140+
bmargin=1.27cm,
141+
includeheadfoot
142+
}
143+
\setcounter{secnumdepth}{0} % Disable section numbering
144+
145+
\begin{filecontents}{vcodec.bib}
146+
@misc{wiki:mjpeg,
147+
author = "{Wikipedia contributors}",
148+
title = "Motion JPEG --- {Wikipedia}{,} The Free Encyclopedia",
149+
year = "2024",
150+
howpublished = "\url{https://en.wikipedia.org/w/index.php?title=Motion_JPEG&oldid=1259055254}",
151+
note = "[Online; accessed 20-December-2024]"
152+
}
153+
@misc{wiki:prores,
154+
author = "{Wikipedia contributors}",
155+
title = "Apple ProRes --- {Wikipedia}{,} The Free Encyclopedia",
156+
year = "2024",
157+
howpublished = "\url{https://en.wikipedia.org/w/index.php?title=Apple_ProRes&oldid=1248322314}",
158+
note = "[Online; accessed 20-December-2024]"
159+
}
160+
@misc{wiki:h264,
161+
author = "{Wikipedia contributors}",
162+
title = "Advanced Video Coding --- {Wikipedia}{,} The Free Encyclopedia",
163+
year = "2024",
164+
howpublished = "\url{https://en.wikipedia.org/w/index.php?title=Advanced_Video_Coding&oldid=1251662394}",
165+
note = "[Online; accessed 20-December-2024]"
166+
}
167+
@misc{wiki:h265,
168+
author = "{Wikipedia contributors}",
169+
title = "High Efficiency Video Coding --- {Wikipedia}{,} The Free Encyclopedia",
170+
year = "2024",
171+
howpublished = "\url{https://en.wikipedia.org/w/index.php?title=High_Efficiency_Video_Coding&oldid=1258600452}",
172+
note = "[Online; accessed 20-December-2024]"
173+
}
174+
@misc{wiki:av1,
175+
author = "{Wikipedia contributors}",
176+
title = "AV1 --- {Wikipedia}{,} The Free Encyclopedia",
177+
year = "2024",
178+
howpublished = "\url{https://en.wikipedia.org/w/index.php?title=AV1&oldid=1261928987}",
179+
note = "[Online; accessed 20-December-2024]"
180+
}
181+
@misc{av1:tech,
182+
title={A Technical Overview of AV1},
183+
author={Jingning Han and Bohan Li and Debargha Mukherjee and Ching-Han Chiang and Adrian Grange and Cheng Chen and Hui Su and Sarah Parker and Sai Deng and Urvang Joshi and Yue Chen and Yunqing Wang and Paul Wilkins and Yaowu Xu and James Bankoski},
184+
year={2021},
185+
eprint={2008.06091},
186+
archivePrefix={arXiv},
187+
primaryClass={eess.IV},
188+
url={https://arxiv.org/abs/2008.06091},
189+
}
190+
\end{filecontents}
191+
\addbibresource{vcodec.bib}
192+
193+
\begin{document}
194+
\section{Video Codec}
195+
196+
\begin{itemize}
197+
\item Motion JPEG (MJPEG)\cite{wiki:mjpeg}
198+
\item Apple ProRes\cite{wiki:prores}
199+
\item AVC (Advanced Video Coding) H.264\cite{wiki:h264}
200+
\item HEVC (High Efficiency Video Coding) H.265\cite{wiki:h265}
201+
\item AV1 (AOMedia Video 1)\cite{wiki:av1}
202+
\end{itemize}
203+
204+
With the slowdown in the growth of general CPU clock frequency and power
205+
constraints on mobile devices in particular, next generation video compression
206+
codecs are expected to rely heavily on dedicated hardware decoders. Therefore
207+
during the AV1 development process, all the coding tools were carefully reviewed
208+
for hardware considerations (e.g., latency, silicon area, etc.), which resulted
209+
in a codec design well balanced for compression performance and hardware
210+
feasibility.
211+
212+
The AV1 codec supports input video signals in the 4:0:0 (monochrome), 4:2:0,
213+
4:2:2, and 4:4:4 formats. The allowed pixel representations are 8-, 10-, and
214+
12-bit.
215+
216+
An adaptive interpolation filter scheme is used in VP9, where an inter-coded
217+
block in VP9 can choose from three 8-tap interpolation filters that correspond
218+
to different cutoff frequencies in a Hamming window in the frequency domain.
219+
220+
Each direction can choose from 3 finite impulse response (FIR) filters, namely
221+
SMOOTH, REGULAR, and SHARP in ascending order of cutoff frequencies.
222+
223+
The SHARP filter continues to use an 8-tap FIR design to mitigate the ripple
224+
effect near the cutoff frequency.\cite{av1:tech}
225+
226+
\newpage
227+
\printbibliography
228+
\end{document}

deploy.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ EOF
4141
generate_file_index() {
4242
# Add files
4343
printf "" > $registry_path
44-
find ./maths | grep .tex >> $registry_path
44+
find ./cs | grep .tex >> $registry_path
4545
find ./dsp | grep .tex >> $registry_path
4646
find ./ee | grep .tex >> $registry_path
47+
find ./maths | grep .tex >> $registry_path
4748
find ./misc | grep .tex >> $registry_path
4849

4950
# Filter out dependencies from registry database
@@ -117,7 +118,7 @@ parse_args() {
117118
prebuild() {
118119
# clean
119120
if [[ $is_clean = true ]] && [[ -e "$build_dir" ]]; then
120-
rm -rf $build_dir
121+
rm -rf $build_dir
121122
fi
122123
if [[ $is_clean = true ]] && [[ $is_production = true ]] && [[ -e "$dist_dir/pdf" ]]; then
123124
rm -rf "$dist_dir/pdf"

0 commit comments

Comments
 (0)