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.

About dm8127 ipnc3.2 output h264 stream more wider

Genius 3400 points


Hi all

When DM8127 camera run ipnc3.2, the width of output h264 stream(play by vlc) is
wider(like 1440*480) than the actual width(720*480).
The output h264 stream are as fllows:

When run ipnc3.2 system_server and ipnc3.0 wis-streamer, the output h264 stream width is also wrong.

but run ipnc3.0 system_server and run ipnc3.2 wis-streamer,the output h264 stream width is ok.

who knows why? or give us some advice. 
Thanks a lot! 

  • BTW, I know I can set the "Source aspect ratio" to adjust the vlc default display ratio. But I want to know what lead to the different default aspect ratio  between IPNC 3.2 and IPNC 3.0.

    Thanks a lot.

     

  • Hi 

    Can you change the following and see the difference in behavior?

    ipnc_mcfw/mcfw/src_bios6/links_m3video/iva_enc/encLink_h264.c:718: staticParams->vuiCodingParams.aspectRatioIdc = IH264ENC_ASPECTRATIO_EXTENDED;

  • Thanks for your reply at first.

    I change aspectRatioIdc to IH264ENC_ASPECTRATIO_160_99, using the vlc to connect the live video. the default aspect ratio do not change.

    staticParams->vuiCodingParams.aspectRatioIdc = IH264ENC_ASPECTRATIO_EXTENDED;
    /* As we are setting the aspectRatioIdc to EXTENDED value,
        we need to provide the SAR WIDTH and SAR HEIGHT also , which is in Dynamic parameters*/

    And in the function of enclink_print_dynamic_params(), I track the sampleAspectRatioWidth and sampleAspectRatioHeight, it's correct(1280x720).

    Have other advices?

  • Hi, I replace the H264 code lib to ipnc3.0, but the default aspect ratio is not correct.

    REL.500.V.H264AVC.E.IVAHD.02.00.04.00 to REL.500.V.H264AVC.E.IVAHD.02.00.02.02

  • hi,

          Compare the file encLink_h264.c in IPNC3.0 with IPNC3.2, I found the differeces in the function of enclink_h264_set_dynamic_params(),

          In IPNC 3.2, It add the sampleAspectRatio setting operation。

         . /* dynamicParams->videnc2DynamicParams.sampleAspectRatioWidth =   algDynamicParams->inputWidth; 

              dynamicParams->videnc2DynamicParams.sampleAspectRatioHeight =  algDynamicParams->inputHeight; */ 

           I delete these two parameters setting. The vlc default aspect ratio is correct. 

           It's conflict with the follow setting and the document introduce.

             staticParams->vuiCodingParams.aspectRatioInfoPresentFlag = 1;

             staticParams->vuiCodingParams.aspectRatioIdc = IH264ENC_ASPECTRATIO_EXTENDED;

             /* As we are setting the aspectRatioIdc to EXTENDED value, we need to provide the SAR WIDTH and SAR HEIGHT also , which is in Dynamic parameters */ 

             and at the document of "H264_Encode_HDVICP2_UserGuide.pdf"

            See Table E-1 of H264 standard or enum IH264ENC_AspectRatioIdc for valid values. When aspectRatioIdc == IH264ENC_ASPECTRATIO_EXTENDED(255), encoder will look at IVIDENC2_DynamicParams::sampleAsp ectRatioHeight and IVIDENC2_DynamicParams::sampleAspectRatioWidth and use them as sar_height and sar_width respectively. aspectRatioIdc is left to user to provide correct value.

             if aspectRatioInfoPresentFlag ==0 then encoder ignores this parameter 

             Who can tell me what's the reason. Thanks a lot.