TIANDROID-11 (Deblocking Flag must ON and send to as parameter in the omx_videodec node for H263 and MPEG4)
RIO-6398 (Allow the setting of the deblocking flag for some TI OMX video decoders)
TIANDROID-17 (Incorrect DeBlocking logic)
RIO-6662 (Incorrect DeBlocking logic)
Enable deblocking for H263 and MPEG4 OMX decoders. If the deblocking call fails, the error will be ignored.
diff --git a/nodes/pvomxvideodecnode/src/pvmf_omx_videodec_node.cpp b/nodes/pvomxvideodecnode/src/pvmf_omx_videodec_node.cpp
index 2d0f1a7..7e89753 100644
--- a/nodes/pvomxvideodecnode/src/pvmf_omx_videodec_node.cpp
+++ b/nodes/pvomxvideodecnode/src/pvmf_omx_videodec_node.cpp
@@ -962,13 +962,12 @@
(0, "PVMFOMXVideoDecNode::NegotiateComponentParameters() Problem getting video port format"));
return false;
}
- // check if color format is valid
+ // check if color format is valid and set DeBlocking
if (VideoPortFormat.eCompressionFormat == OMX_VIDEO_CodingUnused)
{
// color format is valid, so read it
iOMXVideoColorFormat = VideoPortFormat.eColorFormat;
-
// Now set the format to confirm parameters
CONFIG_SIZE_AND_VERSION(VideoPortFormat);
@@ -1080,6 +1079,24 @@
return false;
}
+ if ((iOMXVideoCompressionFormat == OMX_VIDEO_CodingMPEG4) ||
+ (iOMXVideoCompressionFormat == OMX_VIDEO_CodingH263))
+ {
+ // Enable deblocking for these two video types
+ OMX_PARAM_DEBLOCKINGTYPE DeBlock;
+ CONFIG_SIZE_AND_VERSION(DeBlock);
+
+ DeBlock.nPortIndex = iOutputPortIndex;
+ DeBlock.bDeblocking = OMX_TRUE;
+
+ Err = OMX_SetParameter(iOMXDecoder, OMX_IndexParamCommonDeblocking, &DeBlock);
+ if (Err != OMX_ErrorNone)
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE,
+ (0, "PVMFOMXVideoDecNode::NegotiateComponentParameters() Problem setting deblocking flag"));
+ // Dont return false in this case. If enabling DeBlocking fails, just continue.
+ }
+ }
CONFIG_SIZE_AND_VERSION(VideoPortFormat);
VideoPortFormat.nPortIndex = iInputPortIndex;