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.

Pseudo Multi Pass

Other Parts Discussed in Thread: TMS320DM365

Dear Sir

          How can i verify the pseudo multi pass is working??

          Are there any sample code for this feature???

          Thanks

  • Hi,

    What do you mean by pseudo multi pass? I am sorry, i could not understand the term. More details in the question will help us to understand it better.

    Regards,

    Anshuman

  • Pseudo multi pass is one of the Smart Codec Feature provided by TI H.264 Codec.

    I follow the instruction on the TI's Application Report SPRAB83 "Smart Codec Features in TMS320DM365"

    I can not tell the difference between enable and disable it.

    I am wondering if I am doing something wrong?

    set the metaDataGenerateConsume =1 on low resolution h.264 stream

    and set the

    encStatus.bufInfo.minOutBufSize[2]=((height*width)>>4)*4;
    encStatus.bufInfo.minOutBufSize[3]=height*4;
    encStatus.bufInfo.minOutBufSize[4]=sizeof(FrameInfo_Interface);

    set the metaDataGenerateConsume =2 on high resolution h.264 stream

    Are there any thing I got to do??

    How can I know if the feature is really enable?? What's the difference between enable and disable it??

    thanks

     

  • Hi,

    Please refer to ""h264encoderapp_stp.c "" file present in "../apps/client/test/src/" folder for sample usage. It is testapp for Pseudo multi pass encoder. Please refer appendix E in DM365/DM368 encoder userGuide  for more clarification.


    In Pseudo multi pass encoding whenever there is a scene change situation low resolution encoder signals high resolution encoder to force I-frame at that point. You should observe I-frame at high resolution encoder.


    Let me know if you need more clarification.

  • Hi Ritesh

    Thanks for your reply.

    In the sample code metaDataGenerateConsume =3 what is this mean?

    and the sample are too complex to me ^^|||......

    Are there any more simple code or document describe the steps to enable this feature?

     

  • Hi Kowin,

    I would request you to please go through Appendix E (Simple Two-pass Encoding Sample Usage) first. After reading this it would be easy to understand testapp code w.r.t metaDataGenarate flag.

    metaDataGenerateConsume = 3 is the case when metaData is generated but not consumed. It takes of cases when I-Frame has to be force at high resolution encoder but that particular frame is skip frame. In that case next frame uses metaData. Please go through userGuide for more details.  Please go through table "4.2.2.2 IH264VENC_DynamicParam" in userguide to see all possible value that metaDataGenerate flag can take.

     

  • Hi Ritesh

         Thanks. After read the document, the code is easy to understand^^.

         But when I try to implement to our model, I have encounter the following error. Do you have any idea about this?

     

    1.       When we set the pObj->dynamicParams_h264.metaDataGenerateConsume=2; for the high resolution H.264

    The camera fails to boot due to the following message. It seems that the wis-streamer can not initial properly.

    But when we set pObj->dynamicParams_h264.metaDataGenerateConsume=0; camera work as usually.

    Of course we have already set the low resolution H.264 to pObj->dynamicParams_h264.metaDataGenerateConsume=1;

    the error message:

    !!!!!msgrcv [err: Interrupted system call][func: GetPhyMem]

     

    2. The result from the low resolution is strange to me^^|| (because we can not make metaDataGenerateConsume=2 on high resolution 

    work, so I try just set the metaDataGenerateConsume=1 on low resolution and see what happen. the output is something like following

    CODEC_DEBUG_ENABLE: 1st Pass Frameinfo Parameter [0] value is -24441592
    CODEC_DEBUG_ENABLE: 1st Pass Frameinfo Parameter [1] value is 655200328
    CODEC_DEBUG_ENABLE: 1st Pass Frameinfo Parameter [2] value is -305741026
    CODEC_DEBUG_ENABLE: 1st Pass Frameinfo Parameter [3] value is 1337356590
    CODEC_DEBUG_ENABLE: 1st Pass Frameinfo Parameter [4] value is -1866040081
    CODEC_DEBUG_ENABLE: 1st Pass Frameinfo Parameter [5] value is -1425503896

    the value is different from each boot, It seems that it is not initial properly.

     

    Thank you again^^


     








  • Hi Kowin,

    Here are my inputs:

    1: I am not very sure but it looks like some memory allocation issue. In case of Pseudo multi pass encoding you need double the memory of single encoder because of 2 instances. Also, in case of Pseudo multi pass, we need extra buffers for storing information which passed from low to high encoder. Please go through useguide for details.  Please check whether you have sufficient memory for high resolution encoder when Pseudo multi pass is enabled.

     

    2. In my opinion you might be reading incorrect memory location. Please go through testapp file (that I had mentioned in my previous reply) to see how metaadata of the 1st-pass encoder are displayed.

  • Hi Ritesh

         Thanks for your support.

         One more question, What is the criteria that the sceneChangeFlag is set to 1 by encoder???

         Does this judge by MV or???

         Can this feature to be used as tamper detection???

  • Hi,

    Secene change detection by codec cannot be a foolproof method for tamper detection. Many time, if rapid motion happends in front of camera like waving hand near camera lense etc, codec will detect multiple scene changes. You may not like to classify this event as camera tamper. It can be a useful input but needs to be supplimented with some other logic.

     

    regards

    Yashwant

  • Hi, Yashwant

    Thanks for your information. Can you suggest some logics? or where I can find such informations?

    best regards

    Kowin