Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable video post processing after hw decoding #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TianmiChen
Copy link
Contributor

This change is to enable video post processing after
hw decoding. The final output is 2X scaling of input.

Tracked-On:
Signed-off-by: Chen, Tianmi [email protected]

@TianmiChen
Copy link
Contributor Author

TianmiChen commented Sep 26, 2021

@dyang23 , @YuanjunHuang, could you please take a little time to have a review? Thanks!

mfx_omx_defs.mk Outdated
@@ -97,6 +97,9 @@ ifneq ($(filter $(MFX_ANDROID_VERSION), MFX_Q MFX_R),)
MFX_OMX_CFLAGS += -DENABLE_READ_SEI
endif

# Enable vpp for decoder
MFX_OMX_CFLAGS += -DENABLE_DECVPP
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we disable this feature by default, I am afraid it may impact celadon performance, enable it if some product want it in product level?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I will refine it and disable it by default. Thanks Dong. :)

mfx_res = MFX_ERR_MORE_SURFACE;
}

//ALOGI("%s, id = %d, returned %d", __func__, i, mfx_res);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this for debug, can we remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, will remove it.

m_MfxVideoParams.NumExtParam--;
}
MFX_OMX_LOG_INFO_IF(g_OmxLogLevel, "Decoder initialized with sts %d", mfx_res);
ALOGI("%s. Decoder initialized with sts %d", __func__, mfx_res);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LOGI() can be remove.


MFX_OMX_ZERO_MEMORY(m_vppParam);
m_vppParam.AsyncDepth = 1;
m_vppParam.IOPattern = MFX_IOPATTERN_IN_VIDEO_MEMORY | MFX_IOPATTERN_OUT_VIDEO_MEMORY;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output buffer will be used by android framework/APP, I am not sure whether there is the case in which it will output system memory?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that should be considered. I will refine this PR.

Thanks,

mfxU32 i = 0;
for (i = 0; i < DECODE_MAX_SRF_NUM; i++)
{
if (false == m_DecInterSrf[i].Data.Locked)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Data.Locked" is a interger type but not a bool type, I suggest compare it with constant,or non-computing as (!m_DecInterSrf[i].Data.Locked)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will change it. :)

MFX_OMX_AUTO_TRACE_FUNC();
mfxStatus sts = MFX_ERR_NONE;
mfxSyncPoint syncp;
//ALOGI("%s, in_srf=%p, out_srf=%p", __func__, in_srf, out_srf);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug log?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, only for debug. :)

Copy link
Contributor

@dyang23 dyang23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments inlined.
Thanks,

This patch adds the android 12 related build
flags for MFX

Tracked-On: OAM-100026
Signed-off-by: Tanuj Tekriwal <[email protected]>
@sysopenci sysopenci added the Stale Stale label for inactive open prs label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Stale label for inactive open prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants