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

Commit 51decd1e authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "sholes: allow setting of default colorformat to yuv422i" into gingerbread

parents f19d8571 ed92349c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -106,6 +106,10 @@ ifneq ($(filter qsd8k msm7k msm7625 msm7x30, $(TARGET_BOARD_PLATFORM)),)
        LOCAL_CFLAGS += -DUSE_QCOM_OMX_FIX
endif

ifeq ($(BOARD_USE_YUV422I_DEFAULT_COLORFORMAT),true)
	LOCAL_CFLAGS += -DUSE_YUV422I_DEFAULT_COLORFORMAT
endif

ifeq ($(BOARD_CAMERA_USE_GETBUFFERINFO),true)
        LOCAL_CFLAGS += -DUSE_GETBUFFERINFO
        LOCAL_C_INCLUDES += $(TOP)/hardware/qcom/media/mm-core/omxcore/inc
+8 −1
Original line number Diff line number Diff line
@@ -149,8 +149,15 @@ CameraSource::CameraSource(const sp<Camera> &camera)
    }

    const char *colorFormatStr = params.get(CameraParameters::KEY_VIDEO_FRAME_FORMAT);
    if (colorFormatStr == NULL)
    if (colorFormatStr == NULL) {
#ifdef USE_YUV422I_DEFAULT_COLORFORMAT
        // on some devices (such as sholes), the camera doesn't properly report what
        // color format it needs, so we need to force it as a default
        colorFormatStr = CameraParameters::PIXEL_FORMAT_YUV422I;
#else
        colorFormatStr = CameraParameters::PIXEL_FORMAT_YUV420SP;
#endif
    }

    int32_t colorFormat = getColorFormat(colorFormatStr);