Lines Matching refs:planes
278 static void extract_planes(const SkBitmap& bm, SkYUVColorSpace yuvColorSpace, PlaneData* planes) { in extract_planes() argument
282 planes->fYFull.allocPixels(SkImageInfo::MakeA8(bm.width(), bm.height())); in extract_planes()
283 planes->fUFull.allocPixels(SkImageInfo::MakeA8(bm.width(), bm.height())); in extract_planes()
284 planes->fVFull.allocPixels(SkImageInfo::MakeA8(bm.width(), bm.height())); in extract_planes()
285 planes->fAFull.allocPixels(SkImageInfo::MakeA8(bm.width(), bm.height())); in extract_planes()
286 planes->fUQuarter.allocPixels(SkImageInfo::MakeA8(bm.width()/2, bm.height()/2)); in extract_planes()
287 planes->fVQuarter.allocPixels(SkImageInfo::MakeA8(bm.width()/2, bm.height()/2)); in extract_planes()
304 *planes->fYFull.getAddr8(x, y) = yuva[0]; in extract_planes()
305 *planes->fUFull.getAddr8(x, y) = yuva[1]; in extract_planes()
306 *planes->fVFull.getAddr8(x, y) = yuva[2]; in extract_planes()
307 *planes->fAFull.getAddr8(x, y) = yuva[3]; in extract_planes()
315 uAccum += *planes->fUFull.getAddr8(2*x, 2*y); in extract_planes()
316 uAccum += *planes->fUFull.getAddr8(2*x+1, 2*y); in extract_planes()
317 uAccum += *planes->fUFull.getAddr8(2*x, 2*y+1); in extract_planes()
318 uAccum += *planes->fUFull.getAddr8(2*x+1, 2*y+1); in extract_planes()
320 *planes->fUQuarter.getAddr8(x, y) = uAccum / 4.0f; in extract_planes()
322 vAccum += *planes->fVFull.getAddr8(2*x, 2*y); in extract_planes()
323 vAccum += *planes->fVFull.getAddr8(2*x+1, 2*y); in extract_planes()
324 vAccum += *planes->fVFull.getAddr8(2*x, 2*y+1); in extract_planes()
325 vAccum += *planes->fVFull.getAddr8(2*x+1, 2*y+1); in extract_planes()
327 *planes->fVQuarter.getAddr8(x, y) = vAccum / 4.0f; in extract_planes()
333 static void create_YUV(const PlaneData& planes, YUVFormat yuvFormat, in create_YUV() argument
341 yuvaFull.allocPixels(SkImageInfo::Make(planes.fYFull.width(), planes.fYFull.height(), in create_YUV()
344 for (int y = 0; y < planes.fYFull.height(); ++y) { in create_YUV()
345 for (int x = 0; x < planes.fYFull.width(); ++x) { in create_YUV()
347 uint8_t Y = *planes.fYFull.getAddr8(x, y); in create_YUV()
348 uint8_t U = *planes.fUFull.getAddr8(x, y); in create_YUV()
349 uint8_t V = *planes.fVFull.getAddr8(x, y); in create_YUV()
350 uint8_t A = *planes.fAFull.getAddr8(x, y); in create_YUV()
374 uvQuarter.allocPixels(SkImageInfo::Make(planes.fYFull.width()/2, in create_YUV()
375 planes.fYFull.height()/2, in create_YUV()
379 for (int y = 0; y < planes.fYFull.height()/2; ++y) { in create_YUV()
380 for (int x = 0; x < planes.fYFull.width()/2; ++x) { in create_YUV()
381 uint8_t U = *planes.fUQuarter.getAddr8(x, y); in create_YUV()
382 uint8_t V = *planes.fVQuarter.getAddr8(x, y); in create_YUV()
390 resultBMs[nextLayer++] = planes.fYFull; in create_YUV()
405 vuQuarter.allocPixels(SkImageInfo::Make(planes.fYFull.width()/2, in create_YUV()
406 planes.fYFull.height()/2, in create_YUV()
410 for (int y = 0; y < planes.fYFull.height()/2; ++y) { in create_YUV()
411 for (int x = 0; x < planes.fYFull.width()/2; ++x) { in create_YUV()
412 uint8_t U = *planes.fUQuarter.getAddr8(x, y); in create_YUV()
413 uint8_t V = *planes.fVQuarter.getAddr8(x, y); in create_YUV()
421 resultBMs[nextLayer++] = planes.fYFull; in create_YUV()
433 resultBMs[nextLayer++] = planes.fYFull; in create_YUV()
434 resultBMs[nextLayer++] = planes.fUQuarter; in create_YUV()
435 resultBMs[nextLayer++] = planes.fVQuarter; in create_YUV()
445 resultBMs[nextLayer++] = planes.fYFull; in create_YUV()
446 resultBMs[nextLayer++] = planes.fVQuarter; in create_YUV()
447 resultBMs[nextLayer++] = planes.fUQuarter; in create_YUV()
462 resultBMs[nextLayer] = planes.fAFull; in create_YUV()
595 void* planes[SkYUVASizeInfo::kMaxCount]) override { in onGetYUVA8Planes()
597 planes[i] = fYUVBitmaps[i].getPixels(); in onGetYUVA8Planes()
772 PlaneData planes; in createImages() local
773 extract_planes(fOriginalBMs[opaque], (SkYUVColorSpace) cs, &planes); in createImages()
778 create_YUV(planes, (YUVFormat) format, resultBMs, yuvaIndices, opaque); in createImages()