/frameworks/av/media/codec2/sfplugin/tests/ |
D | MediaCodec_sanity_test.cpp | 348 MediaImage2 *img = (MediaImage2*)imgBuf->data(); in TEST_P() local 349 EXPECT_EQ(img->mType, img->MEDIA_IMAGE_TYPE_YUV); in TEST_P() 350 EXPECT_EQ(img->mNumPlanes, 3u); in TEST_P() 351 EXPECT_EQ(img->mWidth, 320u); in TEST_P() 352 EXPECT_EQ(img->mHeight, 240u); in TEST_P() 353 EXPECT_EQ(img->mBitDepth, 8u); in TEST_P() 354 EXPECT_EQ(img->mBitDepthAllocated, 8u); in TEST_P() 361 EXPECT_EQ(img->mPlane[img->Y].mHorizSubsampling, 1u); in TEST_P() 362 EXPECT_EQ(img->mPlane[img->Y].mVertSubsampling, 1u); in TEST_P() 363 EXPECT_EQ(img->mPlane[img->U].mHorizSubsampling, 2u); in TEST_P() [all …]
|
/frameworks/rs/tests/java_api/VrDemo/src/com/example/android/rs/vr/engine/ |
D | bugdroid.rscript | 29 static float pillDistance(float3 p1, float3 p2, float3 img) { 31 if (dot(p2 - p1, img - p1) > 0 && dot(p1 - p2, img - p2) > 0) { 32 return length(cross(img - p1, img - p2)) / length(p2 - p1); 34 return min(distance(p1, img), distance(p2, img)); 37 static short pill(float3 p1, float3 p2, float rad, short max, float3 img) { 38 return (short) (max * sigmoid(pillDistance(p1, p2, img) - rad)); 41 static short cogPill(float3 p1, float3 p2, float rad, short max, float3 img) { 42 float3 vec = (p1 + p2) / 2 - img; 45 * sigmoid(pillDistance(p1, p2, img) - rad * (1 + angle / 2))); 48 static float cylinderDistance(float3 p1, float3 p2, float3 img) { [all …]
|
/frameworks/av/media/codec2/sfplugin/utils/ |
D | Codec2BufferUtils.cpp | 66 static status_t _ImageCopy(View &view, const MediaImage2 *img, ImagePixel *imgBase) { in _ImageCopy() argument 69 const size_t bpp = divUp(img->mBitDepthAllocated, 8u); in _ImageCopy() 73 imgBase + img->mPlane[i].mOffset; in _ImageCopy() 77 if (plane.colSampling != img->mPlane[i].mHorizSubsampling in _ImageCopy() 78 || plane.rowSampling != img->mPlane[i].mVertSubsampling in _ImageCopy() 79 || plane.allocatedDepth != img->mBitDepthAllocated in _ImageCopy() 87 uint32_t planeW = img->mWidth / plane.colSampling; in _ImageCopy() 88 uint32_t planeH = img->mHeight / plane.rowSampling; in _ImageCopy() 90 bool canCopyByRow = (plane.colInc == 1) && (img->mPlane[i].mColInc == 1); in _ImageCopy() 91 bool canCopyByPlane = canCopyByRow && (plane.rowInc == img->mPlane[i].mRowInc); in _ImageCopy() [all …]
|
D | Codec2BufferUtils.h | 75 status_t ImageCopy(uint8_t *imgBase, const MediaImage2 *img, const C2GraphicView &view); 86 status_t ImageCopy(C2GraphicView &view, const uint8_t *imgBase, const MediaImage2 *img); 106 bool IsYUV420(const MediaImage2 *img); 111 bool IsNV12(const MediaImage2 *img); 116 bool IsI420(const MediaImage2 *img);
|
/frameworks/rs/ |
D | rsGrallocConsumer.cpp | 112 AImage *img = mAcquiredBuffer[idx].mImg; in lockNextBuffer() local 114 ret = AImage_getFormat(img, &format); in lockNextBuffer() 117 __FUNCTION__, img, ret, format); in lockNextBuffer() 128 ret = AImage_getPlaneData(img, 0, &data, &dataLength); in lockNextBuffer() 131 __FUNCTION__, img, ret, data, dataLength); in lockNextBuffer() 136 ret = AImage_getTimestamp(img, ×tamp); in lockNextBuffer() 139 __FUNCTION__, img, ret); in lockNextBuffer() 144 ret = AImage_getPlaneRowStride(img, 0, &rowstride); in lockNextBuffer() 147 __FUNCTION__, img, ret, rowstride); in lockNextBuffer() 152 ret = AImage_getHardwareBuffer(img, &hardwareBuffer); in lockNextBuffer() [all …]
|
/frameworks/layoutlib/bridge/src/android/util/imagepool/ |
D | ImagePoolImpl.java | 69 final BufferedImage img = in acquire() local 71 if (img == null) { in acquire() 76 … if (img.getRaster().getDataBuffer().getDataType() == java.awt.image.DataBuffer.TYPE_INT) { in acquire() 77 Arrays.fill(((DataBufferInt)img.getRaster().getDataBuffer()).getData(), 0); in acquire() 81 new ImageImpl(w, h, img, metaData.mOrientation), in acquire() 83 img, in acquire() 97 @Nullable BufferedImage img, in prepareImage() argument 110 … if (!mImagePoolStats.fitsMaxCacheSize(img.getWidth(), img.getHeight(), in prepareImage() 118 existingBucket.offer(img); in prepareImage() 121 freedCallback.accept(img); in prepareImage()
|
D | ImagePoolHelper.java | 85 BufferedImage img = bucket.remove(); in getBufferedImage() local 86 while (img == null && !bucket.isEmpty()) { in getBufferedImage() 87 img = bucket.remove(); in getBufferedImage() 90 if (img == null && bucket.isEmpty()) { in getBufferedImage() 94 return img; in getBufferedImage()
|
D | Bucket.java | 50 public void offer(BufferedImage img) { in offer() argument 51 mBufferedImageRef.offer(new SoftReference<>(img)); in offer()
|
D | ImageImpl.java | 51 @NotNull BufferedImage img, in ImageImpl() argument 53 mImg = img; in ImageImpl()
|
/frameworks/av/media/libstagefright/omx/ |
D | OMXUtils.cpp | 370 const MediaImage2 &img = describeParams.sMediaImage; in IsFlexibleColorFormat() local 371 if (img.mType == MediaImage2::MEDIA_IMAGE_TYPE_YUV) { in IsFlexibleColorFormat() 372 if (img.mNumPlanes != 3 in IsFlexibleColorFormat() 373 || img.mPlane[img.Y].mHorizSubsampling != 1 in IsFlexibleColorFormat() 374 || img.mPlane[img.Y].mVertSubsampling != 1) { in IsFlexibleColorFormat() 379 if (img.mPlane[img.U].mHorizSubsampling == 2 in IsFlexibleColorFormat() 380 && img.mPlane[img.U].mVertSubsampling == 2 in IsFlexibleColorFormat() 381 && img.mPlane[img.V].mHorizSubsampling == 2 in IsFlexibleColorFormat() 382 && img.mPlane[img.V].mVertSubsampling == 2) { in IsFlexibleColorFormat() 384 if (img.mBitDepth <= 8) { in IsFlexibleColorFormat()
|
/frameworks/av/media/ndk/tests/ |
D | AImageReaderWindowHandleTest.cpp | 78 auto imageDeleter = [](AImage *img) { AImage_delete(img); }; in HandleImageAvailable() argument 79 std::unique_ptr<AImage, decltype(imageDeleter)> img(nullptr, imageDeleter); in HandleImageAvailable() local 84 img.reset(outImage); in HandleImageAvailable() 85 ASSERT_NE(img, nullptr); in HandleImageAvailable() 90 ret = AImage_getHardwareBuffer(img.get(), &hardwareBuffer); in HandleImageAvailable() 164 uint8_t* img = nullptr; in TEST_F() local 165 ASSERT_EQ(NO_ERROR, dequeuedBuffer->lock(kImageBufferUsage, (void**)(&img))); in TEST_F() 168 fillRGBA8Buffer(img, dequeuedBuffer->getWidth(), dequeuedBuffer->getHeight(), in TEST_F()
|
/frameworks/native/libs/gui/tests/ |
D | SurfaceTextureFBO_test.cpp | 47 uint8_t* img = nullptr; in TEST_F() local 48 buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img)); in TEST_F() 49 fillRGBA8BufferSolid(img, texWidth, texHeight, buf->getStride(), 0, 255, in TEST_F() 72 (void**)(&img))); in TEST_F() 73 fillRGBA8BufferSolid(img, texWidth, texHeight, buf->getStride(), 255, 0, in TEST_F()
|
D | SurfaceTextureGL_test.cpp | 48 uint8_t* img = nullptr; in TEST_F() local 49 buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img)); in TEST_F() 50 fillYV12Buffer(img, texWidth, texHeight, buf->getStride()); in TEST_F() 98 uint8_t* img = nullptr; in TEST_F() local 99 buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img)); in TEST_F() 100 fillYV12Buffer(img, texWidth, texHeight, buf->getStride()); in TEST_F() 162 uint8_t* img = nullptr; in TEST_F() local 163 buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img)); in TEST_F() 164 fillYV12BufferRect(img, texWidth, texHeight, buf->getStride(), crop); in TEST_F() 251 uint8_t* img = nullptr; in TEST_F() local [all …]
|
D | FillBuffer.cpp | 100 uint8_t* img = nullptr; in produceOneRGBA8Frame() local 102 (void**)(&img))); in produceOneRGBA8Frame() 103 fillRGBA8Buffer(img, buf->getWidth(), buf->getHeight(), buf->getStride()); in produceOneRGBA8Frame()
|
/frameworks/native/services/surfaceflinger/tests/hwc2/ |
D | Hwc2TestBuffer.cpp | 338 android_pixel_format_t format, uint32_t stride, uint8_t* img, uint8_t r, in setColor() argument 343 img[(y * stride + x) * 4 + 0] = r; in setColor() 344 img[(y * stride + x) * 4 + 1] = g; in setColor() 345 img[(y * stride + x) * 4 + 2] = b; in setColor() 346 img[(y * stride + x) * 4 + 3] = a; in setColor() 414 uint8_t* img; in generateBuffer() local 416 (void**)(&img)); in generateBuffer() 440 setColor(x, y, mFormat, stride, img, max, min, min, 255); in generateBuffer() 444 setColor(x, y, mFormat, stride, img, min, max, min, 255); in generateBuffer() 448 setColor(x, y, mFormat, stride, img, min, min, max, 255); in generateBuffer() [all …]
|
D | Hwc2TestPixelComparator.cpp | 25 uint8_t* img) const in getPixel() 27 uint32_t r = img[(y * stride + x) * 4 + 0]; in getPixel() 28 uint32_t g = img[(y * stride + x) * 4 + 1]; in getPixel() 29 uint32_t b = img[(y * stride + x) * 4 + 2]; in getPixel() 30 uint32_t a = img[(y * stride + x) * 4 + 3]; in getPixel()
|
/frameworks/av/media/codec2/components/aom/ |
D | C2SoftAomDec.cpp | 637 aom_image_t* img = aom_codec_get_frame(mCodecCtx, &iter); in outputBuffer() local 639 if (!img) return false; in outputBuffer() 641 if (img->d_w != mWidth || img->d_h != mHeight) { in outputBuffer() 642 mWidth = img->d_w; in outputBuffer() 643 mHeight = img->d_h; in outputBuffer() 660 CHECK(img->fmt == AOM_IMG_FMT_I420 || img->fmt == AOM_IMG_FMT_I42016); in outputBuffer() 664 if (img->fmt == AOM_IMG_FMT_I42016) { in outputBuffer() 695 (int)*(int64_t*)img->user_priv); in outputBuffer() 698 size_t srcYStride = img->stride[AOM_PLANE_Y]; in outputBuffer() 699 size_t srcUStride = img->stride[AOM_PLANE_U]; in outputBuffer() [all …]
|
/frameworks/native/vulkan/libvulkan/ |
D | swapchain.cpp | 1311 Swapchain::Image& img = swapchain->images[i]; in CreateSwapchainKHR() local 1315 &img.dequeue_fence); in CreateSwapchainKHR() 1330 img.buffer = buffer; in CreateSwapchainKHR() 1331 img.dequeued = true; in CreateSwapchainKHR() 1334 VkExtent3D{static_cast<uint32_t>(img.buffer->width), in CreateSwapchainKHR() 1335 static_cast<uint32_t>(img.buffer->height), in CreateSwapchainKHR() 1337 image_native_buffer.handle = img.buffer->handle; in CreateSwapchainKHR() 1338 image_native_buffer.stride = img.buffer->stride; in CreateSwapchainKHR() 1339 image_native_buffer.format = img.buffer->format; in CreateSwapchainKHR() 1340 image_native_buffer.usage = int(img.buffer->usage); in CreateSwapchainKHR() [all …]
|
/frameworks/av/media/codec2/components/vpx/ |
D | C2SoftVpxDec.cpp | 763 vpx_image_t *img = vpx_codec_get_frame(mCodecCtx, &iter); in outputBuffer() local 765 if (!img) return NOT_ENOUGH_DATA; in outputBuffer() 767 if (img->d_w != mWidth || img->d_h != mHeight) { in outputBuffer() 768 mWidth = img->d_w; in outputBuffer() 769 mHeight = img->d_h; in outputBuffer() 786 if(img->fmt != VPX_IMG_FMT_I420 && img->fmt != VPX_IMG_FMT_I42016) { in outputBuffer() 787 ALOGE("img->fmt %d not supported", img->fmt); in outputBuffer() 796 if (img->fmt == VPX_IMG_FMT_I42016) { in outputBuffer() 823 ((c2_cntr64_t *)img->user_priv)->peekll()); in outputBuffer() 826 size_t srcYStride = img->stride[VPX_PLANE_Y]; in outputBuffer() [all …]
|
/frameworks/base/core/jni/ |
D | android_hardware_camera2_legacy_LegacyCameraDevice.cpp | 257 uint8_t* img = NULL; in produceFrame() local 259 err = buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img)); in produceFrame() 262 uint8_t* yPlane = img; in produceFrame() 263 uint8_t* uPlane = img + height * width; in produceFrame() 285 uint8_t* img = NULL; in produceFrame() local 287 err = buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img)); in produceFrame() 301 uint8_t* yPlane = img; in produceFrame() 302 uint8_t* crPlane = img + static_cast<uint32_t>(height) * stride; in produceFrame() 330 int8_t* img = NULL; in produceFrame() local 345 err = buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img)); in produceFrame() [all …]
|
/frameworks/rs/tests/java_api/SSHealingBrush/src/rs/example/android/com/healingbrush/ |
D | FindRegion.java | 39 public FindRegion(float[] xy, Bitmap img) { in FindRegion() argument 41 int imgWidth = img.getWidth(); in FindRegion() 42 int imgHeight = img.getHeight(); in FindRegion()
|
/frameworks/rs/tests/java_api/HealingBrush/src/rs/example/android/com/healingbrush/ |
D | DrawView.java | 98 public Region getRegion(Bitmap img) { in getRegion() argument 105 ret = new Region(Arrays.copyOf(defaultPath, defaultPath.length), img); in getRegion() 107 ret = new Region(Arrays.copyOf(path, len), img); in getRegion()
|
D | FindRegion.java | 47 public FindRegion(float[] xy, Bitmap img) { in FindRegion() argument 50 int imgWidth = img.getWidth(); in FindRegion() 51 int imgHeight = img.getHeight(); in FindRegion() 65 img.getPixels(mPaste, 0, mRoiBounds.width(), in FindRegion()
|
/frameworks/base/core/tests/coretests/src/android/graphics/drawable/ |
D | IconTest.java | 282 for (Icon img : imgs) { in testParcel() 283 img.writeToParcel(parcel, 0); in testParcel() 284 L("used %d bytes parceling: %s", parcel.dataPosition() - pos, img); in testParcel() 291 Icon img = Icon.CREATOR.createFromParcel(parcel); in testParcel() local 292 L("test %d: read from parcel: %s", i, img); in testParcel() 296 final Drawable draw1 = img.loadDrawable(mContext); in testParcel() 298 fail("null drawable from img: " + img); in testParcel()
|
/frameworks/layoutlib/bridge/tests/src/android/util/imagepool/ |
D | ImagePoolImplTest.java | 57 BufferedImage img = getImg(img1); in testImageDispose() local 58 assertNotNull(img); in testImageDispose() 73 BufferedImage img = createImageAndReturnBufferedImage(pool, width, height, type, cd); in testImageDisposeFromFunction() local 74 assertNotNull(img); in testImageDisposeFromFunction()
|