• Home
  • Raw
  • Download

Lines Matching refs:buf

164 void checkPixel(const CpuConsumer::LockedBuffer &buf,  in checkPixel()  argument
167 switch(buf.format) { in checkPixel()
170 uint16_t *bPtr = (uint16_t*)buf.data; in checkPixel()
171 bPtr += y * buf.stride + x; in checkPixel()
189 uint8_t *bPtr = (uint8_t*)buf.data; in checkPixel()
190 bPtr += y * buf.stride + x; in checkPixel()
197 uint16_t *bPtr = ((uint16_t*)buf.data) + y * buf.stride + x; in checkPixel()
204 uint8_t *bPtr = (uint8_t*)buf.data; in checkPixel()
205 bPtr += (y * buf.stride + x) * bytesPerPixel; in checkPixel()
213 ADD_FAILURE() << "Unknown format for check:" << buf.format; in checkPixel()
220 void fillYV12Buffer(uint8_t* buf, int w, int h, int stride);
224 void fillGreyscaleBuffer(T* buf, int w, int h, int stride, int bpp) { in fillGreyscaleBuffer() argument
239 buf[yuvTexOffsetY + (y * yuvTexStrideY) + x] = intensity; in fillGreyscaleBuffer()
253 void fillRgba8888Buffer(uint8_t* buf, int w, int h, int stride) in fillRgba8888Buffer() argument
269 buf[(y*stride + x)*bytesPerPixel + 0] = r; in fillRgba8888Buffer()
270 buf[(y*stride + x)*bytesPerPixel + 1] = g; in fillRgba8888Buffer()
271 buf[(y*stride + x)*bytesPerPixel + 2] = b; in fillRgba8888Buffer()
272 buf[(y*stride + x)*bytesPerPixel + 3] = 255; in fillRgba8888Buffer()
280 void fillBayerRawBuffer(uint8_t* buf, int w, int h, int stride) { in fillBayerRawBuffer() argument
281 ALOGVV("fillBayerRawBuffer: %p with %d x %d, stride %d", buf, w, h ,stride); in fillBayerRawBuffer()
286 uint16_t *bPtr1 = ((uint16_t*)buf) + stride*y; in fillBayerRawBuffer()
306 void checkGreyscaleBuffer(const CpuConsumer::LockedBuffer &buf) { in checkGreyscaleBuffer() argument
307 uint32_t w = buf.width; in checkGreyscaleBuffer()
308 uint32_t h = buf.height; in checkGreyscaleBuffer()
315 checkPixel(buf, 0, 0, 191); in checkGreyscaleBuffer()
316 checkPixel(buf, 1, 0, 191); in checkGreyscaleBuffer()
317 checkPixel(buf, 0, 1, 191); in checkGreyscaleBuffer()
318 checkPixel(buf, 1, 1, 191); in checkGreyscaleBuffer()
321 checkPixel(buf, blockWidth, 0, 63); in checkGreyscaleBuffer()
322 checkPixel(buf, blockWidth + 1, 0, 63); in checkGreyscaleBuffer()
323 checkPixel(buf, blockWidth, 1, 63); in checkGreyscaleBuffer()
324 checkPixel(buf, blockWidth + 1, 1, 63); in checkGreyscaleBuffer()
327 checkPixel(buf, 0, blockHeight, 63); in checkGreyscaleBuffer()
328 checkPixel(buf, 1, blockHeight, 63); in checkGreyscaleBuffer()
329 checkPixel(buf, 0, blockHeight + 1, 63); in checkGreyscaleBuffer()
330 checkPixel(buf, 1, blockHeight + 1, 63); in checkGreyscaleBuffer()
333 checkPixel(buf, blockWidth, blockHeight, 191); in checkGreyscaleBuffer()
334 checkPixel(buf, blockWidth + 1, blockHeight, 191); in checkGreyscaleBuffer()
335 checkPixel(buf, blockWidth, blockHeight + 1, 191); in checkGreyscaleBuffer()
336 checkPixel(buf, blockWidth + 1, blockHeight + 1, 191); in checkGreyscaleBuffer()
342 checkPixel(buf, w-1, h-1, pixelValue); in checkGreyscaleBuffer()
345 void checkRgba8888Buffer(const CpuConsumer::LockedBuffer &buf) { in checkRgba8888Buffer() argument
346 uint32_t w = buf.width; in checkRgba8888Buffer()
347 uint32_t h = buf.height; in checkRgba8888Buffer()
354 checkPixel(buf, 0, 0, 191, 63, 63); in checkRgba8888Buffer()
355 checkPixel(buf, 1, 0, 191, 63, 63); in checkRgba8888Buffer()
356 checkPixel(buf, 0, 1, 191, 63, 63); in checkRgba8888Buffer()
357 checkPixel(buf, 1, 1, 191, 63, 63); in checkRgba8888Buffer()
360 checkPixel(buf, blockWidth, 0, 63, 191, 63); in checkRgba8888Buffer()
361 checkPixel(buf, blockWidth + 1, 0, 63, 191, 63); in checkRgba8888Buffer()
362 checkPixel(buf, blockWidth, 1, 63, 191, 63); in checkRgba8888Buffer()
363 checkPixel(buf, blockWidth + 1, 1, 63, 191, 63); in checkRgba8888Buffer()
366 checkPixel(buf, 0, blockHeight, 63, 191, 63); in checkRgba8888Buffer()
367 checkPixel(buf, 1, blockHeight, 63, 191, 63); in checkRgba8888Buffer()
368 checkPixel(buf, 0, blockHeight + 1, 63, 191, 63); in checkRgba8888Buffer()
369 checkPixel(buf, 1, blockHeight + 1, 63, 191, 63); in checkRgba8888Buffer()
372 checkPixel(buf, blockWidth, blockHeight, 63, 63, 191); in checkRgba8888Buffer()
373 checkPixel(buf, blockWidth + 1, blockHeight, 63, 63, 191); in checkRgba8888Buffer()
374 checkPixel(buf, blockWidth, blockHeight + 1, 63, 63, 191); in checkRgba8888Buffer()
375 checkPixel(buf, blockWidth + 1, blockHeight + 1, 63, 63, 191); in checkRgba8888Buffer()
384 checkPixel(buf, w-1, h-1, r, g, b); in checkRgba8888Buffer()
388 void checkBayerRawBuffer(const CpuConsumer::LockedBuffer &buf) { in checkBayerRawBuffer() argument
389 uint32_t w = buf.width; in checkBayerRawBuffer()
390 uint32_t h = buf.height; in checkBayerRawBuffer()
397 checkPixel(buf, 0, 0, 1000, 200, 200); in checkBayerRawBuffer()
398 checkPixel(buf, 1, 0, 1000, 200, 200); in checkBayerRawBuffer()
399 checkPixel(buf, 0, 1, 1000, 200, 200); in checkBayerRawBuffer()
400 checkPixel(buf, 1, 1, 1000, 200, 200); in checkBayerRawBuffer()
403 checkPixel(buf, blockWidth, 0, 200, 200, 1000); in checkBayerRawBuffer()
404 checkPixel(buf, blockWidth + 1, 0, 200, 200, 1000); in checkBayerRawBuffer()
405 checkPixel(buf, blockWidth, 1, 200, 200, 1000); in checkBayerRawBuffer()
406 checkPixel(buf, blockWidth + 1, 1, 200, 200, 1000); in checkBayerRawBuffer()
409 checkPixel(buf, 0, blockHeight, 200, 1000, 200); in checkBayerRawBuffer()
410 checkPixel(buf, 1, blockHeight, 200, 1000, 200); in checkBayerRawBuffer()
411 checkPixel(buf, 0, blockHeight + 1, 200, 1000, 200); in checkBayerRawBuffer()
412 checkPixel(buf, 1, blockHeight + 1, 200, 1000, 200); in checkBayerRawBuffer()
415 checkPixel(buf, blockWidth, blockHeight, 1000, 1000, 1000); in checkBayerRawBuffer()
416 checkPixel(buf, blockWidth + 1, blockHeight, 1000, 1000, 1000); in checkBayerRawBuffer()
417 checkPixel(buf, blockWidth, blockHeight + 1, 1000, 1000, 1000); in checkBayerRawBuffer()
418 checkPixel(buf, blockWidth + 1, blockHeight + 1, 1000, 1000, 1000); in checkBayerRawBuffer()
426 checkPixel(buf, w-1, h-1, maxR, maxG, maxB); in checkBayerRawBuffer()
429 void checkAnyBuffer(const CpuConsumer::LockedBuffer &buf, int format) { in checkAnyBuffer() argument
432 checkBayerRawBuffer(buf); in checkAnyBuffer()
435 checkGreyscaleBuffer<uint8_t>(buf); in checkAnyBuffer()
438 checkGreyscaleBuffer<uint16_t>(buf); in checkAnyBuffer()
441 checkRgba8888Buffer(buf); in checkAnyBuffer()
446 void fillYV12BufferRect(uint8_t* buf, int w, int h, int stride,
449 void fillRGBA8Buffer(uint8_t* buf, int w, int h, int stride);
451 void fillRGBA8BufferSolid(uint8_t* buf, int w, int h, int stride, uint8_t r,
494 sp<GraphicBuffer> buf(new GraphicBuffer(anb, false)); in produceOneFrame() local
496 *stride = buf->getStride(); in produceOneFrame()
500 err = buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img)); in produceOneFrame()
508 fillBayerRawBuffer(img, params.width, params.height, buf->getStride()); in produceOneFrame()
512 buf->getStride(), /*bpp*/8); in produceOneFrame()
516 params.height, buf->getStride(), in produceOneFrame()
520 fillRgba8888Buffer(img, params.width, params.height, buf->getStride()); in produceOneFrame()
527 err = buf->unlock(); in produceOneFrame()
535 err = anw->queueBuffer(anw.get(), buf->getNativeBuffer(), -1); in produceOneFrame()