Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (27 sloc) 941 Bytes
# Interleaved DC scan for Y,Cb,Cr:
0,1,2: 0-0, 0, 3 ;
0,1,2: 0-0, 3, 2 ;
# AC scans:
# First AC scan: send first 5 Y AC coefficients, minus 2 lowest bits:
0: 1-1, 0, 2 ;
0: 2-2, 0, 2 ;
0: 3-3, 0, 2 ;
0: 4-5, 0, 2 ;
# Send all Cr,Cb AC coefficients, minus lowest bit:
# (chroma data is usually too small to be worth subdividing further;
# but note we send Cr first since eye is least sensitive to Cb)
2: 1-63, 0, 1 ;
1: 1-63, 0, 1 ;
# Send remaining Y AC coefficients, minus 2 lowest bits:
0: 6-63, 0, 2 ;
# Send next-to-lowest bit of all Y AC coefficients:
0: 1-63, 2, 1 ;
# At this point we've sent all but the lowest bit of all coefficients.
# Send lowest two bits of DC coefficients
0,1,2: 0-0, 2, 1 ;
0,1,2: 0-0, 1, 0 ;
# Send lowest bit of AC coefficients
2: 1-63, 1, 0 ;
1: 1-63, 1, 0 ;
# Y AC lowest bit scan is last; it's usually the largest scan
0: 1-63, 1, 0 ;