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

Commit ed92349c authored by Austen Dicken's avatar Austen Dicken
Browse files

sholes: allow setting of default colorformat to yuv422i

the sholes libcamera does not properly report that it requires the use
of YUV422InterlacedYUYV color format in order to function.  as
stagefright defaults to YUV420SemiPlanar, this causes issues.  this
patch introduces and #ifdef that allows sholes (and anyone else who may
need it) to change the default color format

Change-Id: Ieec607dc62820e47a0e239d05356a0bfdf0ceed6
parent fc463c44
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);