Lines Matching refs:planes

85     kNV12_YUVFormat, // 8-bit Y plane + 2x2 down sampled interleaved U/V planes (2 textures)
88 kI420_YUVFormat, // 8-bit Y plane + separate 2x2 down sampled U and V planes (3 textures)
89 kYV12_YUVFormat, // 8-bit Y plane + separate 2x2 down sampled V and U planes (3 textures)
206 // All the planes we need to construct the various YUV formats
384 PlaneData* planes) {
398 // To test the identity color space we use JPEG YUV planes
404 planes->fYFull.allocPixels(
406 planes->fUFull.allocPixels(
408 planes->fVFull.allocPixels(
410 planes->fAFull.allocPixels(SkImageInfo::MakeA8(ii.dimensions()));
411 planes->fUQuarter.allocPixels(SkImageInfo::Make(ii.width()/2, ii.height()/2,
413 planes->fVQuarter.allocPixels(SkImageInfo::Make(ii.width()/2, ii.height()/2,
416 planes->fFull.allocPixels(
418 planes->fQuarter.allocPixels(SkImageInfo::Make(ii.width()/2, ii.height()/2,
424 SkColor4f* dst = (SkColor4f *) planes->fFull.getAddr(0, 0);
433 *planes->fYFull.getAddr8(x, y) = yuva[0];
434 *planes->fUFull.getAddr8(x, y) = yuva[1];
435 *planes->fVFull.getAddr8(x, y) = yuva[2];
436 *planes->fAFull.getAddr8(x, y) = yuva[3];
447 dst = (SkColor4f *) planes->fQuarter.getAddr(0, 0);
452 yAccum += *planes->fYFull.getAddr8(2*x, 2*y);
453 yAccum += *planes->fYFull.getAddr8(2*x+1, 2*y);
454 yAccum += *planes->fYFull.getAddr8(2*x, 2*y+1);
455 yAccum += *planes->fYFull.getAddr8(2*x+1, 2*y+1);
457 uAccum += *planes->fUFull.getAddr8(2*x, 2*y);
458 uAccum += *planes->fUFull.getAddr8(2*x+1, 2*y);
459 uAccum += *planes->fUFull.getAddr8(2*x, 2*y+1);
460 uAccum += *planes->fUFull.getAddr8(2*x+1, 2*y+1);
462 *planes->fUQuarter.getAddr8(x, y) = uAccum / 4.0f;
464 vAccum += *planes->fVFull.getAddr8(2*x, 2*y);
465 vAccum += *planes->fVFull.getAddr8(2*x+1, 2*y);
466 vAccum += *planes->fVFull.getAddr8(2*x, 2*y+1);
467 vAccum += *planes->fVFull.getAddr8(2*x+1, 2*y+1);
469 *planes->fVQuarter.getAddr8(x, y) = vAccum / 4.0f;
471 aAccum += *planes->fAFull.getAddr8(2*x, 2*y);
472 aAccum += *planes->fAFull.getAddr8(2*x+1, 2*y);
473 aAccum += *planes->fAFull.getAddr8(2*x, 2*y+1);
474 aAccum += *planes->fAFull.getAddr8(2*x+1, 2*y+1);
538 // Recombine the separate planes into some YUV format. Returns the number of planes.
539 static int create_YUV(const PlaneData& planes,
547 resultBMs[nextLayer++] = make_16(planes.fFull, kR16G16B16A16_unorm_SkColorType,
559 yuvaFull.allocPixels(SkImageInfo::Make(planes.fYFull.width(), planes.fYFull.height(),
562 for (int y = 0; y < planes.fYFull.height(); ++y) {
563 for (int x = 0; x < planes.fYFull.width(); ++x) {
565 uint8_t Y = *planes.fYFull.getAddr8(x, y);
566 uint8_t U = *planes.fUFull.getAddr8(x, y);
567 uint8_t V = *planes.fVFull.getAddr8(x, y);
568 uint8_t A = *planes.fAFull.getAddr8(x, y);
585 yuvaFull.allocPixels(SkImageInfo::Make(planes.fYFull.width(), planes.fYFull.height(),
589 for (int y = 0; y < planes.fYFull.height(); ++y) {
590 for (int x = 0; x < planes.fYFull.width(); ++x) {
592 Y = SkScalarRoundToInt((*planes.fYFull.getAddr8(x, y) / 255.0f) * 1023.0f);
593 U = SkScalarRoundToInt((*planes.fUFull.getAddr8(x, y) / 255.0f) * 1023.0f);
594 V = SkScalarRoundToInt((*planes.fVFull.getAddr8(x, y) / 255.0f) * 1023.0f);
595 A = SkScalarRoundToInt((*planes.fAFull.getAddr8(x, y) / 255.0f) * 3.0f);
607 resultBMs[nextLayer++] = make_16(planes.fFull, kA16_unorm_SkColorType,
614 resultBMs[nextLayer++] = make_16(planes.fQuarter, kR16G16_unorm_SkColorType,
623 resultBMs[nextLayer++] = make_16(planes.fFull, kA16_unorm_SkColorType,
634 resultBMs[nextLayer++] = make_16(planes.fFull, kA16_float_SkColorType,
638 resultBMs[nextLayer++] = make_16(planes.fQuarter, kR16G16_float_SkColorType,
644 resultBMs[nextLayer++] = make_16(planes.fFull, kA16_float_SkColorType,
652 SkBitmap uvQuarter = make_quarter_2_channel(planes.fYFull,
653 planes.fUQuarter,
654 planes.fVQuarter, true);
655 resultBMs[nextLayer++] = planes.fYFull;
660 SkBitmap vuQuarter = make_quarter_2_channel(planes.fYFull,
661 planes.fUQuarter,
662 planes.fVQuarter, false);
663 resultBMs[nextLayer++] = planes.fYFull;
668 resultBMs[nextLayer++] = planes.fYFull;
669 resultBMs[nextLayer++] = planes.fUQuarter;
670 resultBMs[nextLayer++] = planes.fVQuarter;
673 resultBMs[nextLayer++] = planes.fYFull;
674 resultBMs[nextLayer++] = planes.fVQuarter;
675 resultBMs[nextLayer++] = planes.fUQuarter;
680 resultBMs[nextLayer++] = planes.fAFull;
745 // This GM creates an opaque and transparent bitmap, extracts the planes and then recombines
829 PlaneData planes;
833 &planes);
839 int numPlanes = create_YUV(planes, format, resultBMs, opaque);
1031 PlaneData planes;
1035 &planes);
1039 create_YUV(planes, kAYUV_YUVFormat, resultBMs, opaque);
1173 // Exercises SkColorMatrix_RGB2YUV for yuv colorspaces, showing the planes, and the
1200 std::array<sk_sp<SkImage>, SkYUVAInfo::kMaxPlanes> planes;
1205 std::tie(planes, info) = sk_gpu_test::MakeYUVAPlanesAsA8(fOrig.get(),
1211 planes[i]->peekPixels(&pixmaps[i]);
1229 canvas->drawImage(planes[i], 0, y);
1230 y += planes[i]->height();