aboutsummaryrefslogtreecommitdiffstats
path: root/videocodec/OMXVideoDecoderVP9HWR.h
diff options
context:
space:
mode:
authorywan171 <yi.a.wang@intel.com>2014-10-22 10:42:18 +0800
committerPatrick Tjin <pattjin@google.com>2014-10-22 14:17:39 -0700
commitaa97fcc905746a68487a0122736c2d373bb81f4e (patch)
treec4ca80120024efb4995e4c830d7e751bb240b73a /videocodec/OMXVideoDecoderVP9HWR.h
parentbeb8f2079e8c43739ed356319caba47a7717e74a (diff)
downloadandroid_hardware_intel_common_omx-components-aa97fcc905746a68487a0122736c2d373bb81f4e.tar.gz
android_hardware_intel_common_omx-components-aa97fcc905746a68487a0122736c2d373bb81f4e.tar.bz2
android_hardware_intel_common_omx-components-aa97fcc905746a68487a0122736c2d373bb81f4e.zip
vp9HWR: fix free issue in multi-thread
Bug: 18080142 Change-Id: Ie17b80dda21a97712fa8dfa35dbf6671ffc15dcb Signed-off-by: ywan171 <yi.a.wang@intel.com>
Diffstat (limited to 'videocodec/OMXVideoDecoderVP9HWR.h')
-rw-r--r--videocodec/OMXVideoDecoderVP9HWR.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/videocodec/OMXVideoDecoderVP9HWR.h b/videocodec/OMXVideoDecoderVP9HWR.h
index 069b182..e55f54e 100644
--- a/videocodec/OMXVideoDecoderVP9HWR.h
+++ b/videocodec/OMXVideoDecoderVP9HWR.h
@@ -43,25 +43,19 @@ typedef unsigned int Display;
#define DECODE_WITH_GRALLOC_BUFFER
#define VPX_DECODE_BORDER 0
-// Make it global to be accessed by callback realloc func
#define MAX_NATIVE_BUFFER_COUNT 64
-vaapiMemId* extMIDs[MAX_NATIVE_BUFFER_COUNT];
-int extUtilBufferCount;
-int extMappedNativeBufferCount;
-unsigned int extNativeBufferSize;
-
-// These two strides are passed into libvpx to indicate the external buffer size
-// in case that video demension is smaller than these, libvpx inside should
-// ajust the start point of address of decoded y/v/u component.
-// This is especially for adaptive playback case. External buffer is always allocated
-// (or mapped from vaSurface) to a pre-set max size.
-int extActualBufferStride;
-int extActualBufferHeightStride;
class OMXVideoDecoderVP9HWR : public OMXVideoDecoderBase {
public:
OMXVideoDecoderVP9HWR();
virtual ~OMXVideoDecoderVP9HWR();
+ vaapiMemId* extMIDs[MAX_NATIVE_BUFFER_COUNT];
+ int extUtilBufferCount;
+ int extMappedNativeBufferCount;
+ unsigned int extNativeBufferSize;
+ // (or mapped from vaSurface) to a pre-set max size.
+ int extActualBufferStride;
+ int extActualBufferHeightStride;
protected:
virtual OMX_ERRORTYPE InitInputPortFormatSpecific(OMX_PARAM_PORTDEFINITIONTYPE *paramPortDefinitionInput);
@@ -98,7 +92,6 @@ protected:
friend int reallocVP9FrameBuffer(void *user_priv, unsigned int new_size, vpx_codec_frame_buffer_t *fb);
DECLARE_HANDLER(OMXVideoDecoderVP9HWR, ParamVideoVp9);
-
private:
OMX_ERRORTYPE initDecoder();
OMX_ERRORTYPE destroyDecoder();