diff options
| author | Shuo Liu <shuo.liu@intel.com> | 2011-11-23 04:35:22 +0800 |
|---|---|---|
| committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 22:02:45 -0700 |
| commit | 3e9f7696ef75665a44a3f9542e10f7a6be4de464 (patch) | |
| tree | 6fdde893b46914fb2f2cf5091e4dc378f9897465 /videocodec | |
| parent | 25d529882d13178cc3ed5b39844bf0348d3e1da9 (diff) | |
| download | android_hardware_intel_common_omx-components-3e9f7696ef75665a44a3f9542e10f7a6be4de464.tar.gz android_hardware_intel_common_omx-components-3e9f7696ef75665a44a3f9542e10f7a6be4de464.tar.bz2 android_hardware_intel_common_omx-components-3e9f7696ef75665a44a3f9542e10f7a6be4de464.zip | |
modify the output format for buffer id mode
buffer id mode output format is
VABufferIDPackage: devid, bufid, width, height
Change-Id: I26a12435d870fe272b06833a71386cecb77fa421
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: http://android.intel.com:8080/24915
Reviewed-by: buildbot <buildbot@intel.com>
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Gross, Mark <mark.gross@intel.com>
Diffstat (limited to 'videocodec')
| -rw-r--r-- | videocodec/Android.mk | 15 | ||||
| -rw-r--r-- | videocodec/OMXVideoDecoderBase.cpp | 13 | ||||
| -rw-r--r-- | videocodec/vabuffer.h | 27 |
3 files changed, 22 insertions, 33 deletions
diff --git a/videocodec/Android.mk b/videocodec/Android.mk index 31f2e09..a82473b 100644 --- a/videocodec/Android.mk +++ b/videocodec/Android.mk @@ -11,7 +11,8 @@ LOCAL_SHARED_LIBRARIES := \ libwrs_omxil_common \ libva_videodecoder \ liblog \ - libva + libva \ + libva-android LOCAL_C_INCLUDES := \ $(WRS_OMXIL_CORE_ROOT)/utils/inc \ @@ -40,7 +41,8 @@ LOCAL_SHARED_LIBRARIES := \ libwrs_omxil_common \ libva_videodecoder \ liblog \ - libva + libva \ + libva-android LOCAL_C_INCLUDES := \ $(WRS_OMXIL_CORE_ROOT)/utils/inc \ @@ -68,7 +70,8 @@ LOCAL_SHARED_LIBRARIES := \ libwrs_omxil_common \ libva_videodecoder \ liblog \ - libva + libva \ + libva-android LOCAL_C_INCLUDES := \ $(WRS_OMXIL_CORE_ROOT)/utils/inc \ @@ -97,7 +100,8 @@ LOCAL_SHARED_LIBRARIES := \ libwrs_omxil_common \ libva_videodecoder \ liblog \ - libva + libva \ + libva-android LOCAL_C_INCLUDES := \ $(WRS_OMXIL_CORE_ROOT)/utils/inc \ @@ -222,7 +226,8 @@ LOCAL_SHARED_LIBRARIES := \ libwrs_omxil_common \ libva_videodecoder \ liblog \ - libva + libva \ + libva-android LOCAL_C_INCLUDES := \ $(WRS_OMXIL_CORE_ROOT)/utils/inc \ diff --git a/videocodec/OMXVideoDecoderBase.cpp b/videocodec/OMXVideoDecoderBase.cpp index fc9fd45..0023766 100644 --- a/videocodec/OMXVideoDecoderBase.cpp +++ b/videocodec/OMXVideoDecoderBase.cpp @@ -18,7 +18,9 @@ #define LOG_TAG "OMXVideoDecoderBase" #include <utils/Log.h> #include "OMXVideoDecoderBase.h" -#include "vabuffer.h" +#include <va/va.h> +#include <va/va_android.h> +#include <va/vabuffer.h> static const char* VA_RAW_MIME_TYPE = "video/x-raw-va"; static const uint32_t VA_COLOR_FORMAT = 0x7FA00E00; @@ -379,6 +381,7 @@ OMX_ERRORTYPE OMXVideoDecoderBase::FillRenderBuffer(OMX_BUFFERHEADERTYPE *buffer if (!mBufferIDMode) { MapRawNV12(renderBuffer, buffer->pBuffer + buffer->nOffset, buffer->nFilledLen); } else { +#if 0 buffer->nFilledLen = sizeof(VABuffer); VABuffer *p = (VABuffer *)(buffer->pBuffer + buffer->nOffset); @@ -386,6 +389,14 @@ OMX_ERRORTYPE OMXVideoDecoderBase::FillRenderBuffer(OMX_BUFFERHEADERTYPE *buffer p->surface = renderBuffer->surface; p->display = renderBuffer->display; p->frame_structure = renderBuffer->scanFormat; +#else + buffer->nFilledLen = sizeof(VABufferIDPackage); + VABufferIDPackage *p = (VABufferIDPackage *)(buffer->pBuffer + buffer->nOffset); + + vaGetBufferID(renderBuffer->display, renderBuffer->surface, &p->devid, &p->bufid); + p->width = this->ports[OUTPORT_INDEX]->GetPortDefinition()->format.video.nFrameWidth; + p->height = this->ports[OUTPORT_INDEX]->GetPortDefinition()->format.video.nFrameHeight; +#endif } // TODO: set "RenderDone" in next "FillRenderBuffer" with the same OMX buffer header. diff --git a/videocodec/vabuffer.h b/videocodec/vabuffer.h deleted file mode 100644 index f3fab72..0000000 --- a/videocodec/vabuffer.h +++ /dev/null @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2009-2011 Intel Corporation. All rights reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -#ifndef __VA_BUFFER_H__ -#define __VA_BUFFER_H__ - -struct VABuffer { - VASurfaceID surface; - VADisplay display; - unsigned int frame_structure; -}; - -#endif /* __VA_BUFFER_H__ */ - |
