Lines Matching refs:planes

278 static void extract_planes(const SkBitmap& bm, SkYUVColorSpace yuvColorSpace, PlaneData* planes) {  in extract_planes()  argument
287 planes->fYFull.allocPixels(SkImageInfo::MakeA8(bm.width(), bm.height())); in extract_planes()
288 planes->fUFull.allocPixels(SkImageInfo::MakeA8(bm.width(), bm.height())); in extract_planes()
289 planes->fVFull.allocPixels(SkImageInfo::MakeA8(bm.width(), bm.height())); in extract_planes()
290 planes->fAFull.allocPixels(SkImageInfo::MakeA8(bm.width(), bm.height())); in extract_planes()
291 planes->fUQuarter.allocPixels(SkImageInfo::MakeA8(bm.width()/2, bm.height()/2)); in extract_planes()
292 planes->fVQuarter.allocPixels(SkImageInfo::MakeA8(bm.width()/2, bm.height()/2)); in extract_planes()
309 *planes->fYFull.getAddr8(x, y) = yuva[0]; in extract_planes()
310 *planes->fUFull.getAddr8(x, y) = yuva[1]; in extract_planes()
311 *planes->fVFull.getAddr8(x, y) = yuva[2]; in extract_planes()
312 *planes->fAFull.getAddr8(x, y) = yuva[3]; in extract_planes()
320 uAccum += *planes->fUFull.getAddr8(2*x, 2*y); in extract_planes()
321 uAccum += *planes->fUFull.getAddr8(2*x+1, 2*y); in extract_planes()
322 uAccum += *planes->fUFull.getAddr8(2*x, 2*y+1); in extract_planes()
323 uAccum += *planes->fUFull.getAddr8(2*x+1, 2*y+1); in extract_planes()
325 *planes->fUQuarter.getAddr8(x, y) = uAccum / 4.0f; in extract_planes()
327 vAccum += *planes->fVFull.getAddr8(2*x, 2*y); in extract_planes()
328 vAccum += *planes->fVFull.getAddr8(2*x+1, 2*y); in extract_planes()
329 vAccum += *planes->fVFull.getAddr8(2*x, 2*y+1); in extract_planes()
330 vAccum += *planes->fVFull.getAddr8(2*x+1, 2*y+1); in extract_planes()
332 *planes->fVQuarter.getAddr8(x, y) = vAccum / 4.0f; in extract_planes()
338 static void create_YUV(const PlaneData& planes, YUVFormat yuvFormat, in create_YUV() argument
346 yuvaFull.allocPixels(SkImageInfo::Make(planes.fYFull.width(), planes.fYFull.height(), in create_YUV()
349 for (int y = 0; y < planes.fYFull.height(); ++y) { in create_YUV()
350 for (int x = 0; x < planes.fYFull.width(); ++x) { in create_YUV()
352 uint8_t Y = *planes.fYFull.getAddr8(x, y); in create_YUV()
353 uint8_t U = *planes.fUFull.getAddr8(x, y); in create_YUV()
354 uint8_t V = *planes.fVFull.getAddr8(x, y); in create_YUV()
355 uint8_t A = *planes.fAFull.getAddr8(x, y); in create_YUV()
379 uvQuarter.allocPixels(SkImageInfo::Make(planes.fYFull.width()/2, in create_YUV()
380 planes.fYFull.height()/2, in create_YUV()
384 for (int y = 0; y < planes.fYFull.height()/2; ++y) { in create_YUV()
385 for (int x = 0; x < planes.fYFull.width()/2; ++x) { in create_YUV()
386 uint8_t U = *planes.fUQuarter.getAddr8(x, y); in create_YUV()
387 uint8_t V = *planes.fVQuarter.getAddr8(x, y); in create_YUV()
395 resultBMs[nextLayer++] = planes.fYFull; in create_YUV()
410 vuQuarter.allocPixels(SkImageInfo::Make(planes.fYFull.width()/2, in create_YUV()
411 planes.fYFull.height()/2, in create_YUV()
415 for (int y = 0; y < planes.fYFull.height()/2; ++y) { in create_YUV()
416 for (int x = 0; x < planes.fYFull.width()/2; ++x) { in create_YUV()
417 uint8_t U = *planes.fUQuarter.getAddr8(x, y); in create_YUV()
418 uint8_t V = *planes.fVQuarter.getAddr8(x, y); in create_YUV()
426 resultBMs[nextLayer++] = planes.fYFull; in create_YUV()
438 resultBMs[nextLayer++] = planes.fYFull; in create_YUV()
439 resultBMs[nextLayer++] = planes.fUQuarter; in create_YUV()
440 resultBMs[nextLayer++] = planes.fVQuarter; in create_YUV()
450 resultBMs[nextLayer++] = planes.fYFull; in create_YUV()
451 resultBMs[nextLayer++] = planes.fVQuarter; in create_YUV()
452 resultBMs[nextLayer++] = planes.fUQuarter; in create_YUV()
467 resultBMs[nextLayer] = planes.fAFull; in create_YUV()
603 void* planes[SkYUVASizeInfo::kMaxCount]) override { in onGetYUVA8Planes()
605 planes[i] = fYUVBitmaps[i].getPixels(); in onGetYUVA8Planes()
791 PlaneData planes; in createImages() local
792 extract_planes(fOriginalBMs[opaque], (SkYUVColorSpace) cs, &planes); in createImages()
797 create_YUV(planes, (YUVFormat) format, resultBMs, yuvaIndices, opaque); in createImages()
978 PlaneData planes; in createImages() local
979 extract_planes(fOriginalBMs[opaque], kJPEG_SkYUVColorSpace, &planes); in createImages()
983 create_YUV(planes, kAYUV_YUVFormat, resultBMs, yuvaIndices, opaque); in createImages()