/external/renderscript-intrinsics-replacement-toolkit/renderscript-toolkit/src/main/java/com/google/android/renderscript/ |
D | Toolkit.kt | 81 sizeY: Int, in blend() 84 require(sourceArray.size >= sizeX * sizeY * 4) { in blend() 86 "$sizeX*$sizeY*4 < ${sourceArray.size}." in blend() 88 require(destArray.size >= sizeX * sizeY * 4) { in blend() 90 "$sizeX*$sizeY*4 < ${sourceArray.size}." in blend() 92 validateRestriction("blend", sizeX, sizeY, restriction) in blend() 94 nativeBlend(nativeHandle, mode.value, sourceArray, destArray, sizeX, sizeY, restriction) in blend() 180 sizeY: Int, in blur() 187 require(inputArray.size >= sizeX * sizeY * vectorSize) { in blur() 189 "$sizeX*$sizeY*$vectorSize < ${inputArray.size}." in blur() [all …]
|
/external/renderscript-intrinsics-replacement-toolkit/test-app/src/main/java/com/google/android/renderscript_test/ |
D | AllTests.kt | 34 val sizeY: Int, in <lambda>() constant in com.google.android.renderscript_test.TestLayout 121 commonLayoutsToTry.all { (sizeX, sizeY, restriction) -> in testBlend() method 122 testOneRandomBlend(timer, sizeX, sizeY, mode, restriction) in testBlend() 131 sizeY: Int, in testOneRandomBlend() 135 val sourceArray = randomByteArray(0x50521f0, sizeX, sizeY, 4) in testOneRandomBlend() 136 val destArray = randomByteArray(0x2932147, sizeX, sizeY, 4) in testOneRandomBlend() 144 renderscriptContext, mode, sourceArray, intrinsicDestArray, sizeX, sizeY, in testOneRandomBlend() 149 Toolkit.blend(mode, sourceArray, toolkitDestArray, sizeX, sizeY, restriction) in testOneRandomBlend() 154 referenceBlend(mode, sourceArray, referenceDestArray, sizeX, sizeY, restriction) in testOneRandomBlend() 160 println("blend $mode ($sizeX, $sizeY) $restriction") in testOneRandomBlend() [all …]
|
D | ReferenceYuvToRgb.kt | 26 fun referenceYuvToRgb(inputSignedArray: ByteArray, sizeX: Int, sizeY: Int, format: YuvFormat): Byte… in referenceYuvToRgb() 30 val outputArray = ByteArray(sizeX * sizeY * 4) in referenceYuvToRgb() 31 val output = Vector2dArray(outputArray.asUByteArray(), 4, sizeX, sizeY) in referenceYuvToRgb() 36 val startU = sizeX * sizeY + 1 in referenceYuvToRgb() 37 val startV = sizeX * sizeY in referenceYuvToRgb() 39 for (y in 0 until sizeY) { in referenceYuvToRgb() 63 val startU = strideX * sizeY in referenceYuvToRgb() 64 val startV = startU + strideUV * sizeY / 2 in referenceYuvToRgb() 66 for (y in 0 until sizeY) { in referenceYuvToRgb()
|
D | BufferUtils.kt | 102 data class Dimension(val sizeX: Int, val sizeY: Int, val sizeZ: Int) constant in com.google.android.renderscript_test.Dimension 149 val sizeY: Int in plus() constant in com.google.android.renderscript_test.Vector2dArray 163 fixedY = min(max(y, 0), sizeY - 1) in plus() 165 require(x in 0 until sizeX && y in 0 until sizeY) { "Out of bounds" } in plus() 173 require(x in 0 until sizeX && y in 0 until sizeY) { "Out of bounds" } in plus() 182 fun createSameSized() = Vector2dArray(UByteArray(values.size), vectorSize, sizeX, sizeY) in plus() 185 forEachCell(sizeX, sizeY, restriction, work) in plus() 198 val sizeY: Int constant in com.google.android.renderscript_test.FloatVector2dArray 212 fixedY = min(max(y, 0), sizeY - 1) in get() 214 require(x in 0 until sizeX && y in 0 until sizeY) { "Out of bounds" } in get() [all …]
|
D | ReferenceColorMatrix.kt | 28 sizeY: Int, in <lambda>() 34 val input = Vector2dArray(inputArray.asUByteArray(), inputVectorSize, sizeX, sizeY) in <lambda>() 35 val outputArray = ByteArray(sizeX * sizeY * paddedSize(outputVectorSize)) in <lambda>() 36 val output = Vector2dArray(outputArray.asUByteArray(), outputVectorSize, sizeX, sizeY) in <lambda>()
|
D | ReferenceHistogram.kt | 37 sizeY: Int, in <lambda>() 40 val input = Vector2dArray(inputArray.asUByteArray(), vectorSize, sizeX, sizeY) in <lambda>() 63 sizeY: Int, in referenceHistogramDot() 68 val input = Vector2dArray(inputArray.asUByteArray(), vectorSize, sizeX, sizeY) in referenceHistogramDot()
|
D | IntrinsicYuvToRgb.kt | 34 sizeY: Int, in intrinsicYuvToRgb() 43 inputBuilder.setY(sizeY) in intrinsicYuvToRgb() 54 outputBuilder.setY(sizeY) in intrinsicYuvToRgb() 57 val intrinsicOutArray = ByteArray(sizeX * sizeY * 4) in intrinsicYuvToRgb()
|
D | IntrinsicLut3d.kt | 35 sizeY: Int, in intrinsicLut3d() 47 builder.setY(sizeY) in intrinsicLut3d() 52 val intrinsicOutArray = ByteArray(sizeX * sizeY * 4) in intrinsicLut3d() 57 cubeTypeBuilder.setY(cubeSize.sizeY) in intrinsicLut3d() 100 cubeTypeBuilder.setY(cubeSize.sizeY) in intrinsicLut3d()
|
D | IntrinsicColorMatrix.kt | 38 sizeY: Int, in intrinsicColorMatrix() 52 inputBuilder.setY(sizeY) in intrinsicColorMatrix() 62 outputBuilder.setY(sizeY) in intrinsicColorMatrix() 67 val intrinsicOutArray = ByteArray(sizeX * sizeY * paddedSize(outputVectorSize)) in intrinsicColorMatrix()
|
D | ReferenceBlend.kt | 33 sizeY: Int, in <lambda>() 36 val source = Rgba2dArray(sourceArray, sizeX, sizeY) in <lambda>() 37 val dest = Rgba2dArray(destArray, sizeX, sizeY) in <lambda>()
|
D | ReferenceLut3d.kt | 29 sizeY: Int, in <lambda>() 33 val input = Vector2dArray(inputArray.asUByteArray(), 4, sizeX, sizeY) in <lambda>() 45 val maxIndex = Int4(cube.sizeX - 1, cube.sizeY - 1, cube.sizeZ - 1, 0) in lookup()
|
D | IntrinsicBlur.kt | 36 sizeY: Int, in intrinsicBlur() 50 builder.setY(sizeY) in intrinsicBlur() 56 val intrinsicOutArray = ByteArray(sizeX * sizeY * vectorSize) in intrinsicBlur()
|
D | IntrinsicHistogram.kt | 36 sizeY: Int, in intrinsicHistogram() 43 builder.setY(sizeY) in intrinsicHistogram() 111 sizeY: Int, in intrinsicHistogramDot() 119 builder.setY(sizeY) in intrinsicHistogramDot()
|
D | ReferenceBlur.kt | 32 sizeY: Int, in <lambda>() 42 val inputInFloat = FloatVector2dArray(inputValues, vectorSize, sizeX, sizeY) in <lambda>() 68 min(restriction.endY + radius, input.sizeY) in horizontalBlur()
|
D | IntrinsicConvolve.kt | 37 sizeY: Int, in intrinsicConvolve() 44 builder.setY(sizeY) in intrinsicConvolve() 49 val intrinsicOutArray = ByteArray(sizeX * sizeY * paddedSize(vectorSize)) in intrinsicConvolve()
|
D | ReferenceLut.kt | 29 sizeY: Int, in <lambda>() 33 val input = Vector2dArray(inputArray.asUByteArray(), 4, sizeX, sizeY) in <lambda>()
|
/external/renderscript-intrinsics-replacement-toolkit/renderscript-toolkit/src/main/cpp/ |
D | RenderScriptToolkit.h | 192 size_t sizeX, size_t sizeY, const Restriction* _Nullable restriction = nullptr); 222 void blur(const uint8_t* _Nonnull in, uint8_t* _Nonnull out, size_t sizeX, size_t sizeY, 315 size_t outputVectorSize, size_t sizeX, size_t sizeY, 349 size_t sizeY, const float* _Nonnull coefficients, 353 size_t sizeY, const float* _Nonnull coefficients, 380 void histogram(const uint8_t* _Nonnull in, int32_t* _Nonnull out, size_t sizeX, size_t sizeY, 411 void histogramDot(const uint8_t* _Nonnull in, int32_t* _Nonnull out, size_t sizeX, size_t sizeY, 441 void lut(const uint8_t* _Nonnull in, uint8_t* _Nonnull out, size_t sizeX, size_t sizeY, 474 void lut3d(const uint8_t* _Nonnull in, uint8_t* _Nonnull out, size_t sizeX, size_t sizeY, 532 void yuvToRgb(const uint8_t* _Nonnull in, uint8_t* _Nonnull out, size_t sizeX, size_t sizeY,
|
D | Convolve3x3.cpp | 40 void convolveU4(const uchar* pin, uchar* pout, size_t vectorSize, size_t sizeX, size_t sizeY, 48 Convolve3x3Task(const void* in, void* out, size_t vectorSize, size_t sizeX, size_t sizeY, in Convolve3x3Task() argument 50 : Task{sizeX, sizeY, vectorSize, false, restriction}, mIn{in}, mOut{out} { in Convolve3x3Task() 171 uint32_t currentY, size_t sizeX, size_t sizeY, in RsdCpuScriptIntrinsicConvolve3x3_kernelF() argument 176 uint32_t y1 = std::min((int32_t)currentY + 1, (int32_t)(sizeY - 1)); in RsdCpuScriptIntrinsicConvolve3x3_kernelF() 189 static void convolveU(const uchar* pin, uchar* pout, size_t vectorSize, size_t sizeX, size_t sizeY, in convolveU() argument 193 uint32_t y1 = std::min((int32_t)y + 1, (int32_t)(sizeY - 1)); in convolveU() 208 size_t sizeY, size_t startX, size_t startY, size_t endX, in convolveU4() argument 212 uint32_t y1 = std::min((int32_t)y + 1, (int32_t)(sizeY - 1)); in convolveU4() 246 size_t sizeY, const float* coefficients, in convolve3x3() argument [all …]
|
D | Histogram.cpp | 43 HistogramTask(const uint8_t* in, size_t sizeX, size_t sizeY, size_t vectorSize, 61 HistogramDotTask(const uint8_t* in, size_t sizeX, size_t sizeY, size_t vectorSize, 70 HistogramTask::HistogramTask(const uchar* in, size_t sizeX, size_t sizeY, size_t vectorSize, in HistogramTask() argument 72 : Task{sizeX, sizeY, vectorSize, true, restriction}, in HistogramTask() 152 HistogramDotTask::HistogramDotTask(const uchar* in, size_t sizeX, size_t sizeY, size_t vectorSize, in HistogramDotTask() argument 155 : Task{sizeX, sizeY, vectorSize, true, restriction}, mIn{in}, mSums(256 * threadCount, 0) { in HistogramDotTask() 246 void RenderScriptToolkit::histogram(const uint8_t* in, int32_t* out, size_t sizeX, size_t sizeY, in histogram() argument 249 if (!validRestriction(LOG_TAG, sizeX, sizeY, restriction)) { in histogram() 258 HistogramTask task(in, sizeX, sizeY, vectorSize, processor->getNumberOfThreads(), restriction); in histogram() 263 void RenderScriptToolkit::histogramDot(const uint8_t* in, int32_t* out, size_t sizeX, size_t sizeY, in histogramDot() argument [all …]
|
D | Convolve5x5.cpp | 41 void convolveU4(const uchar* pin, uchar* pout, size_t vectorSize, size_t sizeX, size_t sizeY, 49 Convolve5x5Task(const void* in, void* out, size_t vectorSize, size_t sizeX, size_t sizeY, in Convolve5x5Task() argument 51 : Task{sizeX, sizeY, vectorSize, false, restriction}, mIn{in}, mOut{out} { in Convolve5x5Task() 204 uint32_t y3 = std::min((int32_t)currentY + 1, sizeY); in kernelF4() 205 uint32_t y4 = std::min((int32_t)currentY + 2, sizeY); in kernelF4() 226 uint32_t y3 = std::min((int32_t)currentY + 1, sizeY); in RsdCpuScriptIntrinsicConvolve5x5_kernelF2() 227 uint32_t y4 = std::min((int32_t)currentY + 2, sizeY); in RsdCpuScriptIntrinsicConvolve5x5_kernelF2() 248 uint32_t y3 = std::min((int32_t)currentY + 1, sizeY); in RsdCpuScriptIntrinsicConvolve5x5_kernelF1() 249 uint32_t y4 = std::min((int32_t)currentY + 2, sizeY); in RsdCpuScriptIntrinsicConvolve5x5_kernelF1() 264 static void convolveU(const uchar* pin, uchar* pout, size_t vectorSize, size_t sizeX, size_t sizeY, in convolveU() argument [all …]
|
D | Lut.cpp | 40 LutTask(const uint8_t* input, uint8_t* output, size_t sizeX, size_t sizeY, const uint8_t* red, in LutTask() argument 43 : Task{sizeX, sizeY, 4, true, restriction}, in LutTask() 67 void RenderScriptToolkit::lut(const uint8_t* input, uint8_t* output, size_t sizeX, size_t sizeY, in lut() argument 71 if (!validRestriction(LOG_TAG, sizeX, sizeY, restriction)) { in lut() 76 LutTask task(input, output, sizeX, sizeY, red, green, blue, alpha, restriction); in lut()
|
D | Utils.cpp | 47 bool validRestriction(const char* tag, size_t sizeX, size_t sizeY, const Restriction* restriction) { in validRestriction() argument 57 if (restriction->startY >= sizeY && restriction->endY > sizeY) { in validRestriction() 60 tag, sizeY, restriction->startY, restriction->endY); in validRestriction()
|
D | YuvToRgb.cpp | 47 YuvToRgbTask(const uint8_t* input, uint8_t* output, size_t sizeX, size_t sizeY, in YuvToRgbTask() argument 49 : Task{sizeX, sizeY, 4, false, nullptr}, mOut{reinterpret_cast<uchar4*>(output)} { in YuvToRgbTask() 57 mInV = reinterpret_cast<const uchar*>(input + mStrideY * sizeY); 66 mInU = reinterpret_cast<const uchar*>(input + mStrideY * sizeY); 67 mInV = mInU + mStrideV * sizeY / 2; 234 size_t sizeY, YuvFormat format) { in yuvToRgb() argument 235 YuvToRgbTask task(input, output, sizeX, sizeY, format); in yuvToRgb()
|
D | Blur.cpp | 66 BlurTask(const uint8_t* in, uint8_t* out, size_t sizeX, size_t sizeY, size_t vectorSize, in BlurTask() argument 68 : Task{sizeX, sizeY, vectorSize, false, restriction}, in BlurTask() 140 static void OneVU4(uint32_t sizeY, float4* out, int32_t x, int32_t y, const uchar* ptrIn, in OneVU4() argument 147 validY = std::min(validY, (int)(sizeY - 1)); in OneVU4() 169 static void OneVU1(uint32_t sizeY, float *out, int32_t x, int32_t y, in OneVU1() argument 177 validY = std::min(validY, (int)(sizeY - 1)); in OneVU1() 523 void RenderScriptToolkit::blur(const uint8_t* in, uint8_t* out, size_t sizeX, size_t sizeY, in blur() argument 526 if (!validRestriction(LOG_TAG, sizeX, sizeY, restriction)) { in blur() 537 BlurTask task(in, out, sizeX, sizeY, vectorSize, processor->getNumberOfThreads(), radius, in blur()
|
D | Lut3d.cpp | 54 Lut3dTask(const uint8_t* input, uint8_t* output, size_t sizeX, size_t sizeY, in Lut3dTask() argument 57 : Task{sizeX, sizeY, 4, true, restriction}, in Lut3dTask() 166 void RenderScriptToolkit::lut3d(const uint8_t* input, uint8_t* output, size_t sizeX, size_t sizeY, in lut3d() argument 170 if (!validRestriction(LOG_TAG, sizeX, sizeY, restriction)) { in lut3d() 175 Lut3dTask task(input, output, sizeX, sizeY, cube, cubeSizeX, cubeSizeY, cubeSizeZ, restriction); in lut3d()
|