Skip to content

Commit

Permalink
libstagefright: wfd: don't use intra macroblock refresh mode on omap4
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ziyann authored and andi34 committed Nov 11, 2016
1 parent 6e79793 commit 09a3abc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions media/libstagefright/wifi-display/Android.mk
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions media/libstagefright/wifi-display/source/Converter.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit 09a3abc

Please sign in to comment.