/packages/apps/LegacyCamera/jni/feature_mos/src/mosaic/ |
D | ImageUtils.cpp | 28 void ImageUtils::rgba2yvu(ImageType out, ImageType in, int width, int height) in rgba2yvu() argument 32 ImageType vimg = yimg + width*height; in rgba2yvu() 33 ImageType uimg = vimg + width*height; in rgba2yvu() 37 for (int ij = 0; ij < width; ij++) { in rgba2yvu() 73 void ImageUtils::rgb2yvu(ImageType out, ImageType in, int width, int height) in rgb2yvu() argument 77 ImageType vimg = yimg + width*height; in rgb2yvu() 78 ImageType uimg = vimg + width*height; in rgb2yvu() 82 for (int ij = 0; ij < width; ij++) { in rgb2yvu() 116 ImageType ImageUtils::rgb2gray(ImageType in, int width, int height) in rgb2gray() argument 121 ImageType out = ImageUtils::allocateImage(width, height, 1); in rgb2gray() [all …]
|
D | Pyramid.cpp | 28 real width, real height, real border) in allocatePyramidPacked() argument 31 int lines, size = calcStorage(width, height, border2, levels, &lines); in allocatePyramidPacked() 42 curr->width = width; in allocatePyramidPacked() 45 curr->pitch = (real) (width + border2); in allocatePyramidPacked() 53 width >>= 1; in allocatePyramidPacked() 62 PyramidShort *PyramidShort::allocateImage(real width, real height, real border) in allocateImage() argument 67 sizeof(short) * (width + border2) * (height + border2), 1); in allocateImage() 72 img->width = width; in allocateImage() 75 img->pitch = (real) (width + border2); in allocateImage() 96 unsigned int PyramidShort::calcStorage(real width, real height, real border2, int levels, int *li… in calcStorage() argument [all …]
|
D | ImageUtils.h | 62 static void rgb2yvu(ImageType out, ImageType in, int width, int height); 64 static void rgba2yvu(ImageType out, ImageType in, int width, int height); 76 static void yvu2rgb(ImageType out, ImageType in, int width, int height); 77 static void yvu2bgr(ImageType out, ImageType in, int width, int height); 91 static ImageType rgb2gray(ImageType in, int width, int height); 92 static ImageType rgb2gray(ImageType out, ImageType in, int width, int height); 97 static ImageType readBinaryPPM(const char *filename, int &width, int &height); 102 …static void writeBinaryPPM(ImageType image, const char *filename, int width, int height, int numCh… 107 static ImageType allocateImage(int width, int height, int numChannels, short int border = 0); 114 static ImageType *imageTypeToRowPointers(ImageType out, int width, int height); [all …]
|
D | Blend.cpp | 46 this->width = frame_width; in initialize() 64 …m_pFrameYPyr = PyramidShort::allocatePyramidPacked(m_wb.nlevs, (unsigned short) width, (unsigned s… in initialize() 65 …m_pFrameUPyr = PyramidShort::allocatePyramidPacked(m_wb.nlevsC, (unsigned short) (width), (unsigne… in initialize() 66 …m_pFrameVPyr = PyramidShort::allocatePyramidPacked(m_wb.nlevsC, (unsigned short) (width), (unsigne… in initialize() 141 double halfwidth = width / 2.0; in runBlend() 164 FrameToMosaicRect(mb->width, mb->height, mb->trs, mb->brect); in runBlend() 171 FrameToMosaic(mb->trs, mb->width-1.0, mb->height-1.0, x2, y2); in runBlend() 172 FrameToMosaic(mb->trs, mb->width-1.0, 0.0, x3, y3); in runBlend() 246 "(%d, %d) vs (%d, %d)", width, height, Mwidth, Mheight); in runBlend() 259 memset(imgMos->Y.ptr[0], 255, (imgMos->Y.width * imgMos->Y.height)); in runBlend() [all …]
|
D | Mosaic.cpp | 56 int Mosaic::initialize(int blendingType, int stripType, int width, int height, int nframes, bool qu… in initialize() argument 68 this->width = width; in initialize() 82 … frames[i] = new MosaicFrame(this->width,this->height,false); // Do no allocate memory for YUV data in initialize() 95 LOGV("Initialize %d %d", width, height); in initialize() 96 LOGV("Frame width %d,%d", width, height); in initialize() 100 aligner->initialize(width, height,quarter_res,thresh_still); in initialize() 107 blender->initialize(blendingType, stripType, width, height); in initialize() 123 …imageYVU = ImageUtils::allocateImage(this->width, this->height, ImageUtils::IMAGE_TYPE_NUM_CHANNEL… in addFrameRGB() 124 ImageUtils::rgb2yvu(imageYVU, imageRGB, width, height); in addFrameRGB() 132 frames[frames_size] = new MosaicFrame(this->width,this->height,false); in addFrame() [all …]
|
D | MosaicTypes.h | 72 int width, height; variable 80 width = _width; 84 image = ImageUtils::allocateImage(width, height, ImageUtils::IMAGE_TYPE_NUM_CHANNELS); 100 return (image + (width*height)); in getV() 108 return (image + (width*height*2)); in getU() 116 ImageType U = image + (width*height); in getV() 117 return U[y*width+x]; in getV() 125 ImageType U = image + (width*height*2); in getU() 126 return U[y*width+x]; in getU() 139 double width; member
|
/packages/apps/Camera2/src/com/android/camera/util/ |
D | Size.java | 37 private final int width; field in Size 41 this.width = point.x; in Size() 47 this.width = size.getWidth(); in Size() 51 public Size(int width, int height) { in Size() argument 52 this.width = width; in Size() 57 return new Size(rectangle.width(), rectangle.height()); in of() 66 this.width = other.width; in Size() 71 this.width = size.width(); in Size() 76 return width; in getWidth() 83 public int width() { in width() method in Size [all …]
|
/packages/apps/Camera2/src/com/android/camera/ |
D | CaptureLayoutHelper.java | 224 public void onNonDecorWindowSizeChanged(int width, int height, int rotation) { in onNonDecorWindowSizeChanged() argument 225 mWindowWidth = width; in onNonDecorWindowSizeChanged() 244 private PositionConfiguration getPositionConfiguration(int width, int height, in getPositionConfiguration() argument 246 boolean landscape = width > height; in getPositionConfiguration() 252 config.mPreviewRect.set(0, 0, width, height); in getPositionConfiguration() 255 config.mBottomBarRect.set(width - mBottomBarOptimalHeight, 0, width, height); in getPositionConfiguration() 257 config.mBottomBarRect.set(0, height - mBottomBarOptimalHeight, width, height); in getPositionConfiguration() 265 int longerEdge = Math.max(width, height); in getPositionConfiguration() 266 int shorterEdge = Math.min(width, height); in getPositionConfiguration() 284 config.mBottomBarRect.set(width - barSize, height / 2 - previewShorterEdge / 2, in getPositionConfiguration() [all …]
|
/packages/apps/LegacyCamera/jni/ |
D | feature_mos_jni.cpp | 59 int width=0, height=0; variable 209 void YUV420toYVU24(ImageType yvu24, ImageType yuv420sp, int width, int height) in YUV420toYVU24() argument 211 int frameSize = width * height; in YUV420toYVU24() 220 int uvp = frameSize + (j >> 1) * width; in YUV420toYVU24() 221 for (int i = 0; i < width; i++, yp++) in YUV420toYVU24() 239 void YUV420toYVU24_NEW(ImageType yvu24, ImageType yuv420sp, int width, in YUV420toYVU24_NEW() argument 242 int frameSize = width * height; in YUV420toYVU24_NEW() 253 int uvp = frameSize + (j >> 1) * width; in YUV420toYVU24_NEW() 254 ovp = yvu24 + frameSize + j * width; in YUV420toYVU24_NEW() 259 for (int i = 0; i < width; i += 2) in YUV420toYVU24_NEW() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
D | AbstractSlotRenderer.java | 47 Texture content, int width, int height, int rotation) { in drawContent() argument 52 width = height = Math.min(width, height); in drawContent() 54 canvas.translate(width / 2, height / 2); in drawContent() 56 canvas.translate(-width / 2, -height / 2); in drawContent() 61 (float) width / content.getWidth(), in drawContent() 69 protected void drawVideoOverlay(GLCanvas canvas, int width, int height) { in drawVideoOverlay() argument 78 int s = Math.min(width, height) / 6; in drawVideoOverlay() 79 mVideoPlayIcon.draw(canvas, (width - s) / 2, (height - s) / 2, s, s); in drawVideoOverlay() 82 protected void drawPanoramaIcon(GLCanvas canvas, int width, int height) { in drawPanoramaIcon() argument 83 int iconSize = Math.min(width, height) / 6; in drawPanoramaIcon() [all …]
|
D | TiledScreenNail.java | 62 public TiledScreenNail(int width, int height) { in TiledScreenNail() argument 63 setSize(width, height); in TiledScreenNail() 75 private void setSize(int width, int height) { in setSize() argument 76 if (width == 0 || height == 0) { in setSize() 77 width = sMaxSide; in setSize() 80 float scale = Math.min(1, (float) sMaxSide / Math.max(width, height)); in setSize() 81 mWidth = Math.round(scale * width); in setSize() 114 public void updatePlaceholderSize(int width, int height) { in updatePlaceholderSize() argument 116 if (width == 0 || height == 0) return; in updatePlaceholderSize() 117 setSize(width, height); in updatePlaceholderSize() [all …]
|
D | AlbumSetSlotRenderer.java | 131 public int renderSlot(GLCanvas canvas, int index, int pass, int width, int height) { in renderSlot() argument 134 renderRequestFlags |= renderContent(canvas, entry, width, height); in renderSlot() 135 renderRequestFlags |= renderLabel(canvas, entry, width, height); in renderSlot() 136 renderRequestFlags |= renderOverlay(canvas, index, entry, width, height); in renderSlot() 141 GLCanvas canvas, int index, AlbumSetEntry entry, int width, int height) { in renderOverlay() argument 146 mCameraOverlay.draw(canvas, (width - dim) / 2, in renderOverlay() 151 drawPressedUpFrame(canvas, width, height); in renderOverlay() 158 drawPressedFrame(canvas, width, height); in renderOverlay() 161 drawSelectedFrame(canvas, width, height); in renderOverlay() 163 drawSelectedFrame(canvas, width, height); in renderOverlay() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/ |
D | BitmapPool.java | 127 private int getPoolKey(final int width, final int height) { in getPoolKey() argument 128 if (width > MAX_SUPPORTED_IMAGE_DIMENSION || height > MAX_SUPPORTED_IMAGE_DIMENSION) { in getPoolKey() 131 return (width << 16) | height; in getPoolKey() 139 private Bitmap findPoolBitmap(final int width, final int height) { in findPoolBitmap() argument 140 final int poolKey = getPoolKey(width, height); in findPoolBitmap() 167 private void assignPoolBitmap(final BitmapFactory.Options optionsTmp, final int width, in assignPoolBitmap() argument 172 optionsTmp.inBitmap = findPoolBitmap(width, height); in assignPoolBitmap() 188 final int width, final int height) { in decodeSampledBitmapFromResource() argument 191 Assert.isTrue(width > 0); in decodeSampledBitmapFromResource() 193 assignPoolBitmap(optionsTmp, width, height); in decodeSampledBitmapFromResource() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/media/ |
D | PoolableImageCache.java | 137 final int width, final int height) throws IOException { in decodeSampledBitmapFromInputStream() argument 138 if (width <= 0 || height <= 0) { in decodeSampledBitmapFromInputStream() 145 assignPoolBitmap(optionsTmp, width, height); in decodeSampledBitmapFromInputStream() 177 @NonNull final BitmapFactory.Options optionsTmp, final int width, in decodeByteArray() argument 179 if (width <= 0 || height <= 0) { in decodeByteArray() 187 assignPoolBitmap(optionsTmp, width, height); in decodeByteArray() 257 private Bitmap getReusableBitmapFromPool(final int width, final int height) { in getReusableBitmapFromPool() argument 259 final int poolKey = getPoolKey(width, height); in getReusableBitmapFromPool() 344 public Bitmap createOrReuseBitmap(final int width, final int height) { in createOrReuseBitmap() argument 345 return createOrReuseBitmap(width, height, Color.TRANSPARENT); in createOrReuseBitmap() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/ui/ |
D | ExportDialog.java | 110 mOriginalBounds = preset.finalGeometryRect(mOriginalBounds.width(), in onCreateView() 112 mRatio = mOriginalBounds.width() / (float) mOriginalBounds.height(); in onCreateView() 113 mWidthText.setText("" + mOriginalBounds.width()); in onCreateView() 115 mExportWidth = mOriginalBounds.width(); in onCreateView() 161 float scaleFactor = mExportWidth / (float) mOriginalBounds.width(); in onClick() 189 float originalArea = mCompressedBounds.width() * mCompressedBounds.height(); in updateSize() 205 int width = 1; in textChanged() local 211 width = Integer.parseInt(value); in textChanged() 212 if (width > mOriginalBounds.width()) { in textChanged() 213 width = mOriginalBounds.width(); in textChanged() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/ |
D | GLES11Canvas.java | 126 public void setSize(int width, int height) { in setSize() argument 127 Utils.assertTrue(width >= 0 && height >= 0); in setSize() 130 mScreenWidth = width; in setSize() 136 gl.glViewport(0, 0, width, height); in setSize() 139 GLU.gluOrtho2D(gl, 0, width, 0, height); in setSize() 175 public void drawRect(float x, float y, float width, float height, GLPaint paint) { in drawRect() argument 183 scale(width, height, 1); in drawRect() 211 public void fillRect(float x, float y, float width, float height, int color) { in fillRect() argument 217 scale(width, height, 1); in fillRect() 264 private void textureRect(float x, float y, float width, float height) { in textureRect() argument [all …]
|
/packages/apps/Camera2/jni/ |
D | jpegutilnative.cpp | 72 jint width, jint height, in Java_com_android_camera_util_JpegUtilNative_compressJpegFromYUV420pNative() argument 93 return Compress(width, height, // in Java_com_android_camera_util_JpegUtilNative_compressJpegFromYUV420pNative() 119 JNIEnv* env, jclass clazz __unused, jint width, jint height, jobject planeBuf, in Java_com_android_camera_util_JpegUtilNative_copyImagePlaneToBitmap() argument 130 char* dstPtr = &dst[y * width]; in Java_com_android_camera_util_JpegUtilNative_copyImagePlaneToBitmap() 131 for (int x = 0; x < width; x++) { in Java_com_android_camera_util_JpegUtilNative_copyImagePlaneToBitmap() 140 for (int x = 0; x < width; x++) { in Java_com_android_camera_util_JpegUtilNative_copyImagePlaneToBitmap() 143 dst[y * width + x] = src[srcX * pStride + rStride * srcY]; in Java_com_android_camera_util_JpegUtilNative_copyImagePlaneToBitmap() 149 for (int x = 0; x < width; x++) { in Java_com_android_camera_util_JpegUtilNative_copyImagePlaneToBitmap() 150 int srcX = width - 1 - x; in Java_com_android_camera_util_JpegUtilNative_copyImagePlaneToBitmap() 152 dst[y * width + x] = src[srcX * pStride + rStride * srcY]; in Java_com_android_camera_util_JpegUtilNative_copyImagePlaneToBitmap() [all …]
|
/packages/services/Car/cpp/evs/support_library/ |
D | StreamHandler.cpp | 241 return input.width == output.width in isSameFormat() 254 buffer.width, buffer.height, buffer.format, 1, buffer.usage, in allocate() 257 ALOGE("Error %d allocating %d x %d graphics buffer", result, buffer.width, in allocate() 284 output.width = input.width; in processFrame() 305 input.memHandle, GraphicBuffer::CLONE_HANDLE, input.width, in processFrame() 344 android::Rect(output.width, output.height), in processFrame() 361 .width = input.width, in processFrame() 368 .width = output.width, in processFrame() 390 mAnalyzeBuffer.width = input.width; in copyAndAnalyzeFrame() 411 input.memHandle, GraphicBuffer::CLONE_HANDLE, input.width, in copyAndAnalyzeFrame() [all …]
|
D | FormatConvert.cpp | 64 void copyNV21toRGB32(unsigned width, unsigned height, in copyNV21toRGB32() argument 71 unsigned strideLum = align<16>(width); in copyNV21toRGB32() 86 for (unsigned c = 0; c < width; c++) { in copyNV21toRGB32() 95 void copyYV12toRGB32(unsigned width, unsigned height, in copyYV12toRGB32() argument 103 unsigned strideLum = align<16>(width); in copyYV12toRGB32() 122 for (unsigned c = 0; c < width; c++) { in copyYV12toRGB32() 129 void copyYUYVtoRGB32(unsigned width, unsigned height, in copyYUYVtoRGB32() argument 135 const int srcRowPadding32 = srcStridePixels/2 - width/2; // 2 bytes per pixel, 4 bytes per word in copyYUYVtoRGB32() 136 const int dstRowPadding32 = dstStridePixels - width; // 4 bytes per pixel, 4 bytes per word in copyYUYVtoRGB32() 139 for (unsigned c = 0; c < width/2; c++) { in copyYUYVtoRGB32() [all …]
|
/packages/apps/Camera2/src/com/android/camera/settings/ |
D | ResolutionUtil.java | 111 return Integer.compare(size2.width() * size2.height(), in add() 112 size.width() * size.height()); in add() 115 maxPixels = sizes.get(0).width() * sizes.get(0).height(); in add() 172 return size.width() * size.height(); in area() 280 return aspectRatio.width() + "x" + aspectRatio.height(); in aspectRatioDescription() 291 BigInteger width = BigInteger.valueOf(aspectRatio.width()); in reduce() local 293 BigInteger gcd = width.gcd(height); in reduce() 294 int numerator = Math.max(width.intValue(), height.intValue()) / gcd.intValue(); in reduce() 295 int denominator = Math.min(width.intValue(), height.intValue()) / gcd.intValue(); in reduce() 307 return aspectRatio.width(); in aspectRatioNumerator() [all …]
|
/packages/services/Car/cpp/evs/apps/default/ |
D | FormatConvert.cpp | 61 void copyNV21toRGB32(unsigned width, unsigned height, in copyNV21toRGB32() argument 68 unsigned strideLum = align<16>(width); in copyNV21toRGB32() 83 for (unsigned c = 0; c < width; c++) { in copyNV21toRGB32() 92 void copyYV12toRGB32(unsigned width, unsigned height, in copyYV12toRGB32() argument 100 unsigned strideLum = align<16>(width); in copyYV12toRGB32() 119 for (unsigned c = 0; c < width; c++) { in copyYV12toRGB32() 126 void copyYUYVtoRGB32(unsigned width, unsigned height, in copyYUYVtoRGB32() argument 132 const int srcRowPadding32 = srcStridePixels/2 - width/2; // 2 bytes per pixel, 4 bytes per word in copyYUYVtoRGB32() 133 const int dstRowPadding32 = dstStridePixels - width; // 4 bytes per pixel, 4 bytes per word in copyYUYVtoRGB32() 136 for (unsigned c = 0; c < width/2; c++) { in copyYUYVtoRGB32() [all …]
|
/packages/apps/Gallery/src/com/android/camera/ |
D | HighlightView.java | 90 float width = mDrawRect.width(); in draw() local 92 path.addCircle(mDrawRect.left + (width / 2), in draw() 94 width / 2, in draw() 110 int width = mResizeDrawableDiagonal.getIntrinsicWidth(); in draw() local 114 * (mDrawRect.width() / 2D)); in draw() 116 + (mDrawRect.width() / 2) + d - width / 2; in draw() 189 int radius = mDrawRect.width() / 2; in getHit() 248 moveBy(dx * (mCropRect.width() / r.width()), in handleMotion() 260 float xDelta = dx * (mCropRect.width() / r.width()); in handleMotion() 302 if (dx > 0F && r.width() + 2 * dx > mImageRect.width()) { in growBy() [all …]
|
/packages/apps/Gallery2/src/com/android/photos/data/ |
D | GalleryBitmapPool.java | 71 private SparseArrayBitmapPool getPoolForDimensions(int width, int height) { in getPoolForDimensions() argument 72 int index = getPoolIndexForDimensions(width, height); in getPoolForDimensions() 80 private int getPoolIndexForDimensions(int width, int height) { in getPoolIndexForDimensions() argument 81 if (width <= 0 || height <= 0) { in getPoolIndexForDimensions() 84 if (width == height) { in getPoolIndexForDimensions() 88 if (width > height) { in getPoolIndexForDimensions() 90 max = width; in getPoolIndexForDimensions() 92 min = width; in getPoolIndexForDimensions() 127 public Bitmap get(int width, int height) { in get() argument 128 SparseArrayBitmapPool pool = getPoolForDimensions(width, height); in get() [all …]
|
/packages/services/Car/cpp/evs/sampleDriver/ |
D | bufferCopy.cpp | 49 const unsigned strideLum = align<16>(pDesc->width); in fillNV21FromNV21() 80 const unsigned strideLum = align<16>(pDesc->width); in fillNV21FromYUYV() 98 for (unsigned cellCol = 0; cellCol < pDesc->width/2; cellCol++) { in fillNV21FromYUYV() 133 pDesc->width, in fillRGBAFromYUYV() 144 pDesc->width, pDesc->height); in fillRGBAFromYUYV() 154 unsigned width = pDesc->width; in fillYUYVFromYUYV() local 163 memcpy(dst+r*dstStrideBytes, src+r*srcStrideBytes, width*2); in fillYUYVFromYUYV() 171 unsigned width = pDesc->width; in fillYUYVFromUYVY() local 178 const int srcRowPadding32 = srcStridePixels/2 - width/2; // 2 bytes per pixel, 4 bytes per word in fillYUYVFromUYVY() 179 const int dstRowPadding32 = dstStridePixels/2 - width/2; // 2 bytes per pixel, 4 bytes per word in fillYUYVFromUYVY() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/views/ |
D | ClipIconView.java | 155 ? rect.left - (dp.widthPx - lp.getMarginStart() - lp.width) in update() 161 float minSize = Math.min(lp.width, lp.height); in update() 162 float scaleX = rect.width() / minSize; in update() 186 ? rect.left - (dp.widthPx - parentLp.getMarginStart() - parentLp.width) in update() 197 mOutline.right = (int) (rect.width() / scale); in update() 221 float drawableScale = (isVerticalBarLayout ? mOutline.width() : mOutline.height()) in update() 227 int width = mFinalDrawableBounds.width(); in update() local 230 int diffX = isVerticalBarLayout ? (int) (((width * drawableScale) - width) / 2) in update() 290 final int originalWidth = lp.width; in setIcon() 308 lp.width = (int) Math.max(lp.width, lp.height * dp.aspectRatio); in setIcon() [all …]
|