• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » DaVinci™ Video Processors » DM816x, C6A816x and AM389x Processors Forum » How can I control the max size of NAL and the length of GOP ? on DM8168 ,omx or omtb. Thank you very much!
Share
DaVinci™ Video Processors
  • Forums
  • Announcements
Options
  • Subscribe via RSS

Forums

How can I control the max size of NAL and the length of GOP ? on DM8168 ,omx or omtb. Thank you very much!

This question is answered
neo guan
Posted by neo guan
on Dec 12 2011 05:37 AM
Prodigy235 points

Hi,

 How can I control the max size of NAL and the length of GOP ? 

I am developing on DM8168 , and I am a little familar with ezsdk,omx,and omtb,

but I really do not know how can I control the max size of NAL and the length of GOP.

Help me please, Thank you very much!

816x 8168 DM8168 NAL gop
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Vimal Jain
    Posted by Vimal Jain
    on Dec 13 2011 09:58 AM
    Expert6535 points

    Neo,

    EZSDK 5.03 provides user guide of h264 codec. Please refer to that for specific parameters settings. in OMX these can be set as static and dynamic parameter indices.

    http://processors.wiki.ti.com/index.php/OMX_VENC

    regards

    Vimal

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • neo guan
    Posted by neo guan
    on Dec 20 2011 09:17 AM
    Prodigy235 points

    Hi Vimal Jain,

      Thank you for your help.

      I had control the Intra period succeed.

       But How can I control the Max Nal size? Is that supported by ezsdk5.03?

        I had try many way to control the max size of NAL ,but seems not work.waiting for your help.

       thank you very much.

    neo guan.

    8168 nal size
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Deepak Poddar
    Posted by Deepak Poddar
    on Dec 21 2011 03:18 AM
    Intellectual1405 points

    you have select sliceMode as '2' ( which will enable bytes based slices)

    sliceUnitSize as your need of maximum NAL size.

     

    for this you will have to set encoding preset other than '3' and sliceCodingParams as '1'

     

    regards

    Deepak Poddar

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • neo guan
    Posted by neo guan
    on Dec 22 2011 08:10 AM
    Verified Answer
    Verified by neo guan
    Prodigy235 points

    Hi,Deepak Poddar

        Thank you for your help.

        This is my code:

    --------------------------------------

        eError = OMX_GetParameter (pHandle, OMX_TI_IndexParamVideoDynamicParams,
                                 &tDynParams);
     
      tDynParams.videoDynamicParams.h264EncDynamicParams.sliceCodingParams.sliceCodingPreset = IH264_SLICECODING_USERDEFINED;


      tDynParams.videoDynamicParams.h264EncDynamicParams.sliceCodingParams.sliceMode         = IH264_SLICEMODE_MBUNIT;


      tDynParams.videoDynamicParams.h264EncDynamicParams.sliceCodingParams.sliceUnitSize         = 1400;



      tDynParams.videoDynamicParams.h264EncDynamicParams.videnc2DynamicParams.intraFrameInterval = 30000;

      eError = OMX_SetParameter (pHandle, OMX_TI_IndexParamVideoDynamicParams,
                                 &tDynParams);

    -------------------------------------------------------------------------------------------------

      but it seems like that: only the intraFrameInterval works , the paramater about slice doesn't work , where is my mistake?

    could you tell me  some detial about  the config process .

    and I didn't understand "sliceCodingParams as 1", how can I follow these words,and understand this sentence,

    please help me.

    Thank you very much.

    Neo Guan

    dm8168 slice size
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • neo guan
    Posted by neo guan
    on Dec 22 2011 08:27 AM
    Prodigy235 points

    sorry let me correct my copy mistake.the real word i wanna say is like following.

    Hi,Deepak Poddar

        Thank you for your help.

        This is my code:

    --------------------------------------

        eError = OMX_GetParameter (pHandle, OMX_TI_IndexParamVideoDynamicParams,
                                 &tDynParams);
     
      tDynParams.videoDynamicParams.h264EncDynamicParams.sliceCodingParams.sliceCodingPreset = IH264_SLICECODING_USERDEFINED;


      tDynParams.videoDynamicParams.h264EncDynamicParams.sliceCodingParams.sliceMode         =IH264_SLICEMODE_BYTES ;


      tDynParams.videoDynamicParams.h264EncDynamicParams.sliceCodingParams.sliceUnitSize         = 1400;



      tDynParams.videoDynamicParams.h264EncDynamicParams.videnc2DynamicParams.intraFrameInterval = 30000;

      eError = OMX_SetParameter (pHandle, OMX_TI_IndexParamVideoDynamicParams,
                                 &tDynParams);

    -------------------------------------------------------------------------------------------------

      but it seems like that: only the intraFrameInterval works , the paramater about slice doesn't work , where is my mistake?

    could you tell me  some detial about  the config process .

    and I didn't understand "sliceCodingParams as 1", how can I follow these words,and understand this sentence,

    please help me.

    Thank you very much.

    Neo Guan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Deepak Poddar
    Posted by Deepak Poddar
    on Dec 22 2011 23:02 PM
    Intellectual1405 points

    I meant sliceCodingPreset only as '1'. sliceCodingParams was my mistake. 

     

    Now what happens, does codec runs or it throws error ?

     

    If throws error, then please note that bytes based slices is supported only in progressive, IPPP, CAVLC sequences. 

     

    if it runs and you dont see the slices as per your expectation then , please check encodingPreset value, it has to be '3'.

     

    regards

    Deepak Poddar

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • neo guan
    Posted by neo guan
    on Dec 23 2011 01:47 AM
    Prodigy235 points

    Hi, Deepak Poddar

     This is my code:
     --------------------------------
      OMX_INIT_PARAM (&tDynParams);
      tDynParams.nPortIndex = OMX_VIDENC_OUTPUT_PORT;
      eError = OMX_GetParameter (pHandle, OMX_TI_IndexParamVideoDynamicParams,
                                 &tDynParams);
      tDynParams.videoDynamicParams.h264EncDynamicParams.sliceCodingParams.sliceCodingPreset = IH264_SLICECODING_USERDEFINED;
      printf("YY,1st sliceCodingPreset-->%d,\n",tDynParams.videoDynamicParams.h264EncDynamicParams.sliceCodingParams.sliceCodingPreset);

      tDynParams.videoDynamicParams.h264EncDynamicParams.sliceCodingParams.sliceMode         = IH264_SLICEMODE_BYTES;
      printf("YY,1st sliceMode-->%d,\n",tDynParams.videoDynamicParams.h264EncDynamicParams.sliceCodingParams.sliceMode);

      tDynParams.videoDynamicParams.h264EncDynamicParams.sliceCodingParams.sliceUnitSize         =  1400;
      printf("YY,1st sliceMode-->%d,\n",tDynParams.videoDynamicParams.h264EncDynamicParams.sliceCodingParams.sliceUnitSize);

      /* setting I frame interval */
      tDynParams.videoDynamicParams.h264EncDynamicParams.videnc2DynamicParams.intraFrameInterval = 30000;//90;
                           
      eError = OMX_SetParameter (pHandle, OMX_TI_IndexParamVideoDynamicParams,
                                 &tDynParams);
      eError = OMX_GetParameter (pHandle, OMX_TI_IndexParamVideoDynamicParams,
                                 &tDynParams);
     
      printf("YY,2rd Get sliceCodingPreset-->%d,\n",tDynParams.videoDynamicParams.h264EncDynamicParams.sliceCodingParams.sliceCodingPreset);
      printf("YY,2rd Get sliceMode-->%d,\n",tDynParams.videoDynamicParams.h264EncDynamicParams.sliceCodingParams.sliceMode);
      printf("YY,2rd sliceMode-->%d,\n",tDynParams.videoDynamicParams.h264EncDynamicParams.sliceCodingParams.sliceUnitSize);
     --------------------------------
      The result is when I check the h264 file with elecard, I can't find picture split, in other words, one picture one slice, and the NAL size is still bigger than 1400(I set this size);
      but the GOP length is what I set.
     
      The omx component never throw errors, the omx component accept the parameters ,
      1. I run OMX_GetParameter  after OMX_SetParameter,the parameters returned is what I configured ;
      2. and the OMX_SetParameter return 0;
     
      but the parameter I set about slice never works.
     
      I don't know where is my mistake;
     
      please help me.
     
      Thank you very much;
     
      Neo Guan
     

    8168
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • sami sawas
    Posted by sami sawas
    on Aug 06 2012 08:03 AM
    Prodigy40 points

    Hi Deepak,

    I'm facing the same problem. The codec still doesn't limit the size of the NAL Units. I tried to set the encodingPreset to 3 and it didn't help.

    Any Ideas?

    Thanks,

    Sami

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use