aboutsummaryrefslogtreecommitdiff
path: root/base/src/componentbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'base/src/componentbase.cpp')
-rwxr-xr-xbase/src/componentbase.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/base/src/componentbase.cpp b/base/src/componentbase.cpp
index f7ff029..fc8905b 100755
--- a/base/src/componentbase.cpp
+++ b/base/src/componentbase.cpp
@@ -29,6 +29,7 @@
#include <queue.h>
#include <workqueue.h>
#include <OMX_IndexExt.h>
+#include <OMX_IntelVideoExt.h>
#include <HardwareAPI.h>
//#define LOG_NDEBUG 0
@@ -589,6 +590,11 @@ OMX_ERRORTYPE ComponentBase::CBaseSetParameter(
p->nBufferSize = p->format.video.nFrameWidth * p->format.video.nFrameHeight *3/2;
}
+ if ((p->format.video.eColorFormat == OMX_COLOR_FormatUnused) ||
+ (p->format.video.eColorFormat == OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar) ||
+ (p->format.video.eColorFormat == OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar_Tiled))
+ p->format.video.eColorFormat = GetOutputColorFormat(p->format.video.nFrameWidth);
+
ret = port->SetPortDefinition(p, false);
if (ret != OMX_ErrorNone) {
return ret;
@@ -1888,6 +1894,12 @@ OMX_ERRORTYPE ComponentBase::FreePorts(void)
return OMX_ErrorNone;
}
+OMX_COLOR_FORMATTYPE ComponentBase::GetOutputColorFormat(int width)
+{
+ LOGD("%s: width = %d", __func__, width);
+ return OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar;
+}
+
/* buffer processing */
/* implement WorkableInterface */
void ComponentBase::Work(void)