Przeglądaj źródła

OMX:video_dec_test: Fix that decode test can not process the input which resolution < 480x270

Signed-off-by: Som Qin <som.qin@starfivetech.com>
Som Qin 1 rok temu
rodzic
commit
c655fe8274
1 zmienionych plików z 8 dodań i 7 usunięć
  1. 8 7
      omx-il/tests/dec_test.c

+ 8 - 7
omx-il/tests/dec_test.c

@@ -426,6 +426,14 @@ int main(int argc, char **argv)
         return 0;
     }
     decodeTestContext->hComponentDecoder = hComponentDecoder;
+
+    OMX_PARAM_PORTDEFINITIONTYPE pInputPortDefinition;
+    OMX_INIT_STRUCTURE(pInputPortDefinition);
+    pInputPortDefinition.nPortIndex = 0;
+    OMX_GetParameter(hComponentDecoder, OMX_IndexParamPortDefinition, &pInputPortDefinition);
+    pInputPortDefinition.format.video.nFrameWidth = codecParameters->width;
+    pInputPortDefinition.format.video.nFrameHeight = codecParameters->height;
+    OMX_SetParameter(hComponentDecoder, OMX_IndexParamPortDefinition, &pInputPortDefinition);
      
     OMX_PARAM_PORTDEFINITIONTYPE pOutputPortDefinition;
     OMX_INIT_STRUCTURE(pOutputPortDefinition);
@@ -464,13 +472,6 @@ int main(int argc, char **argv)
 
     OMX_SendCommand(hComponentDecoder, OMX_CommandStateSet, OMX_StateIdle, NULL);
 
-    OMX_PARAM_PORTDEFINITIONTYPE pInputPortDefinition;
-    OMX_INIT_STRUCTURE(pInputPortDefinition);
-    pInputPortDefinition.nPortIndex = 0;
-    OMX_GetParameter(hComponentDecoder, OMX_IndexParamPortDefinition, &pInputPortDefinition);
-    pInputPortDefinition.format.video.nFrameWidth = codecParameters->width;
-    pInputPortDefinition.format.video.nFrameHeight = codecParameters->height;
-    OMX_SetParameter(hComponentDecoder, OMX_IndexParamPortDefinition, &pInputPortDefinition);
     /*Alloc input buffer*/
     OMX_U32 nInputWidth = codecParameters->width;
     OMX_U32 nInputHeight = codecParameters->height;