Lines Matching refs:mLockedBuffer
36 mReader(reader), mFormat(format), mUsage(usage), mBuffer(buffer), mLockedBuffer(nullptr), in AImage()
67 mLockedBuffer = nullptr; in close()
172 if (mLockedBuffer != nullptr) { in lockImage()
189 mLockedBuffer = std::move(lockedBuffer); in lockImage()
205 if (mLockedBuffer == nullptr) { in unlockImageIfLocked()
226 if (mLockedBuffer == nullptr) { in getPlanePixelStride()
243 int32_t fmt = mLockedBuffer->flexFormat; in getPlanePixelStride()
246 *pixelStride = (planeIdx == 0) ? 1 : mLockedBuffer->chromaStep; in getPlanePixelStride()
286 if (mLockedBuffer == nullptr) { in getPlaneRowStride()
303 int32_t fmt = mLockedBuffer->flexFormat; in getPlaneRowStride()
306 *rowStride = (planeIdx == 0) ? mLockedBuffer->stride in getPlaneRowStride()
307 : mLockedBuffer->chromaStride; in getPlaneRowStride()
310 *rowStride = mLockedBuffer->width; in getPlaneRowStride()
313 if (mLockedBuffer->stride % 16) { in getPlaneRowStride()
314 ALOGE("Stride %d is not 16 pixel aligned!", mLockedBuffer->stride); in getPlaneRowStride()
317 *rowStride = (planeIdx == 0) ? mLockedBuffer->stride in getPlaneRowStride()
318 : ALIGN(mLockedBuffer->stride / 2, 16); in getPlaneRowStride()
323 *rowStride = mLockedBuffer->stride; in getPlaneRowStride()
326 if (mLockedBuffer->stride % 16) { in getPlaneRowStride()
328 mLockedBuffer->stride); in getPlaneRowStride()
331 *rowStride = mLockedBuffer->stride; in getPlaneRowStride()
338 if (mLockedBuffer->stride % 16) { in getPlaneRowStride()
340 mLockedBuffer->stride); in getPlaneRowStride()
343 *rowStride = mLockedBuffer->stride * 2; in getPlaneRowStride()
346 *rowStride = mLockedBuffer->stride * 2; in getPlaneRowStride()
350 *rowStride = mLockedBuffer->stride * 4; in getPlaneRowStride()
354 *rowStride = mLockedBuffer->stride * 3; in getPlaneRowStride()
369 if (mLockedBuffer == nullptr) { in getJpegSize()
374 uint32_t width = mLockedBuffer->width; in getJpegSize()
375 uint8_t* jpegBuffer = mLockedBuffer->data; in getJpegSize()
403 if (mLockedBuffer == nullptr) { in getPlaneData()
426 int32_t fmt = mLockedBuffer->flexFormat; in getPlaneData()
430 pData = (planeIdx == 0) ? mLockedBuffer->data in getPlaneData()
431 : (planeIdx == 1) ? mLockedBuffer->dataCb in getPlaneData()
432 : mLockedBuffer->dataCr; in getPlaneData()
435 dataSize = mLockedBuffer->stride * (mLockedBuffer->height - 1) + in getPlaneData()
436 mLockedBuffer->width; in getPlaneData()
439 mLockedBuffer->chromaStride * in getPlaneData()
440 (mLockedBuffer->height / 2 - 1) + in getPlaneData()
441 mLockedBuffer->chromaStep * (mLockedBuffer->width / 2 - 1) + in getPlaneData()
447 cr = mLockedBuffer->data + in getPlaneData()
448 (mLockedBuffer->stride * mLockedBuffer->height); in getPlaneData()
451 ySize = mLockedBuffer->width * (mLockedBuffer->height - 1) + in getPlaneData()
452 mLockedBuffer->width; in getPlaneData()
453 cSize = mLockedBuffer->width * (mLockedBuffer->height / 2 - 1) + in getPlaneData()
454 mLockedBuffer->width - 1; in getPlaneData()
455 pData = (planeIdx == 0) ? mLockedBuffer->data in getPlaneData()
461 if (mLockedBuffer->stride % 16) { in getPlaneData()
463 mLockedBuffer->stride); in getPlaneData()
467 ySize = mLockedBuffer->stride * mLockedBuffer->height; in getPlaneData()
468 cStride = ALIGN(mLockedBuffer->stride / 2, 16); in getPlaneData()
469 cr = mLockedBuffer->data + ySize; in getPlaneData()
470 cSize = cStride * mLockedBuffer->height / 2; in getPlaneData()
473 pData = (planeIdx == 0) ? mLockedBuffer->data in getPlaneData()
480 pData = mLockedBuffer->data; in getPlaneData()
481 dataSize = mLockedBuffer->stride * mLockedBuffer->height; in getPlaneData()
486 pData = mLockedBuffer->data; in getPlaneData()
488 mLockedBuffer->stride * mLockedBuffer->height * bytesPerPixel; in getPlaneData()
492 if (mLockedBuffer->height != 1) { in getPlaneData()
494 mLockedBuffer->height); in getPlaneData()
498 pData = mLockedBuffer->data; in getPlaneData()
504 pData = mLockedBuffer->data; in getPlaneData()
506 mLockedBuffer->stride * mLockedBuffer->height * bytesPerPixel; in getPlaneData()
510 if (mLockedBuffer->height != 1) { in getPlaneData()
512 mLockedBuffer->height); in getPlaneData()
515 pData = mLockedBuffer->data; in getPlaneData()
516 dataSize = mLockedBuffer->width; in getPlaneData()
520 if (mLockedBuffer->width % 4) { in getPlaneData()
521 ALOGE("Width is not multiple of 4 %d", mLockedBuffer->width); in getPlaneData()
524 if (mLockedBuffer->height % 2) { in getPlaneData()
525 ALOGE("Height is not multiple of 2 %d", mLockedBuffer->height); in getPlaneData()
528 if (mLockedBuffer->stride < (mLockedBuffer->width * 10 / 8)) { in getPlaneData()
530 mLockedBuffer->stride, mLockedBuffer->width * 10 / 8); in getPlaneData()
533 pData = mLockedBuffer->data; in getPlaneData()
534 dataSize = mLockedBuffer->stride * mLockedBuffer->height; in getPlaneData()
538 if (mLockedBuffer->width % 4) { in getPlaneData()
539 ALOGE("Width is not multiple of 4 %d", mLockedBuffer->width); in getPlaneData()
542 if (mLockedBuffer->height % 2) { in getPlaneData()
543 ALOGE("Height is not multiple of 2 %d", mLockedBuffer->height); in getPlaneData()
546 if (mLockedBuffer->stride < (mLockedBuffer->width * 12 / 8)) { in getPlaneData()
548 mLockedBuffer->stride, mLockedBuffer->width * 12 / 8); in getPlaneData()
551 pData = mLockedBuffer->data; in getPlaneData()
552 dataSize = mLockedBuffer->stride * mLockedBuffer->height; in getPlaneData()
558 pData = mLockedBuffer->data; in getPlaneData()
560 mLockedBuffer->stride * mLockedBuffer->height * bytesPerPixel; in getPlaneData()
565 pData = mLockedBuffer->data; in getPlaneData()
567 mLockedBuffer->stride * mLockedBuffer->height * bytesPerPixel; in getPlaneData()
572 pData = mLockedBuffer->data; in getPlaneData()
573 dataSize = mLockedBuffer->stride * mLockedBuffer->height * bytesPerPixel; in getPlaneData()