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");
|
||||
vector<uint8_t> inputBitmap(WIDTH * HEIGHT * 3);
|
||||
base::ResampleImage24(const_cast<uint8_t *>(image), width, height,
|
||||
inputBitmap.data(), WIDTH, HEIGHT,
|
||||
base::ResampleImage24(image, width, height, inputBitmap.data(), WIDTH, HEIGHT,
|
||||
base::KernelTypeLanczos3);
|
||||
const auto input =
|
||||
rgb8ToRgbFloat(inputBitmap.data(), inputBitmap.size(), true);
|
||||
|
|
|
@ -53,7 +53,7 @@ Java_com_nkming_nc_1photos_plugin_image_1processor_Esrgan_inferNative(
|
|||
try {
|
||||
initOpenMp();
|
||||
auto aam = AAssetManager_fromJava(env, assetManager);
|
||||
Esrgan model(Esrgan{aam});
|
||||
Esrgan model(aam);
|
||||
RaiiContainer<jbyte> cImage(
|
||||
[&]() { return env->GetByteArrayElements(image, nullptr); },
|
||||
[&](jbyte *obj) {
|
||||
|
|
Loading…
Reference in a new issue