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.
  • Loading branch information
Ziyann authored and andi34 committed Sep 8, 2016
1 parent 9d246c9 commit 3a7aef9
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ LOCAL_SHARED_LIBRARIES:= \
LOCAL_CFLAGS += -Wno-multichar -Werror -Wall
LOCAL_CLANG := true

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
Original file line number Diff line number Diff line change
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 3a7aef9

Please sign in to comment.