Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for ycbcr (0.04 sec)

  1. src/image/ycbcr.go

    func (p *YCbCr) RGBA64At(x, y int) color.RGBA64 {
    	r, g, b, a := p.YCbCrAt(x, y).RGBA()
    	return color.RGBA64{uint16(r), uint16(g), uint16(b), uint16(a)}
    }
    
    func (p *YCbCr) YCbCrAt(x, y int) color.YCbCr {
    	if !(Point{x, y}.In(p.Rect)) {
    		return color.YCbCr{}
    	}
    	yi := p.YOffset(x, y)
    	ci := p.COffset(x, y)
    	return color.YCbCr{
    		p.Y[yi],
    		p.Cb[ci],
    		p.Cr[ci],
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  2. src/image/color/ycbcr.go

    }
    
    // YCbCrModel is the [Model] for Y'CbCr colors.
    var YCbCrModel Model = ModelFunc(yCbCrModel)
    
    func yCbCrModel(c Color) Color {
    	if _, ok := c.(YCbCr); ok {
    		return c
    	}
    	r, g, b, _ := c.RGBA()
    	y, u, v := RGBToYCbCr(uint8(r>>8), uint8(g>>8), uint8(b>>8))
    	return YCbCr{y, u, v}
    }
    
    // NYCbCrA represents a non-alpha-premultiplied Y'CbCr-with-alpha color, having
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 10.8K bytes
    - Viewed (0)
  3. src/image/color/ycbcr_test.go

    	for i := 0; i < 256; i++ {
    		c0 := NYCbCrA{YCbCr{0xff, 0x80, 0x80}, uint8(i)}
    		c1 := Alpha{uint8(i)}
    		if err := eq(c0, c1); err != nil {
    			t.Errorf("i=0x%02x:\n%v", i, err)
    		}
    	}
    }
    
    // TestNYCbCrAYCbCr tests that NYCbCrA colors are a superset of YCbCr colors.
    func TestNYCbCrAYCbCr(t *testing.T) {
    	for i := 0; i < 256; i++ {
    		c0 := NYCbCrA{YCbCr{uint8(i), 0x40, 0xc0}, 0xff}
    		c1 := YCbCr{uint8(i), 0x40, 0xc0}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 25 07:51:17 UTC 2016
    - 7.3K bytes
    - Viewed (0)
  4. src/image/internal/imageutil/gen.go

    		log.Fatal(err)
    	}
    }
    
    const pre = `// Code generated by go run gen.go; DO NOT EDIT.
    
    package imageutil
    
    import (
    	"image"
    )
    
    // DrawYCbCr draws the YCbCr source image on the RGBA destination image with
    // r.Min in dst aligned with sp in src. It reports whether the draw was
    // successful. If it returns false, no dst pixels were changed.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 4.3K bytes
    - Viewed (0)
  5. src/image/jpeg/writer.go

    	default:
    		rgba, _ := m.(*image.RGBA)
    		ycbcr, _ := m.(*image.YCbCr)
    		for y := bounds.Min.Y; y < bounds.Max.Y; y += 16 {
    			for x := bounds.Min.X; x < bounds.Max.X; x += 16 {
    				for i := 0; i < 4; i++ {
    					xOff := (i & 1) * 8
    					yOff := (i & 2) * 4
    					p := image.Pt(x+xOff, y+yOff)
    					if rgba != nil {
    						rgbaToYCbCr(rgba, p, &b, &cb[i], &cr[i])
    					} else if ycbcr != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 17.1K bytes
    - Viewed (0)
  6. src/encoding/json/example_test.go

    	for _, c := range colors {
    		var dst any
    		switch c.Space {
    		case "RGB":
    			dst = new(RGB)
    		case "YCbCr":
    			dst = new(YCbCr)
    		}
    		err := json.Unmarshal(c.Point, dst)
    		if err != nil {
    			log.Fatalln("error:", err)
    		}
    		fmt.Println(c.Space, dst)
    	}
    	// Output:
    	// YCbCr &{255 0 -10}
    	// RGB &{98 218 255}
    }
    
    // This example uses RawMessage to use a precomputed JSON during marshal.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 6.1K bytes
    - Viewed (0)
  7. src/image/ycbcr_test.go

    					subRect := Rect(x0, y0, x1, y1)
    					sub := m.SubImage(subRect).(*YCbCr)
    
    					// For each point in the sub-image's bounds, check that m.At(x, y) equals sub.At(x, y).
    					for y := sub.Rect.Min.Y; y < sub.Rect.Max.Y; y++ {
    						for x := sub.Rect.Min.X; x < sub.Rect.Max.X; x++ {
    							color0 := m.At(x, y).(color.YCbCr)
    							color1 := sub.At(x, y).(color.YCbCr)
    							if color0 != color1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 26 00:14:16 UTC 2015
    - 3.3K bytes
    - Viewed (0)
  8. src/image/internal/imageutil/impl.go

    // Code generated by go run gen.go; DO NOT EDIT.
    
    package imageutil
    
    import (
    	"image"
    )
    
    // DrawYCbCr draws the YCbCr source image on the RGBA destination image with
    // r.Min in dst aligned with sp in src. It reports whether the draw was
    // successful. If it returns false, no dst pixels were changed.
    //
    // This function assumes that r is entirely within dst's bounds and the
    // translation of r from dst coordinate space to src coordinate space is
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 10 17:50:11 UTC 2018
    - 7.4K bytes
    - Viewed (0)
  9. src/image/image_test.go

    		}:
    			tc.SetRGBA64(1, 1, color.RGBA64{0x7FFF, 0x3FFF, 0x0000, 0x7FFF})
    
    		case *NYCbCrA:
    			memset(tc.YCbCr.Y, 0x77)
    			memset(tc.YCbCr.Cb, 0x88)
    			memset(tc.YCbCr.Cr, 0x99)
    			memset(tc.A, 0xAA)
    
    		case *Uniform:
    			tc.C = color.RGBA64{0x7FFF, 0x3FFF, 0x0000, 0x7FFF}
    
    		case *YCbCr:
    			memset(tc.Y, 0x77)
    			memset(tc.Cb, 0x88)
    			memset(tc.Cr, 0x99)
    
    		case Rectangle:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 30 02:00:49 UTC 2021
    - 10.8K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/composite/whitelist.go

    	"image/color.Gray":    true,
    	"image/color.NRGBA64": true,
    	"image/color.NRGBA":   true,
    	"image/color.NYCbCrA": true,
    	"image/color.RGBA64":  true,
    	"image/color.RGBA":    true,
    	"image/color.YCbCr":   true,
    	"image.Point":         true,
    	"image.Rectangle":     true,
    	"image.Uniform":       true,
    
    	"unicode.Range16": true,
    	"unicode.Range32": true,
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 17 00:08:36 UTC 2022
    - 1.1K bytes
    - Viewed (0)
Back to top