-
Notifications
You must be signed in to change notification settings - Fork 1
/
Notes.txt
31 lines (25 loc) · 1.12 KB
/
Notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Memory Data
Data Descriptor
What's in the data?
What does the data meens?
How is it organized?
Data block
Read from file.
Save changes in local cache.
Write to new file.
=============================
The conversion separates the RGB image to monochrome (luminance Y) and color (chrominance Cr Cb) channels so that different levels of compression can be applied to the monochrome and color components.
YCbCr (256 levels) can be computed directly from 8-bit RGB as follows:
Y = 0.299 R + 0.587 G + 0.114 B
Cb = - 0.1687 R - 0.3313 G + 0.5 B + 128
Cr = 0.5 R - 0.4187 G - 0.0813 B + 128
Down sampling is often applied the Cr and Cb chroma channels after conversion.
Before this happens the chrominance channels will have to be up sampled to match the original image size.
RGB can be computed directly from YCbCr (256 levels) as follows:
R = Y + 1.402 (Cr-128)
G = Y - 0.34414 (Cb-128) - 0.71414 (Cr-128)
B = Y + 1.772 (Cb-128)
http://www.ams.org/samplings/feature-column/fcarc-image-compression
[Y] = [ 0.29900 0.58700 0.11400 ] [ R ]
[Cb] = [ -0.16874 -0.33126 0.50000 ] [ G ]
[Cr] = [ 0.50000 -0.41869 -0.08131 ] [ B ]