mTarget = NULL;\r
}\r
\r
- if(mOutputVideoWidth == 0) {\r
- mOutputVideoWidth = pFrameStr->uiFrameWidth;\r
- }\r
- if(mOutputVideoHeight == 0) {\r
- mOutputVideoHeight = pFrameStr->uiFrameHeight;\r
- }\r
+ outputBufferWidth = pFrameStr->uiFrameWidth;\r
+ outputBufferHeight = pFrameStr->uiFrameHeight;\r
\r
// Initialize the renderer\r
if(mTarget == NULL) {\r
mTarget = new PreviewRenderer(\r
- OMX_COLOR_FormatYUV420Planar, surface, mOutputVideoWidth, mOutputVideoHeight,\r
- mOutputVideoWidth, mOutputVideoHeight, 0);\r
+ OMX_COLOR_FormatYUV420Planar, surface, outputBufferWidth, outputBufferHeight,\r
+ outputBufferWidth, outputBufferHeight, 0);\r
if(mTarget == NULL) {\r
LOGE("renderPreviewFrame: cannot create PreviewRenderer");\r
return M4ERR_ALLOC;\r
\r
// Set the output YUV420 plane to be compatible with YV12 format\r
//In YV12 format, sizes must be even\r
- M4OSA_UInt32 yv12PlaneWidth = ((mOutputVideoWidth +1)>>1)<<1;\r
- M4OSA_UInt32 yv12PlaneHeight = ((mOutputVideoHeight+1)>>1)<<1;\r
+ M4OSA_UInt32 yv12PlaneWidth = ((outputBufferWidth +1)>>1)<<1;\r
+ M4OSA_UInt32 yv12PlaneHeight = ((outputBufferHeight+1)>>1)<<1;\r
\r
prepareYV12ImagePlane(planeOut, yv12PlaneWidth, yv12PlaneHeight,\r
(M4OSA_UInt32)outBufferStride, (M4VIFI_UInt8 *)outBuffer);\r