Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for quantIndex (0.09 sec)

  1. src/image/jpeg/writer.go

    	8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
    	8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
    	8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
    }
    
    type quantIndex int
    
    const (
    	quantIndexLuminance quantIndex = iota
    	quantIndexChrominance
    	nQuantIndex
    )
    
    // unscaledQuant are the unscaled quantization tables in zig-zag order. Each
    // encoder copies and scales the tables according to its quality parameter.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 17.1K bytes
    - Viewed (0)
  2. src/image/jpeg/writer_test.go

    func TestUnscaledQuant(t *testing.T) {
    	bad := false
    	for i := quantIndex(0); i < nQuantIndex; i++ {
    		for zig := 0; zig < blockSize; zig++ {
    			got := unscaledQuant[i][zig]
    			want := unscaledQuantInNaturalOrder[i][unzig[zig]]
    			if got != want {
    				t.Errorf("i=%d, zig=%d: got %d, want %d", i, zig, got, want)
    				bad = true
    			}
    		}
    	}
    	if bad {
    		names := [nQuantIndex]string{"Luminance", "Chrominance"}
    		buf := &strings.Builder{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:49:30 UTC 2022
    - 7.2K bytes
    - Viewed (0)
Back to top