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.

DM36x H.264 codec -SVC-T

I am using DM36x H.264 Encoder as SVC-T Encoder. (Ver:02.30.00.04)

numTemporalLayers = 3 and  svcSyntaxEnable = 1

This is working upto a resolution of 1280x960. Beyong that it is throwing up cmem errors.

E.g: For  2048x1536 it gives an error like  "CMEM Error: getPool: Failed to get a pool fitting a size 20680704"

When the Encoder is used in NON-SVC mode , it is fine. My question is when SVC is enabled, Is the algorithm requires extra CMEM memory?

Pls point out to some documents. I already went through  SVC-T using DM36x H.264 codec  app note

Regards

JK

 

  • JK,

    You are right, SVC-T will need more memory. Please see the notes section of datasheet below table 12.

    -- Memtab 5 size will be twice of those mentioned above for SVC-T

    regards

    Yashwant

  • Dear Yashwant,

    After doubling the size of memtab 5,  it is working.

    I have another question. When SVC-T is enabled, the bitrate is approximately halved than it was earlier(when SVC is disabled), for the same framerate .

    Due to this the quality is far less than expected. I am using CVBR mode and max bitrate set is 10 mbps (rcAlgo=3).

    To put it in other words, I have 2 cases. One with SVC disabled and framerate set is 20 fps. I am getting appr 6.2 mbps(1920x1080)

    Next I enabled SVC and I am collecting all the layers (so fps will be 20) . But this time the bitrate is around just 3.5 mbps.

    This is true with other cases too (10fps,5 fps and 2.5 fps). Why is it so? It looks the quantization limits are changing when SVC is enabled.

    Pls help

     

  • Yashwant,

    A few more observations about the above issue. The following dynamic params remain the same whether SVC is enabled or not.

    pDynParams->rcQMaxI=48
    pDynParams->rcQMax=48
    pDynParams->rcQMinI=0
    pDynParams->rcQMin=28

    But the internal QP values (obtained via H264Visa  tool) are quite different under both situations.

    Internal QP value when SVC disabled = 28

    Internal QP value when SVC enabled = 33

    Not able to understand why this change happens.

    Regards

    JK

     

  • Hi Jayakrishnan,

    There should not so much deviation in bitrate. What is the targetBitrate? Could you share both the streams?

  • Hi Adithya

    Pls  see the attached   files. targetBitrate is 10mbps. I did test  for other resolutions also. (1280x1024, 800x450)The quality of the video is not god compared to  the corresponding non-svc case. However the bitrate of the svc  encoder is more  under such cases. This is confusing. Is there any other factor responsible for low quality?

    (the non_svc video  is attached in the next post)

    Regards

    JK

  • Pls find the attached file

  • Hi Jayakrishnan,

    Could you share all the encoder parameters (create time and dynamic parameters)? The achieved bitrate seems to be much less than target bitrate of 10mbps

  • Hi Adithya

    Static parameters

    (pParams->videncParams).encodingPreset = XDM_HIGH_SPEED;

    rateControlPreset = IVIDEO_USER_DEFINED;

    (pParams->videncParams).maxHeight = 1920;

    (pParams->videncParams).maxWidth = 1536;

    (pParams->videncParams).maxBitRate= 10485760;

    (pParams->videncParams).inputChromaFormat = XDM_YUV_420SP;

    (pParams->videncParams).reconChromaFormat = XDM_YUV_420SP;

    (pParams->videncParams).dataEndianness = XDM_BYTE;

    (pParams->videncParams).maxInterFrameInterval = 1;

    (pParams->videncParams).inputContentType = IVIDEO_PROGRESSIVE;

    pParams->meAlgo = 0;

    pParams->profileIdc=100;//high profile

    pParams->enableVUIparams = 0;

    pParams->levelIdc=IH264VENC_LEVEL_40;

    pParams->entropyMode=0;

    pParams->transform8x8FlagIntraFrame = 1;

    pParams->transform8x8FlagInterFrame=1;

    pParams->seqScalingFlag = 1;

    pParams->encQuality = 3;

    pParams->enableARM926Tcm = 0;

    pParams->outputDataMode = IH264VENC_TI_ENTIREFRAME;

    pParams->sliceFormat = IH264VENC_TI_BYTESTREAM;

    pParams->numTemporalLayers = 3;

    pParams->svcSyntaxEnable = 1;

    pParams->enableDDRbuff = 0;

    pParams->sliceMode = 0;

    Dynamic parameters

    (pDynParams->videncDynamicParams).inputHeight = 1920;

    (pDynParams->videncDynamicParams).inputWidth = 1536;

    pDynParams->maxBitrateCVBR=10485760;

    pDynParams->rcAlgo = 3;

    (pDynParams->videncDynamicParams).targetBitRate =10485760 *(2/3);

    pDynParams->maxHighCmpxIntCVBR = 1;

    pDynParams->CVBRsensitivity = 8;

    (pDynParams->videncDynamicParams).intraFrameInterval = 0;

    (pDynParams->videncDynamicParams).generateHeader = XDM_ENCODE_AU;

    (pDynParams->videncDynamicParams).captureWidth =1920;

     

    (pDynParams->videncDynamicParams).refFrameRate = 20;

    (pDynParams->videncDynamicParams).forceFrame = IVIDEO_NA_FRAME;

    (pDynParams->videncDynamicParams).mbDataFlag = XDM_DEFAULT;

    (pDynParams->videncDynamicParams).interFrameInterval = 0;

    pDynParams->sliceSize = 0;

    pDynParams->intraFrameQP = 8;

    pDynParams->interPFrameQP = 8;

    pDynParams->initQ = -1;

    pDynParams->rcQMax = 48;

    pDynParams->rcQMin = 19;

    pDynParams->rcQMaxI = 34;

    pDynParams->rcQMinI = 0;

    pDynParams->mvSADoutFlag = 0;

    pDynParams->enableROI = 0;

    pDynParams->maxDelay = 1000;

    pDynParams->lfDisableIdc = 0;

    pDynParams->enableBufSEI = 0;

    pDynParams->enablePicTimSEI = 0;

    pDynParams->perceptualRC = 1;

    pDynParams->idrFrameInterval = 8;

    pDynParams->resetHDVICPeveryFrame = 2;

    pDynParams->aspectRatioX = 1;

    pDynParams->aspectRatioY = 1;

    Note  that the problem exists for other resolutions also

     

    Regards

    JK

     

  • Hi Jayakrishnan,

    I probably can't help much, but I do notice two parameters that seem to be incorrect in your configuration:

    (pDynParams->videncDynamicParams).targetBitRate =10485760 *(2/3);

    This will set the target bit rate to ~6.9 Mbps.  In CVBR mode the user guide says regarding CVBRSensitivity, "If set to 8, rate control tries to achieve maxBitrateCVBR in increased complexity state".  This would tell me that unless you have a high complexity scene you will probably not see 10Mbps.

     

    (pDynParams->videncDynamicParams).refFrameRate = 20

    You should be using "targetFrameRate" instead of "refFrameRate" here, as refFrameRate is not a supported parameter (and it should actually be set to the same value as targetFrameRate according to the user guide).  The value for targetFrameRate is in FPS * 1000, which means for 20 FPS you need to pass 20000.  This value must then also be a multiple of 500.

    Thinking about it further, this value not being set properly might explain your bit rate problems as well, since the encoder would think the frame rate was 30 FPS while you are giving it only 20 FPS, causing the encoder to output only 2/3 of the bit rate.

    Chris

  • Hi Chris

    Thank you for the reply. It was a typo.Actually  (pDynParams->videncDynamicParams).refFrameRate = 20000;

    and   (pDynParams->videncDynamicParams).targetFrameRate = 20000;   is already set. (I missed to put it in the last reply)

    targetBitRate   is set to 6.9 mbps, because during normal scene (less  complexity) I want that much.

    and during high complexity scenes, I need 10 mbps. This is working well  when SVC is DISABLED.

    The problem arises when SVC is enabled.

    Regards

    JK

     

     

  • Hi Prasad

    Pls  find the  attached  file

    Regards

    JK

  • Hi Prasad,

    Please find the attached video file.

    Best Regards,

    Karthik0211.Svc_GOP100_10M_l.avi