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

Commit 09a3abc3 authored by Ziyan's avatar Ziyan Committed by Andreas Blaesius
Browse files

libstagefright: wfd: don't use intra macroblock refresh mode on omap4

Most, if not all OMAP4 Ducatis doesn't support intra macroblock refresh mode,
causing the encoder to fail initializing.
This patch disables intra macroblock refresh mode for wifi display on omap4.

Note:
Ideally, the decoder shouldn't fail if intra macroblock refresh mode can't be
configured. However, that would trick higher layers into thinking that it's on,
because they set that parameter.
As of now, this mode seems to only ever be used for wifi display.

Change-Id: I9696af8f22db82cc436a351e4d93bf7323588f43
parent 6e79793c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -30,6 +30,10 @@ LOCAL_SHARED_LIBRARIES:= \
        libui                           \
        libutils                        \

ifeq ($(TARGET_BOARD_PLATFORM),omap4)
LOCAL_CFLAGS += -DBOARD_NO_INTRA_MACROBLOCK_MODE_SUPPORT
endif

LOCAL_MODULE:= libstagefright_wfd

LOCAL_MODULE_TAGS:= optional
+2 −0
Original line number Diff line number Diff line
@@ -173,8 +173,10 @@ status_t Converter::initEncoder() {
        mOutputFormat->setInt32("frame-rate", 30);
        mOutputFormat->setInt32("i-frame-interval", 15);  // Iframes every 15 secs

#ifndef BOARD_NO_INTRA_MACROBLOCK_MODE_SUPPORT
        // Configure encoder to use intra macroblock refresh mode
        mOutputFormat->setInt32("intra-refresh-mode", OMX_VIDEO_IntraRefreshCyclic);
#endif

        int width, height, mbs;
        if (!mOutputFormat->findInt32("width", &width)