File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ char ouputextradatafilename [] = "/data/extradata";
131131#define DEVICE_SCRATCH 64
132132#endif
133133
134+ #define C2D_SP_YBUF_ALIGN 16
134135/*
135136#ifdef _ANDROID_
136137 extern "C"{
@@ -8524,10 +8525,13 @@ OMX_ERRORTYPE omx_vdec::update_portdef(OMX_PARAM_PORTDEFINITIONTYPE *portDefn)
85248525 portDefn->format .video .nFrameWidth = drv_ctx.video_resolution .frame_width ;
85258526 portDefn->format .video .nStride = drv_ctx.video_resolution .stride ;
85268527 portDefn->format .video .nSliceHeight = drv_ctx.video_resolution .scan_lines ;
8527- if ((portDefn->format .video .eColorFormat == OMX_COLOR_FormatYUV420Planar) ||
8528- (portDefn->format .video .eColorFormat == OMX_COLOR_FormatYUV420SemiPlanar)) {
8528+ if (portDefn->format .video .eColorFormat == OMX_COLOR_FormatYUV420Planar) {
85298529 portDefn->format .video .nStride = drv_ctx.video_resolution .frame_width ;
85308530 portDefn->format .video .nFrameHeight = drv_ctx.video_resolution .frame_height ;
8531+ } else if (portDefn->format .video .eColorFormat == OMX_COLOR_FormatYUV420SemiPlanar) {
8532+ portDefn->format .video .nStride = drv_ctx.video_resolution .frame_width + (C2D_SP_YBUF_ALIGN-1 )&~(C2D_SP_YBUF_ALIGN-1 );
8533+ portDefn->format .video .nFrameHeight = drv_ctx.video_resolution .frame_height ;
8534+ portDefn->format .video .nSliceHeight = drv_ctx.video_resolution .frame_height ;
85318535 }
85328536 DEBUG_PRINT_LOW (" update_portdef: PortIndex = %u, Width = %d Height = %d "
85338537 " Stride = %u SliceHeight = %u output format = 0x%x, eColorFormat = 0x%x" ,
You can’t perform that action at this time.
0 commit comments