This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM8148 decoding capability - 4M pixel(2560 x 1600) h.264

Hi all,

I have been looking for the solution regarding how to decode 4M pixel on DM8148. As frar as I understand OpenMAX and Gstreamer, none of them do decode it. They have 1080P size limitation. So I have been investigation DUCATI library - Distributed Codec Engine, libdce because it seems a decoder plugin for openMAX on DM814x and it uses HDVICP2 H/W codec block. Basically I create two h264 video clips - 1M(1024 x 1024) and 4M(2560x1600) and feed them to OpenMAX decoder demo(~/ti-ezsdk_dm814x-evm_5_03_01_15/component-sources/omx_05_02_00_30/examples/ti/omx/demos/decode) which has all OMX_DEBUG_LEVEL enabled. Looking at the debug message using "loggerSMDump.out 0x9E400000 0x100000 all", there is no big different between them. However, the openMAX stops working and hangs without further log message. I doubt EZSDK memory configuratuion (http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map#Memory_Configuration_Flow) but I'm not 100% sure. 

What I want to know before going further with openMAX and ducati library is whether or not HDVICP2  has the limitation of video size. If it doesn't, the memory mapping on EZSDK should be changed for larger video (for instance 2560x1600). 

Thank you for any advice and information in advance.

Best Regards,

Seungsik Kwak.

  • HDVICP2 is not having limitation as such on video size for the mentioned resolution. The software codec block has limitation on  max resolution supported i.e, upto 2048x2048. Work is in progress to support higher resolutions as well. Can you please try once with 2Kx2K resolution?

    -Ramakrishna.

  • Hi Ramakrishna,

    Sorry that I miss your post. I appreicate your suggestion. My answer against your suggestion is "No, it doesn't work". Basically, I have created a bunch of h264 video files with different size - 720p, 1080p, 1600x1600, 1792x1792, 2560x1600 and so on. If it is greater than 1080p - width or height, gstreamer or openmax demo stop working and hung. I could check the data flow in openMAX only and can't have access to rest part - M3 process and HDVICP2 engine.

    If you have an idea or suggestion, please let me know. 

    Best Regards,

    Seungsik Kwak.

  • Hi,

    If you are using any any of hte HDVPSS open max components like VFPC, VFCC or VFDC than this may happen. Many paths of HDVPSS doesnt support more than 1920 line length.

    Regards,

    Hardik shah

  • Hi HardikShah,

    Well, I'm not sure but I have tested on decoder demo which is in ~/ti-ezsdk_dm814x-evm_5_03_01_15/component-sources/omx_05_02_00_30/examples/ti/omx/demos/decode, and it doesn't have HDVPSS, I believe. Also, some of my video clip have 1792x1792 and 1600x1600 and none of them work. The h264 files have been  captured by IP camera and 1080p works with DM8148. Basically, I don't mind writing my own openMAX application but I need to confirm that the latest EZSDK doesn't have video size limitation before doing that.

    Please let me know if I miss something or there is something else.

    Best Regards,

    Seungsik Kwak.

  • Hi,

    We dont have limitation for 1600X1600 certainly. But i have forwarded your query to EZSDK team they will reply back to you.

    Regards,

    Hardik shah

  • Hi,

    We can decode a 2048x2048 clip using 'decode' OMX example. However, the following code needs to be added to the end of the function Decode_SetParamPortDefinition in decode_test.c:

    {
      OMX_VIDEO_PARAM_STATICPARAMS tStaticParam;
      OMX_TEST_INIT_STRUCT_PTR (&tStaticParam, OMX_VIDEO_PARAM_STATICPARAMS);
     
      tStaticParam.nPortIndex = OMX_VIDDEC_OUTPUT_PORT;
     
      eError = OMX_GetParameter (pHandle, OMX_TI_IndexParamVideoStaticParams,
                                 &tStaticParam);
      /* setting I frame interval */
      printf( " level set is %d \n", tStaticParam.videoStaticParams.h264DecStaticParams.presetLevelIdc);
     
      tStaticParam.videoStaticParams.h264DecStaticParams.viddec3Params.maxHeight = width;
      tStaticParam.videoStaticParams.h264DecStaticParams.viddec3Params.maxWidth = ((height + 15) & 0xfffffff0);
      tStaticParam.videoStaticParams.h264DecStaticParams.presetLevelIdc = IH264VDEC_LEVEL5;
                            
      eError = OMX_SetParameter (pHandle, OMX_TI_IndexParamVideoStaticParams,
                                 &tStaticParam);
      }   

    Can you check with these changes and see if it works?

    Regards,

    Anirban


     

  • Hi Anirban,

    Thank you for the patch. Yes. it works with 1920x1920 but it doesn't work 2048x2048 image from same ip camera. I'm not sure the reason in detail. I'm going to check out h264 image. Thank you again.

    Regards,

    Seungsik Kwak. 

  • Greetings, 

    I am trying something very similar, except that I am using the OMX plugin for GStreamer. I have configured the DM8148 to decode an H.264 stream from a 3 megapixel IP camera using the following: 

    gst-launch -v --gst-debug-level=3 rtspsrc location="rtsp://10.42.0.33/live.sdp" ! rtph264depay ! h264parse access-unit=true ! omx_h264dec ! omx_scaler ! jpegenc ! multifilesink location="frame%d.jpg"

    I am simply trying to verify that the DM8148 can decode a 1536x1536 video. My board does not have any display devices connected to it, so I am simply generating some jpeg images. This pipeline appears to work properly if the video resolution is less than 1080x1080. That is, I did not have any troubles when decoded a 1056x1056 stream. Unfortunately, I got a seg fault when attempting to decode the full resolution stream (see attached). 

    I tried to implement the solution in this post, but was unable to figure out how to do this within the gstreamer plugin infrastructure. 

    Could someone please help me figure out how to get gstomx to decode high-resolution videos? 

    Thank you.

    Nick.