Creating a custom scanfile for jpegtran

25 Views Asked by At

I'm creating a custom scanfile for progressive jpegs. My goal here is to achieve a compromise between quality and the smallest possible size for the first scan. I don't care much about the other scans.

After some trial and error, this is the solution that worked well for my image set:

# DC coefficients
0,1,2:   0 -  0,   0, 6 ; # Scan  1
0,1,2:   0 -  0,   6, 5 ; # Scan  2
0,1,2:   0 -  0,   5, 4 ; # Scan  3
0,1,2:   0 -  0,   4, 3 ; # Scan  4
0,1,2:   0 -  0,   3, 2 ; # Scan  5
0,1,2:   0 -  0,   2, 1 ; # Scan  6
0,1,2:   0 -  0,   1, 0 ; # Scan  7

# AC coefficients
1    :   1 - 63,   0, 0 ; # Scan  8
2    :   1 - 63,   0, 0 ; # Scan  9
0    :   1 - 10,   0, 0 ; # Scan 10
0    :  11 - 63,   0, 0 ; # Scan 11

I have an idea on what's happening on scan 1 and scans 8 through 11.

I don't understand scans 2 through 7, I came with these lines through pure trial and error.

Does this scanfile looks correct to you guys?

0

There are 0 best solutions below