Refactor: remove unnecessary code

This commit is contained in:
Ming Ming 2022-05-23 13:56:56 +08:00
parent 7a5282ad91
commit d96acbaefc
2 changed files with 2 additions and 3 deletions

View file

@ -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);

View file

@ -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) {