Lines Matching refs:mLockedBuffer

36         mReader(reader), mFormat(format), mUsage(usage), mBuffer(buffer), mLockedBuffer(nullptr),  in AImage()
69 mLockedBuffer = nullptr; in close()
188 if (mLockedBuffer != nullptr) { in lockImage()
205 mLockedBuffer = std::move(lockedBuffer); in lockImage()
221 if (mLockedBuffer == nullptr) { in unlockImageIfLocked()
242 if (mLockedBuffer == nullptr) { in getPlanePixelStride()
259 int32_t fmt = mLockedBuffer->flexFormat; in getPlanePixelStride()
262 *pixelStride = (planeIdx == 0) ? 1 : mLockedBuffer->chromaStep; in getPlanePixelStride()
268 if (mLockedBuffer->dataCb && mLockedBuffer->dataCr) { in getPlanePixelStride()
269 *pixelStride = (planeIdx == 0) ? 2 : mLockedBuffer->chromaStep; in getPlanePixelStride()
309 if (mLockedBuffer == nullptr) { in getPlaneRowStride()
326 int32_t fmt = mLockedBuffer->flexFormat; in getPlaneRowStride()
329 *rowStride = (planeIdx == 0) ? mLockedBuffer->stride in getPlaneRowStride()
330 : mLockedBuffer->chromaStride; in getPlaneRowStride()
333 *rowStride = mLockedBuffer->width; in getPlaneRowStride()
336 if (mLockedBuffer->stride % 16) { in getPlaneRowStride()
337 ALOGE("Stride %d is not 16 pixel aligned!", mLockedBuffer->stride); in getPlaneRowStride()
340 *rowStride = (planeIdx == 0) ? mLockedBuffer->stride in getPlaneRowStride()
341 : ALIGN(mLockedBuffer->stride / 2, 16); in getPlaneRowStride()
344 if (mLockedBuffer->dataCb && mLockedBuffer->dataCr) { in getPlaneRowStride()
345 *rowStride = (planeIdx == 0) ? mLockedBuffer->stride : mLockedBuffer->chromaStride; in getPlaneRowStride()
347 *rowStride = mLockedBuffer->stride * 2; in getPlaneRowStride()
353 *rowStride = mLockedBuffer->stride; in getPlaneRowStride()
356 if (mLockedBuffer->stride % 16) { in getPlaneRowStride()
358 mLockedBuffer->stride); in getPlaneRowStride()
361 *rowStride = mLockedBuffer->stride; in getPlaneRowStride()
368 if (mLockedBuffer->stride % 16) { in getPlaneRowStride()
370 mLockedBuffer->stride); in getPlaneRowStride()
373 *rowStride = mLockedBuffer->stride * 2; in getPlaneRowStride()
376 *rowStride = mLockedBuffer->stride * 2; in getPlaneRowStride()
380 *rowStride = mLockedBuffer->stride * 4; in getPlaneRowStride()
384 *rowStride = mLockedBuffer->stride * 3; in getPlaneRowStride()
399 if (mLockedBuffer == nullptr) { in getJpegSize()
404 uint32_t width = mLockedBuffer->width; in getJpegSize()
405 uint8_t* jpegBuffer = mLockedBuffer->data; in getJpegSize()
433 if (mLockedBuffer == nullptr) { in getPlaneData()
456 int32_t fmt = mLockedBuffer->flexFormat; in getPlaneData()
460 pData = (planeIdx == 0) ? mLockedBuffer->data in getPlaneData()
461 : (planeIdx == 1) ? mLockedBuffer->dataCb in getPlaneData()
462 : mLockedBuffer->dataCr; in getPlaneData()
465 dataSize = mLockedBuffer->stride * (mLockedBuffer->height - 1) + in getPlaneData()
466 mLockedBuffer->width; in getPlaneData()
469 mLockedBuffer->chromaStride * in getPlaneData()
470 (mLockedBuffer->height / 2 - 1) + in getPlaneData()
471 mLockedBuffer->chromaStep * (mLockedBuffer->width / 2 - 1) + in getPlaneData()
477 cr = mLockedBuffer->data + in getPlaneData()
478 (mLockedBuffer->stride * mLockedBuffer->height); in getPlaneData()
481 ySize = mLockedBuffer->width * (mLockedBuffer->height - 1) + in getPlaneData()
482 mLockedBuffer->width; in getPlaneData()
483 cSize = mLockedBuffer->width * (mLockedBuffer->height / 2 - 1) + in getPlaneData()
484 mLockedBuffer->width - 1; in getPlaneData()
485 pData = (planeIdx == 0) ? mLockedBuffer->data in getPlaneData()
491 if (mLockedBuffer->stride % 16) { in getPlaneData()
493 mLockedBuffer->stride); in getPlaneData()
497 ySize = mLockedBuffer->stride * mLockedBuffer->height; in getPlaneData()
498 cStride = ALIGN(mLockedBuffer->stride / 2, 16); in getPlaneData()
499 cr = mLockedBuffer->data + ySize; in getPlaneData()
500 cSize = cStride * mLockedBuffer->height / 2; in getPlaneData()
503 pData = (planeIdx == 0) ? mLockedBuffer->data in getPlaneData()
508 if (mLockedBuffer->height % 2 != 0) { in getPlaneData()
509 ALOGE("YCBCR_P010: height (%d) should be a multiple of 2", mLockedBuffer->height); in getPlaneData()
513 if (mLockedBuffer->width <= 0) { in getPlaneData()
514 ALOGE("YCBCR_P010: width (%d) should be a > 0", mLockedBuffer->width); in getPlaneData()
518 if (mLockedBuffer->height <= 0) { in getPlaneData()
519 ALOGE("YCBCR_P010: height (%d) should be a > 0", mLockedBuffer->height); in getPlaneData()
523 if (mLockedBuffer->dataCb && mLockedBuffer->dataCr) { in getPlaneData()
524 pData = (planeIdx == 0) ? mLockedBuffer->data : in getPlaneData()
525 (planeIdx == 1) ? mLockedBuffer->dataCb : mLockedBuffer->dataCr; in getPlaneData()
528 cStride = mLockedBuffer->stride; in getPlaneData()
529 dataSize = cStride * (mLockedBuffer->height - 1) + mLockedBuffer->width * 2; in getPlaneData()
531 bytesPerPixel = mLockedBuffer->chromaStep; in getPlaneData()
532 cStride = mLockedBuffer->chromaStride; in getPlaneData()
533 dataSize = cStride * (mLockedBuffer->height / 2 - 1) + in getPlaneData()
534 bytesPerPixel * (mLockedBuffer->width / 2); in getPlaneData()
539 cStride = mLockedBuffer->stride * 2; in getPlaneData()
540 ySize = cStride * mLockedBuffer->height; in getPlaneData()
542 cb = mLockedBuffer->data + ySize; in getPlaneData()
545 pData = (planeIdx == 0) ? mLockedBuffer->data : (planeIdx == 1) ? cb : cr; in getPlaneData()
551 pData = mLockedBuffer->data; in getPlaneData()
552 dataSize = mLockedBuffer->stride * mLockedBuffer->height; in getPlaneData()
557 pData = mLockedBuffer->data; in getPlaneData()
559 mLockedBuffer->stride * mLockedBuffer->height * bytesPerPixel; in getPlaneData()
563 if (mLockedBuffer->height != 1) { in getPlaneData()
565 mLockedBuffer->height); in getPlaneData()
569 pData = mLockedBuffer->data; in getPlaneData()
575 pData = mLockedBuffer->data; in getPlaneData()
577 mLockedBuffer->stride * mLockedBuffer->height * bytesPerPixel; in getPlaneData()
581 if (mLockedBuffer->height != 1) { in getPlaneData()
583 mLockedBuffer->height); in getPlaneData()
586 pData = mLockedBuffer->data; in getPlaneData()
587 dataSize = mLockedBuffer->width; in getPlaneData()
591 if (mLockedBuffer->width % 4) { in getPlaneData()
592 ALOGE("Width is not multiple of 4 %d", mLockedBuffer->width); in getPlaneData()
595 if (mLockedBuffer->height % 2) { in getPlaneData()
596 ALOGE("Height is not multiple of 2 %d", mLockedBuffer->height); in getPlaneData()
599 if (mLockedBuffer->stride < (mLockedBuffer->width * 10 / 8)) { in getPlaneData()
601 mLockedBuffer->stride, mLockedBuffer->width * 10 / 8); in getPlaneData()
604 pData = mLockedBuffer->data; in getPlaneData()
605 dataSize = mLockedBuffer->stride * mLockedBuffer->height; in getPlaneData()
609 if (mLockedBuffer->width % 4) { in getPlaneData()
610 ALOGE("Width is not multiple of 4 %d", mLockedBuffer->width); in getPlaneData()
613 if (mLockedBuffer->height % 2) { in getPlaneData()
614 ALOGE("Height is not multiple of 2 %d", mLockedBuffer->height); in getPlaneData()
617 if (mLockedBuffer->stride < (mLockedBuffer->width * 12 / 8)) { in getPlaneData()
619 mLockedBuffer->stride, mLockedBuffer->width * 12 / 8); in getPlaneData()
622 pData = mLockedBuffer->data; in getPlaneData()
623 dataSize = mLockedBuffer->stride * mLockedBuffer->height; in getPlaneData()
629 pData = mLockedBuffer->data; in getPlaneData()
631 mLockedBuffer->stride * mLockedBuffer->height * bytesPerPixel; in getPlaneData()
636 pData = mLockedBuffer->data; in getPlaneData()
638 mLockedBuffer->stride * mLockedBuffer->height * bytesPerPixel; in getPlaneData()
643 pData = mLockedBuffer->data; in getPlaneData()
644 dataSize = mLockedBuffer->stride * mLockedBuffer->height * bytesPerPixel; in getPlaneData()