<s>
H.262	B-Algorithm
or	O
MPEG-2	B-Algorithm
Part	I-Algorithm
2	I-Algorithm
(	O
formally	O
known	O
as	O
ITU-T	O
Recommendation	O
H.262	B-Algorithm
and	O
ISO/IEC	B-Algorithm
13818-2	I-Algorithm
,	O
also	O
known	O
as	O
MPEG-2	B-Algorithm
Video	I-Algorithm
)	O
is	O
a	O
video	B-Algorithm
coding	I-Algorithm
format	I-Algorithm
standardised	O
and	O
jointly	O
maintained	O
by	O
ITU-T	O
Study	O
Group	O
16	O
Video	B-Application
Coding	I-Application
Experts	I-Application
Group	I-Application
(	O
VCEG	B-Application
)	O
and	O
ISO/IEC	O
Moving	O
Picture	O
Experts	O
Group	O
(	O
MPEG	O
)	O
,	O
and	O
developed	O
with	O
the	O
involvement	O
of	O
many	O
companies	O
.	O
</s>
<s>
It	O
is	O
the	O
second	O
part	O
of	O
the	O
ISO/IEC	O
MPEG-2	B-Algorithm
standard	O
.	O
</s>
<s>
The	O
ITU-T	O
Recommendation	O
H.262	B-Algorithm
and	O
ISO/IEC	B-Algorithm
13818-2	I-Algorithm
documents	O
are	O
identical	O
.	O
</s>
<s>
MPEG-2	B-Algorithm
Video	I-Algorithm
is	O
very	O
similar	O
to	O
MPEG-1	B-Algorithm
,	O
but	O
also	O
provides	O
support	O
for	O
interlaced	O
video	O
(	O
an	O
encoding	O
technique	O
used	O
in	O
analog	O
NTSC	O
,	O
PAL	O
and	O
SECAM	O
television	O
systems	O
)	O
.	O
</s>
<s>
MPEG-2	B-Algorithm
video	I-Algorithm
is	O
not	O
optimized	O
for	O
low	O
bit-rates	O
(	O
e.g.	O
,	O
less	O
than	O
1	O
Mbit/s	O
)	O
,	O
but	O
somewhat	O
outperforms	O
MPEG-1	B-Algorithm
at	O
higher	O
bit	O
rates	O
(	O
e.g.	O
,	O
3	O
Mbit/s	O
and	O
above	O
)	O
,	O
although	O
not	O
by	O
a	O
large	O
margin	O
unless	O
the	O
video	O
is	O
interlaced	O
.	O
</s>
<s>
All	O
standards-conforming	O
MPEG-2	B-Algorithm
Video	I-Algorithm
decoders	O
are	O
also	O
fully	O
capable	O
of	O
playing	O
back	O
MPEG-1	B-Algorithm
Video	O
streams	O
.	O
</s>
<s>
Hyundai	O
Electronics	O
(	O
now	O
SK	O
Hynix	O
)	O
developed	O
the	O
first	O
MPEG-2	B-Algorithm
SAVI	O
(	O
System/Audio/Video	O
)	O
decoder	O
in	O
1995	O
.	O
</s>
<s>
An	O
HDTV	B-Device
camera	O
with	O
8-bit	O
sampling	O
generates	O
a	O
raw	O
video	O
stream	O
of	O
25×1920×1080×3	O
=	O
155,520,000	O
bytes	O
per	O
second	O
for	O
25frame-per-second	O
video	O
(	O
using	O
the	O
4:4:4	O
sampling	O
format	O
)	O
.	O
</s>
<s>
If	O
the	O
video	O
is	O
not	O
interlaced	O
,	O
then	O
it	O
is	O
called	O
progressive	B-Device
scan	I-Device
video	O
and	O
each	O
picture	O
is	O
a	O
complete	O
frame	O
.	O
</s>
<s>
MPEG-2	B-Algorithm
supports	O
both	O
options	O
.	O
</s>
<s>
Each	O
picture	B-Algorithm
element	I-Algorithm
(	O
a	O
pixel	B-Algorithm
)	O
is	O
then	O
represented	O
by	O
one	O
luma	O
number	O
and	O
two	O
chroma	O
numbers	O
.	O
</s>
<s>
These	O
describe	O
the	O
brightness	O
and	O
the	O
color	O
of	O
the	O
pixel	B-Algorithm
(	O
see	O
YCbCr	O
)	O
.	O
</s>
<s>
Another	O
common	O
practice	O
to	O
reduce	O
the	O
amount	O
of	O
data	O
to	O
be	O
processed	O
is	O
to	O
subsample	O
the	O
two	O
chroma	O
planes	O
(	O
after	O
low-pass	B-Algorithm
filtering	I-Algorithm
to	O
avoid	O
aliasing	B-Error_Name
)	O
.	O
</s>
<s>
The	O
MPEG-2	B-Algorithm
Video	I-Algorithm
document	O
considers	O
all	O
three	O
sampling	O
types	O
,	O
although	O
4:2:0	O
is	O
by	O
far	O
the	O
most	O
common	O
for	O
consumer	O
video	O
,	O
and	O
there	O
are	O
no	O
defined	O
"	O
profiles	O
"	O
of	O
MPEG-2	B-Algorithm
for	O
4:4:4	O
video	O
(	O
see	O
below	O
for	O
further	O
discussion	O
of	O
profiles	O
)	O
.	O
</s>
<s>
While	O
the	O
discussion	O
below	O
in	O
this	O
section	O
generally	O
describes	O
MPEG-2	B-Algorithm
video	I-Algorithm
compression	O
,	O
there	O
are	O
many	O
details	O
that	O
are	O
not	O
discussed	O
,	O
including	O
details	O
involving	O
fields	O
,	O
chrominance	O
formats	O
,	O
responses	O
to	O
scene	O
changes	O
,	O
special	O
codes	O
that	O
label	O
the	O
parts	O
of	O
the	O
bitstream	O
,	O
and	O
other	O
pieces	O
of	O
information	O
.	O
</s>
<s>
Aside	O
from	O
features	O
for	O
handling	O
fields	O
for	O
interlaced	O
coding	O
,	O
MPEG-2	B-Algorithm
Video	I-Algorithm
is	O
very	O
similar	O
to	O
MPEG-1	B-Algorithm
Video	O
(	O
and	O
even	O
quite	O
similar	O
to	O
the	O
earlier	O
H.261	B-Algorithm
standard	I-Algorithm
)	O
,	O
so	O
the	O
entire	O
description	O
below	O
applies	O
equally	O
well	O
to	O
MPEG-1	B-Algorithm
.	O
</s>
<s>
MPEG-2	B-Algorithm
includes	O
three	O
basic	O
types	O
of	O
coded	O
frames	O
:	O
intra-coded	O
frames	O
(	O
I-frames	B-General_Concept
)	O
,	O
predictive-coded	O
frames	O
(	O
P-frames	O
)	O
,	O
and	O
bidirectionally-predictive-coded	O
frames	O
(	O
B-frames	B-General_Concept
)	O
.	O
</s>
<s>
An	O
I-frame	B-General_Concept
is	O
a	O
separately-compressed	O
version	O
of	O
a	O
single	O
uncompressed	O
(	O
raw	O
)	O
frame	O
.	O
</s>
<s>
The	O
coding	O
of	O
an	O
I-frame	B-General_Concept
takes	O
advantage	O
of	O
spatial	O
redundancy	O
and	O
of	O
the	O
inability	O
of	O
the	O
eye	O
to	O
detect	O
certain	O
changes	O
in	O
the	O
image	O
.	O
</s>
<s>
Unlike	O
P-frames	O
and	O
B-frames	B-General_Concept
,	O
I-frames	B-General_Concept
do	O
not	O
depend	O
on	O
data	O
in	O
the	O
preceding	O
or	O
the	O
following	O
frames	O
,	O
and	O
so	O
their	O
coding	O
is	O
very	O
similar	O
to	O
how	O
a	O
still	O
photograph	O
would	O
be	O
coded	O
(	O
roughly	O
similar	O
to	O
JPEG	O
picture	O
coding	O
)	O
.	O
</s>
<s>
Briefly	O
,	O
the	O
raw	O
frame	O
is	O
divided	O
into	O
8	O
pixel	B-Algorithm
by	O
8	O
pixel	B-Algorithm
blocks	O
.	O
</s>
<s>
The	O
data	O
in	O
each	O
block	O
is	O
transformed	O
by	O
the	O
discrete	B-General_Concept
cosine	I-General_Concept
transform	I-General_Concept
(	O
DCT	B-General_Concept
)	O
.	O
</s>
<s>
The	O
transform	O
converts	O
spatial	O
variations	O
into	O
frequency	O
variations	O
,	O
but	O
it	O
does	O
not	O
change	O
the	O
information	O
in	O
the	O
block	O
;	O
if	O
the	O
transform	O
is	O
computed	O
with	O
perfect	O
precision	O
,	O
the	O
original	O
block	O
can	O
be	O
recreated	O
exactly	O
by	O
applying	O
the	O
inverse	B-General_Concept
cosine	I-General_Concept
transform	I-General_Concept
(	O
also	O
with	O
perfect	O
precision	O
)	O
.	O
</s>
<s>
The	O
conversion	O
from	O
8-bit	O
integers	O
to	O
real-valued	O
transform	O
coefficients	O
actually	O
expands	O
the	O
amount	O
of	O
data	O
used	O
at	O
this	O
stage	O
of	O
the	O
processing	O
,	O
but	O
the	O
advantage	O
of	O
the	O
transformation	O
is	O
that	O
the	O
image	O
data	O
can	O
then	O
be	O
approximated	O
by	O
quantizing	B-Algorithm
the	O
coefficients	O
.	O
</s>
<s>
Many	O
of	O
the	O
transform	O
coefficients	O
,	O
usually	O
the	O
higher	O
frequency	O
components	O
,	O
will	O
be	O
zero	O
after	O
the	O
quantization	B-Algorithm
,	O
which	O
is	O
basically	O
a	O
rounding	O
operation	O
.	O
</s>
<s>
The	O
quantization	B-Algorithm
may	O
either	O
be	O
coarse	O
or	O
fine	O
,	O
as	O
selected	O
by	O
the	O
encoder	O
.	O
</s>
<s>
If	O
the	O
quantization	B-Algorithm
is	O
not	O
too	O
coarse	O
and	O
one	O
applies	O
the	O
inverse	O
transform	O
to	O
the	O
matrix	O
after	O
it	O
is	O
quantized	O
,	O
one	O
gets	O
an	O
image	O
that	O
looks	O
very	O
similar	O
to	O
the	O
original	O
image	O
but	O
is	O
not	O
quite	O
the	O
same	O
.	O
</s>
<s>
Typically	O
,	O
one	O
corner	O
of	O
the	O
8×8	O
array	O
of	O
coefficients	O
contains	O
only	O
zeros	O
after	O
quantization	B-Algorithm
is	O
applied	O
.	O
</s>
<s>
By	O
starting	O
in	O
the	O
opposite	O
corner	O
of	O
the	O
matrix	O
,	O
then	O
zigzagging	O
through	O
the	O
matrix	O
to	O
combine	O
the	O
coefficients	O
into	O
a	O
string	O
,	O
then	O
substituting	O
run-length	B-Algorithm
codes	I-Algorithm
for	O
consecutive	O
zeros	O
in	O
that	O
string	O
,	O
and	O
then	O
applying	O
Huffman	B-General_Concept
coding	I-General_Concept
to	O
that	O
result	O
,	O
one	O
reduces	O
the	O
matrix	O
to	O
a	O
smaller	O
quantity	O
of	O
data	O
.	O
</s>
<s>
It	O
is	O
this	O
entropy	B-Algorithm
coded	I-Algorithm
data	O
that	O
is	O
broadcast	O
or	O
that	O
is	O
put	O
on	O
DVDs	O
.	O
</s>
<s>
The	O
processing	O
of	O
B-frames	B-General_Concept
is	O
similar	O
to	O
that	O
of	O
P-frames	O
except	O
that	O
B-frames	B-General_Concept
use	O
the	O
picture	O
in	O
a	O
subsequent	O
reference	B-General_Concept
frame	I-General_Concept
as	O
well	O
as	O
the	O
picture	O
in	O
a	O
preceding	O
reference	B-General_Concept
frame	I-General_Concept
.	O
</s>
<s>
As	O
a	O
result	O
,	O
B-frames	B-General_Concept
usually	O
provide	O
more	O
compression	O
than	O
P-frames	O
.	O
</s>
<s>
B-frames	B-General_Concept
are	O
never	O
reference	B-General_Concept
frames	I-General_Concept
in	O
MPEG-2	B-Algorithm
Video	I-Algorithm
.	O
</s>
<s>
Typically	O
,	O
every	O
15th	O
frame	O
or	O
so	O
is	O
made	O
into	O
an	O
I-frame	B-General_Concept
.	O
</s>
<s>
P-frames	O
and	O
B-frames	B-General_Concept
might	O
follow	O
an	O
I-frame	B-General_Concept
like	O
this	O
,	O
IBBPBBPBBPBB(I )	O
,	O
to	O
form	O
a	O
Group	B-General_Concept
Of	I-General_Concept
Pictures	I-General_Concept
(	O
GOP	O
)	O
;	O
however	O
,	O
the	O
standard	O
is	O
flexible	O
about	O
this	O
.	O
</s>
<s>
The	O
encoder	O
selects	O
which	O
pictures	O
are	O
coded	O
as	O
I-	O
,	O
P-	O
,	O
and	O
B-frames	B-General_Concept
.	O
</s>
<s>
P-frames	O
provide	O
more	O
compression	O
than	O
I-frames	B-General_Concept
because	O
they	O
take	O
advantage	O
of	O
the	O
data	O
in	O
a	O
previous	O
I-frame	B-General_Concept
or	O
P-frame	O
–	O
a	O
reference	B-General_Concept
frame	I-General_Concept
.	O
</s>
<s>
To	O
generate	O
a	O
P-frame	O
,	O
the	O
previous	O
reference	B-General_Concept
frame	I-General_Concept
is	O
reconstructed	O
,	O
just	O
as	O
it	O
would	O
be	O
in	O
a	O
TV	O
receiver	O
or	O
DVD	O
player	O
.	O
</s>
<s>
The	O
frame	O
being	O
compressed	O
is	O
divided	O
into	O
16	O
pixel	B-Algorithm
by	O
16	O
pixel	B-Algorithm
macroblocks	B-General_Concept
.	O
</s>
<s>
Then	O
,	O
for	O
each	O
of	O
those	O
macroblocks	B-General_Concept
,	O
the	O
reconstructed	O
reference	B-General_Concept
frame	I-General_Concept
is	O
searched	O
to	O
find	O
a	O
16	O
by	O
16	O
area	O
that	O
closely	O
matches	O
the	O
content	O
of	O
the	O
macroblock	B-General_Concept
being	O
compressed	O
.	O
</s>
<s>
Frequently	O
,	O
the	O
offset	O
is	O
zero	O
,	O
but	O
if	O
something	O
in	O
the	O
picture	O
is	O
moving	O
,	O
the	O
offset	O
might	O
be	O
something	O
like	O
23	O
pixels	B-Algorithm
to	O
the	O
right	O
and	O
4-and-a-half	O
pixels	B-Algorithm
up	O
.	O
</s>
<s>
In	O
MPEG-1	B-Algorithm
and	O
MPEG-2	B-Algorithm
,	O
motion	O
vector	O
values	O
can	O
either	O
represent	O
integer	O
offsets	O
or	O
half-integer	O
offsets	O
.	O
</s>
<s>
To	O
correct	O
for	O
this	O
,	O
the	O
encoder	O
takes	O
the	O
difference	O
of	O
all	O
corresponding	O
pixels	B-Algorithm
of	O
the	O
two	O
regions	O
,	O
and	O
on	O
that	O
macroblock	B-General_Concept
difference	O
then	O
computes	O
the	O
DCT	B-General_Concept
and	O
strings	O
of	O
coefficient	O
values	O
for	O
the	O
four	O
8×8	O
areas	O
in	O
the	O
16×16	O
macroblock	B-General_Concept
as	O
described	O
above	O
.	O
</s>
<s>
This	O
"	O
residual	O
"	O
is	O
appended	O
to	O
the	O
motion	O
vector	O
and	O
the	O
result	O
sent	O
to	O
the	O
receiver	O
or	O
stored	O
on	O
the	O
DVD	O
for	O
each	O
macroblock	B-General_Concept
being	O
compressed	O
.	O
</s>
<s>
Then	O
,	O
the	O
macroblock	B-General_Concept
is	O
treated	O
like	O
an	O
I-frame	B-General_Concept
macroblock	B-General_Concept
.	O
</s>
<s>
MPEG-2	B-Algorithm
video	I-Algorithm
supports	O
a	O
wide	O
range	O
of	O
applications	O
from	O
mobile	O
to	O
high	O
quality	O
HD	O
editing	O
.	O
</s>
<s>
+	O
MPEG-2	B-Algorithm
Profiles	O
Abbr	O
.	O
</s>
<s>
+	O
MPEG-2	B-Algorithm
Levels	O
Abbr	O
.	O
</s>
<s>
A	O
few	O
common	O
MPEG-2	B-Algorithm
Profile/Level	O
combinations	O
are	O
presented	O
below	O
,	O
with	O
particular	O
maximum	O
limits	O
noted	O
:	O
</s>
<s>
HDV	O
-	O
a	O
tape-based	O
high	B-Device
definition	I-Device
video	O
recording	O
format	O
.	O
</s>
<s>
XDCAM	O
-	O
a	O
family	O
of	O
tapeless	O
video	O
recording	O
formats	O
,	O
which	O
,	O
in	O
particular	O
,	O
includes	O
formats	O
based	O
on	O
MPEG-2	B-Algorithm
Part	I-Algorithm
2	I-Algorithm
.	O
</s>
<s>
These	O
are	O
:	O
standard	O
definition	O
MPEG	O
IMX	O
(	O
see	O
above	O
)	O
,	O
high	B-Device
definition	I-Device
MPEG	O
HD	O
,	O
high	B-Device
definition	I-Device
MPEG	O
HD422	O
.	O
</s>
<s>
HD	B-Operating_System
DVD	I-Operating_System
-	O
defunct	O
high	B-Device
definition	I-Device
consumer	O
video	O
format	O
.	O
</s>
<s>
Blu-ray	O
Disc	O
-	O
high	B-Device
definition	I-Device
consumer	O
video	O
format	O
.	O
</s>
<s>
Broadcast	O
TV	O
-	O
in	O
some	O
countries	O
MPEG-2	B-Algorithm
Part	I-Algorithm
2	I-Algorithm
is	O
used	O
for	O
digital	O
broadcast	O
in	O
high	B-Device
definition	I-Device
.	O
</s>
<s>
For	O
example	O
,	O
ATSC	B-Device
specifies	O
both	O
several	O
scanning	O
formats	O
(	O
480i	O
,	O
480p	O
,	O
720p	O
,	O
1080i	O
,	O
1080p	O
)	O
and	O
frame/field	O
rates	O
at	O
4:2:0	O
color	O
subsampling	O
,	O
with	O
up	O
to	O
19.4	O
Mbit/s	O
data	O
rate	O
per	O
channel	O
.	O
</s>
<s>
The	O
following	O
organizations	O
have	O
held	O
patents	O
for	O
MPEG-2	B-Algorithm
video	I-Algorithm
technology	O
,	O
as	O
listed	O
at	O
MPEG	O
LA	O
.	O
</s>
