libcamera: pipeline: virtual: Don't use span iterator as pointer
Pointer to the contiguous data of a container is to be retrieved using the `data()` member function. Using `begin()` in contexts that require pointers is not correct as the iterator may be something entirely different. So use `data()` where applicable. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
This commit is contained in:
@@ -136,8 +136,9 @@ int ImageFrameGenerator::generateFrame(const Size &size, const FrameBuffer *buff
|
||||
|
||||
/* Write the scaledY and scaledUV to the mapped frame buffer */
|
||||
libyuv::NV12Copy(scaledFrameDatas_[frameIndex_].Y.get(), size.width,
|
||||
scaledFrameDatas_[frameIndex_].UV.get(), size.width, planes[0].begin(),
|
||||
size.width, planes[1].begin(), size.width,
|
||||
scaledFrameDatas_[frameIndex_].UV.get(), size.width,
|
||||
planes[0].data(), size.width,
|
||||
planes[1].data(), size.width,
|
||||
size.width, size.height);
|
||||
|
||||
/* Proceed to the next image every 4 frames */
|
||||
|
||||
@@ -53,8 +53,8 @@ int TestPatternGenerator::generateFrame(const Size &size,
|
||||
|
||||
/* Convert the template_ to the frame buffer */
|
||||
int ret = libyuv::ARGBToNV12(template_.get(), size.width * kARGBSize,
|
||||
planes[0].begin(), size.width,
|
||||
planes[1].begin(), size.width,
|
||||
planes[0].data(), size.width,
|
||||
planes[1].data(), size.width,
|
||||
size.width, size.height);
|
||||
if (ret != 0)
|
||||
LOG(Virtual, Error) << "ARGBToNV12() failed with " << ret;
|
||||
|
||||
Reference in New Issue
Block a user