code: func imageYCbCrToYCC(in *image.YCbCr) *ycc {
  	w, h := in.Rect.Dx(), in.Rect.Dy()
  	p := ycc{
  		Pix:            make([]uint8, 3*w*h),
  		Stride:         3 * w,
  		Rect:           image.Rect(0, 0, w, h),
  		SubsampleRatio: in.SubsampleRatio,
  	}
  	switch in.SubsampleRatio {
  	case ycbcrSubsampleRatio422:
  		return convertToYCC422(in, &p)
  	case ycbcrSubsampleRatio420:
  		return convertToYCC420(in, &p)
  	case ycbcrSubsampleRatio440:
  		return convertToYCC440(in, &p)
  	case ycbcrSubsampleRatio444:
  		return convertToYCC444(in, &p)
  	case ycbcrSubsampleRatio411:
  		return convertToYCC411(in, &p)
  	case ycbcrSubsampleRatio410:
  		return convertToYCC410(in, &p)
  	}
  	return &p
  }
docs: // imageYCbCrToYCC converts a YCbCr image to a ycc image for resizing.