Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05856c2b authored by Steve Kondik's avatar Steve Kondik
Browse files

camera: Better fix for face detection score issue

 * Do this at the lower layer so that third-party apps don't have
   issus with the nonstandard score.

Change-Id: Ic012b092d2f47dbaab8cbfe2bd215b955800cc11
parent 3ba869fc
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -250,6 +250,10 @@ ifeq ($(WITH_MALLOC_LEAK_CHECK),true)
	LOCAL_CFLAGS += -DMALLOC_LEAK_CHECK
endif

ifeq ($(BOARD_FIX_FACE_DETECTION_SCORE),true)
    LOCAL_CFLAGS += -DFIX_FACE_DETECTION_SCORE
endif

LOCAL_MODULE:= libandroid_runtime

include $(BUILD_SHARED_LIBRARY)
+4 −0
Original line number Diff line number Diff line
@@ -384,7 +384,11 @@ void JNICameraContext::postMetadata(JNIEnv *env, int32_t msgType, camera_frame_m
        env->SetIntField(rect, fields.rect_right, metadata->faces[i].rect[2]);
        env->SetIntField(rect, fields.rect_bottom, metadata->faces[i].rect[3]);
        env->SetObjectField(face, fields.face_rect, rect);
#ifdef FIX_FACE_DETECTION_SCORE
        env->SetIntField(face, fields.face_score, (metadata->faces[i].score ? 0 : 100));
#else
        env->SetIntField(face, fields.face_score, metadata->faces[i].score);
#endif

#ifdef QCOM_HARDWARE
        jobject point1 = env->NewObject(mPointClass, fields.point_constructor);