mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Refactor: remove unnecessary code
This commit is contained in:
parent
7a5282ad91
commit
d96acbaefc
2 changed files with 2 additions and 3 deletions
|
@ -135,8 +135,7 @@ vector<uint8_t> DeepLab3::infer(const uint8_t *image, const size_t width,
|
||||||
|
|
||||||
LOGI(TAG, "[infer] Convert bitmap to input");
|
LOGI(TAG, "[infer] Convert bitmap to input");
|
||||||
vector<uint8_t> inputBitmap(WIDTH * HEIGHT * 3);
|
vector<uint8_t> inputBitmap(WIDTH * HEIGHT * 3);
|
||||||
base::ResampleImage24(const_cast<uint8_t *>(image), width, height,
|
base::ResampleImage24(image, width, height, inputBitmap.data(), WIDTH, HEIGHT,
|
||||||
inputBitmap.data(), WIDTH, HEIGHT,
|
|
||||||
base::KernelTypeLanczos3);
|
base::KernelTypeLanczos3);
|
||||||
const auto input =
|
const auto input =
|
||||||
rgb8ToRgbFloat(inputBitmap.data(), inputBitmap.size(), true);
|
rgb8ToRgbFloat(inputBitmap.data(), inputBitmap.size(), true);
|
||||||
|
|
|
@ -53,7 +53,7 @@ Java_com_nkming_nc_1photos_plugin_image_1processor_Esrgan_inferNative(
|
||||||
try {
|
try {
|
||||||
initOpenMp();
|
initOpenMp();
|
||||||
auto aam = AAssetManager_fromJava(env, assetManager);
|
auto aam = AAssetManager_fromJava(env, assetManager);
|
||||||
Esrgan model(Esrgan{aam});
|
Esrgan model(aam);
|
||||||
RaiiContainer<jbyte> cImage(
|
RaiiContainer<jbyte> cImage(
|
||||||
[&]() { return env->GetByteArrayElements(image, nullptr); },
|
[&]() { return env->GetByteArrayElements(image, nullptr); },
|
||||||
[&](jbyte *obj) {
|
[&](jbyte *obj) {
|
||||||
|
|
Loading…
Reference in a new issue