Home » Archimedes archive » Acorn User » AU 1997-Xmas B.adf » PD » MakeJPEG/Tables/Scan03
MakeJPEG/Tables/Scan03
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1997-Xmas B.adf » PD |
Filename: | MakeJPEG/Tables/Scan03 |
Read OK: | ✔ |
File size: | 0342 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
# Initial DC scan for Y,Cb,Cr (lowest bit not sent) 0,1,2: 0-0, 0, 1 ; # First AC scan: send first 5 Y AC coefficients, minus 2 lowest bits: 0: 1-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 bit of DC coefficients 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 ;
00000000 23 20 49 6e 69 74 69 61 6c 20 44 43 20 73 63 61 |# Initial DC sca| 00000010 6e 20 66 6f 72 20 59 2c 43 62 2c 43 72 20 28 6c |n for Y,Cb,Cr (l| 00000020 6f 77 65 73 74 20 62 69 74 20 6e 6f 74 20 73 65 |owest bit not se| 00000030 6e 74 29 0a 30 2c 31 2c 32 3a 20 30 2d 30 2c 20 |nt).0,1,2: 0-0, | 00000040 20 20 30 2c 20 31 20 3b 0a 23 20 46 69 72 73 74 | 0, 1 ;.# First| 00000050 20 41 43 20 73 63 61 6e 3a 20 73 65 6e 64 20 66 | AC scan: send f| 00000060 69 72 73 74 20 35 20 59 20 41 43 20 63 6f 65 66 |irst 5 Y AC coef| 00000070 66 69 63 69 65 6e 74 73 2c 20 6d 69 6e 75 73 20 |ficients, minus | 00000080 32 20 6c 6f 77 65 73 74 20 62 69 74 73 3a 0a 30 |2 lowest bits:.0| 00000090 3a 20 20 20 20 20 31 2d 35 2c 20 20 20 30 2c 20 |: 1-5, 0, | 000000a0 32 20 3b 0a 23 20 53 65 6e 64 20 61 6c 6c 20 43 |2 ;.# Send all C| 000000b0 72 2c 43 62 20 41 43 20 63 6f 65 66 66 69 63 69 |r,Cb AC coeffici| 000000c0 65 6e 74 73 2c 20 6d 69 6e 75 73 20 6c 6f 77 65 |ents, minus lowe| 000000d0 73 74 20 62 69 74 3a 0a 23 20 28 63 68 72 6f 6d |st bit:.# (chrom| 000000e0 61 20 64 61 74 61 20 69 73 20 75 73 75 61 6c 6c |a data is usuall| 000000f0 79 20 74 6f 6f 20 73 6d 61 6c 6c 20 74 6f 20 62 |y too small to b| 00000100 65 20 77 6f 72 74 68 20 73 75 62 64 69 76 69 64 |e worth subdivid| 00000110 69 6e 67 20 66 75 72 74 68 65 72 3b 0a 23 20 20 |ing further;.# | 00000120 62 75 74 20 6e 6f 74 65 20 77 65 20 73 65 6e 64 |but note we send| 00000130 20 43 72 20 66 69 72 73 74 20 73 69 6e 63 65 20 | Cr first since | 00000140 65 79 65 20 69 73 20 6c 65 61 73 74 20 73 65 6e |eye is least sen| 00000150 73 69 74 69 76 65 20 74 6f 20 43 62 29 0a 32 3a |sitive to Cb).2:| 00000160 20 20 20 20 20 31 2d 36 33 2c 20 20 30 2c 20 31 | 1-63, 0, 1| 00000170 20 3b 0a 31 3a 20 20 20 20 20 31 2d 36 33 2c 20 | ;.1: 1-63, | 00000180 20 30 2c 20 31 20 3b 0a 23 20 53 65 6e 64 20 72 | 0, 1 ;.# Send r| 00000190 65 6d 61 69 6e 69 6e 67 20 59 20 41 43 20 63 6f |emaining Y AC co| 000001a0 65 66 66 69 63 69 65 6e 74 73 2c 20 6d 69 6e 75 |efficients, minu| 000001b0 73 20 32 20 6c 6f 77 65 73 74 20 62 69 74 73 3a |s 2 lowest bits:| 000001c0 0a 30 3a 20 20 20 20 20 36 2d 36 33 2c 20 20 30 |.0: 6-63, 0| 000001d0 2c 20 32 20 3b 0a 23 20 53 65 6e 64 20 6e 65 78 |, 2 ;.# Send nex| 000001e0 74 2d 74 6f 2d 6c 6f 77 65 73 74 20 62 69 74 20 |t-to-lowest bit | 000001f0 6f 66 20 61 6c 6c 20 59 20 41 43 20 63 6f 65 66 |of all Y AC coef| 00000200 66 69 63 69 65 6e 74 73 3a 0a 30 3a 20 20 20 20 |ficients:.0: | 00000210 20 31 2d 36 33 2c 20 20 32 2c 20 31 20 3b 0a 23 | 1-63, 2, 1 ;.#| 00000220 20 41 74 20 74 68 69 73 20 70 6f 69 6e 74 20 77 | At this point w| 00000230 65 27 76 65 20 73 65 6e 74 20 61 6c 6c 20 62 75 |e've sent all bu| 00000240 74 20 74 68 65 20 6c 6f 77 65 73 74 20 62 69 74 |t the lowest bit| 00000250 20 6f 66 20 61 6c 6c 20 63 6f 65 66 66 69 63 69 | of all coeffici| 00000260 65 6e 74 73 2e 0a 23 20 53 65 6e 64 20 6c 6f 77 |ents..# Send low| 00000270 65 73 74 20 62 69 74 20 6f 66 20 44 43 20 63 6f |est bit of DC co| 00000280 65 66 66 69 63 69 65 6e 74 73 0a 30 2c 31 2c 32 |efficients.0,1,2| 00000290 3a 20 30 2d 30 2c 20 20 20 31 2c 20 30 20 3b 0a |: 0-0, 1, 0 ;.| 000002a0 23 20 53 65 6e 64 20 6c 6f 77 65 73 74 20 62 69 |# Send lowest bi| 000002b0 74 20 6f 66 20 41 43 20 63 6f 65 66 66 69 63 69 |t of AC coeffici| 000002c0 65 6e 74 73 0a 32 3a 20 20 20 20 20 31 2d 36 33 |ents.2: 1-63| 000002d0 2c 20 20 31 2c 20 30 20 3b 0a 31 3a 20 20 20 20 |, 1, 0 ;.1: | 000002e0 20 31 2d 36 33 2c 20 20 31 2c 20 30 20 3b 0a 23 | 1-63, 1, 0 ;.#| 000002f0 20 59 20 41 43 20 6c 6f 77 65 73 74 20 62 69 74 | Y AC lowest bit| 00000300 20 73 63 61 6e 20 69 73 20 6c 61 73 74 3b 20 69 | scan is last; i| 00000310 74 27 73 20 75 73 75 61 6c 6c 79 20 74 68 65 20 |t's usually the | 00000320 6c 61 72 67 65 73 74 20 73 63 61 6e 0a 30 3a 20 |largest scan.0: | 00000330 20 20 20 20 31 2d 36 33 2c 20 20 31 2c 20 30 20 | 1-63, 1, 0 | 00000340 3b 0a |;.| 00000342