Hi,
I'm trying to get the OMX H264 decoder component to support dynamic input size changes.
The decoder is configured for 1080p and can play back 1080p H264 files ok. However, I have a 720p file it also needs to be able to play back without restarting the app.
The output from the decoder goes through a DEI component and is scaled to fit on a 1080p display.
When the input size is changed to 720p I reconfigured the DEI as follows:
OMX_INIT_PARAM (&chResolutionNew); // TODO do these numbers depend on the decode frame size ? chResolutionNew.Frm0Width = width; chResolutionNew.Frm0Height = height; chResolutionNew.Frm0Pitch = pAppData->nDecStride; chResolutionNew.Frm1Width = 0; chResolutionNew.Frm1Height = 0; chResolutionNew.Frm1Pitch = 0; chResolutionNew.FrmStartX = startx; chResolutionNew.FrmStartY = starty; chResolutionNew.FrmCropWidth = cropWidth; chResolutionNew.FrmCropHeight = cropHeight; chResolutionNew.eDir = OMX_DirInput; chResolutionNew.nChId = 0; eError = OMX_SetConfig (pAppData->pDei2Handle, (OMX_INDEXTYPE) OMX_TI_IndexConfigVidChResolution, &chResolutionNew); if (eError != OMX_ErrorNone) { ERROR ("failed to set input channel resolution\n"); }
The problem is that the 720p decoded frames appear like this with the remaining part of the image appearing as noise:
How do I properly reconfigure the decoder and DEI to support dynamic H264 input size changes? I need this to happen without restarting the application.
Thanks,
Steven