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.

Facing issue in Interlaced encoding with EzSDK on DM814x based board

Other Parts Discussed in Thread: TVP7002

Hello TI,

We have DM814x based custom product. We are using EzSDK version 5.05.01.04 (ezsdk_dm814x-evm_5_05_01_04) in this product. I want to do interlaced encoding using capture_encode demo. I refer FAQ 3 in the link http://processors.wiki.ti.com/index.php/OMX_VENC and did relevant changes in my capture_encode demo.

When i played back the encoded file with Elecard it shows that encoded file is interlaced (interlaced : yes) but it has lots of noise on transparent video in background. I suspect that something is wrong with stride (or pitch), width or height because the elecard shows resolution as 720x1152 and one more observation is it plays with the maximum bit-rate something around 60-63 Mbps with PAL resolution even though declared bit-rate is just 4Mbps.

Please help as soon as possible.

Regards,

Hitesh

  • HI Hitesh,

    What is the original frame resolution? And can you please share the noisy image versus original? 

    Also please share the changes you made to the code - original and chnages highlighted.

    Thanks & Best Regards

    Feroz

  • Hi Hitesh,

    Can you please share your encoder settings? Could you also try out once with "encode" demo and check the behaviour?

    Please share initial few 4-5 frames of encoded stream.

    Thanks

    Ram

  • Hi Feroz,

    Original resolution is PAL (576i). Noisy compressed H.264 file is attached here (renamed by txt extension, so renamed back to .h264 extension) 7838.interlaced.txt

    And when i am using de-interlacer to in between capture & encode so encoder will does progressive encoding and not the interlaced video which is attached here

    2100.progressive.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    ·'d*�·*·�I�···���= ·B@�·(�·�,···�_�·@······%��@ 6��0��J��^���···j�xw(���"':��Ց��Z�|+�Q�&y;*d]!·8�··m··{�sc�··K�·�]O·Yz�s+·�T�7C�···�]rl���׉j�M[�"����$!�s�$·Ey�� 80···J��F·��P�·0�···�a�/�k·��m��·�ѧ2�2·��·b�h_�{�·y·6��-��Pw�H·]�ˆJD_·���[�K˄��p�·�w9�"3·
    ��_��+·�{·���)�s����··���v!�U:���Rƛ.�[��|�··��g��:�N��1�^�� �s��·��ߓ��U�v܍Ӄπ)s·>1}J�J۷·����n[�a�··�B
    ··ꖬb4�e|Lr�����(�tj�^i9��·@�·~s�8� �;��t��C����:$�O�r.g�]��·���.CIW_�
    ��Tw·<�p·�t·��rq܅�_ۺ�^··�n
    <�Ј�·Z)(#�����=�֛!":p·�3�̅h·c�·c$�DY*�R��͕�I�
    �kKbߴ����3rj�\/T� ��SK��,|���
    4�$��·)ې�����f����
    cx��·�Ƹ_��a��\··)��8�D�h·�I��·>�3q��·���Ȇ�ƈ���t�~��4��\y�·�BLG��❜m�R�G��'·i··��g���[/ �*2�]�rݡ�8����p�(n7{���61�V�s.���K·�!��X��yjJM·
    2e-��·ش��·�$ў·7Vc�n;\p^�[·j���a��·�<�ݡ·�g�s�Y��Nv��~<K��·�ph�IV=��moں���·Br��
    ��·�^·i·��·diØ·���·����·fQ��y��9·M��,��·Upv��MJ··�'M����?�·�2�A�^··�H�2··�-��fUf7yO�2�W��·
    ^U/�!�·+,Ix2Ǩެ�8 ���P�t�<·�ѱj¹}5·�C)�P����R�3mXZ�0aq8�}NN@�·��<��46
    ���ݲ�W·f
    ·��7^��B��Y�/�·��^�#м��W0j/��&��|M�
    ��·ȹ·��ͨB�l��o�8Y·G·J��#Q�ui�IqNV0�X�B�Ғ·{�6·�dW�f�r��·��9 _�|�·2�nem·��s�Ŝ·��q<~��*5����&�·'·��4 �Z��2*�������d�·�6f�c}·�!��·���M·�пXH|{J�W T�V5Ci�D~l�>8����D··�n*E�· jR�·7�%�a[�y���&O+R2k�&·���E����kc3Y�v��ʲ�������,��Bʲ�Z���T_.�3�,�H�·/�'��yȽ7�·�X��I·��·{J�A�//r+�̶,���·���ݑQmE��·��·���r��W2�̡���/�Z����7j···��Q��g��n�
    ��C�
    �8�c|�xgӭ>z[�2A����f�··U�·�!q·�YB�·x.!��X�ٲv)��·���Eh�cǃ��&��(�·d·�}G��� ~y@·z�·�xP?���~���·��E^�k��%Y>�Pb�/�b�N�"#��2�·���4�·(�6����·�6Uލob0#d���u0[�Z�·�C���͓·����nԆA+�Ȕ··���f�ΣS·��ƫO�·nl�w����·�,··&�f4ze!���lm��+8E��\36C���0z{{···�F`[·���+�·lԒ�ɖm;�·���BB���·
    ·�s��·�w�·!�f�M�·�|1GEa���D·�"��ku���·x�c�#;�0@�w�R·ЗReD���W�9*Ϧ5��R·�l˺fޢޯ���·q�L�8tDl�z5��/��q�Pe>�dq.��nNNF��Zx··��·M�··ٚq���;��¤·
    ·R�·�?�0�··�,PQ�O�'��·� ��׍�)�.6A
    X�R�r� �Ф>�<K·f�y�]7V�·�Z�)��3��"��o�·�wD���٬·�}*G͠�#���,fЌ6Ʃ���b�\�����Փ�߭·��g·Hу`�
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Please check below difference of information when i played it in elecard.

    Let me know if you need more information

    Regards,

    Hitesh

  • Code changes

    We added many parameters in OMX_VIDEO_PARAM_STATICPARAMS   tStaticParam parameters which is not used in case of default capture_encode demo.

    OMX_INIT_PARAM (&tStaticParam);
      tStaticParam.nPortIndex = OMX_VIDENC_OUTPUT_PORT;
      eError = OMX_GetParameter (pHandle, OMX_TI_IndexParamVideoStaticParams,
                                 &tStaticParam);
      tStaticParam.videoStaticParams.h264EncStaticParams.videnc2Params.profile = IH264_HIGH_PROFILE;
      tStaticParam.videoStaticParams.h264EncStaticParams.videnc2Params.level = IH264_LEVEL_42;

      /* setting Interlace mode */
      tStaticParam.videoStaticParams.h264EncStaticParams.videnc2Params.inputContentType = IVIDEO_INTERLACED;
      tStaticParam.videoStaticParams.h264EncStaticParams.bottomFieldIntra = 0;
      tStaticParam.videoStaticParams.h264EncStaticParams.interlaceCodingType = IH264_INTERLACE_FIELDONLY_ARF;

      tStaticParam.videoStaticParams.h264EncStaticParams.videnc2Params.encodingPreset = XDM_DEFAULT;
      tStaticParam.videoStaticParams.h264EncStaticParams.videnc2Params.rateControlPreset = IVIDEO_STORAGE;

      tStaticParam.videoStaticParams.h264EncStaticParams.intraCodingParams.lumaIntra4x4Enable = 0x1f;
      eError = OMX_SetParameter (pHandle, OMX_TI_IndexParamVideoStaticParams,
                                 &tStaticParam);

    Regards,

    Hitesh



  • Hi Ram,

    I tried with encode only demo and the behavior is the same. I think there is issue in some encoder input parameter configurations.

    Regards,

    Hitesh

  • Hi Hitesh,

    I just referred our stand-alone encoder settings. They set inputHeight to half of the actual height for interlaced coding.

    i,e, in your case, can you please try setting inputHeight = 288 and let me know your observation.

    Ram

  • Hi Ram,

    I tried that as well. With that the both the fields are overlapped to each other somewhere around in the middle of the video. And suspect the pitch or stride settings are some how wrong. What you say? I am trying with various combinations but unable to succeed yet.

    Does it working with your stand-alone encoder settings? If yes, please share those settings so that i can compare those with mine to make it working.

    Thanks for prompt response.

    --

    Regards,

    Hitesh

  • Hi Hitesh,

    I checked with encoder team on the noisy input you shared. They asked to set inputheight = height of one field and datalayout and secondFieldOffsetHeight/width

    Can you please refer attached image(This info is available in H264encoder userguide) on datalayout and secondFieldOffsetHeight/width settings.

  • Hi Ram,

    I saw these things also available in HDVICP2 encoder user guide but I don't see any interface through which i can set those encoder parameters using EzSDK open max APIs. Can you help me how can i set these parameters?

    I saw these parameters are there in IVIDEO2_BufDesc structure but i didn't know how to use. I got this structure declared in "omx_05_02_00_46/src/ti/omx/interfaces/openMaxv11/ih264enc.h" but demo doesn't show the use case of the same. Even http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/239779/898227.aspx is unanswered for similar kind of access of parameter IH264ENC_ProcessParams.

    Is there any document that show case that how to use this kind of parameters. Can anyone from TI answers me about this?

    --

    Regards,

    Hitesh

  • Hello Ram/Feroz,

    Any update on this post? We are suck with this in application development, Please help us to get resolved from this. At least provide me those stand-alone parameters so that i can compare them with my parameters.

    I suspect something goes wrong in encoded buffer format which we received by dividing video input height by 2.

    Regards,

    Hitesh

  • Hi Hitesh,

    I have listed the parameters used in stand-alone encoder for 576i . Some extended parameters may not be relevant for you.

    Can you please check this? If possible please provide initial 4-5 frames of your YUV input.

    InputFile = "./yuv/parkrun_i352x576_30fps_420pl_150fr_SP.yuv"
    EncodedFile = "./264/657_parkrun_i352x576_30fps_420pl_150fr.264"
    ReferenceFile = "rec.yuv"
    EncodingPreset = 3
    RateControlPreset = 5
    MaxInterFrameInterval = 16
    Profile = 100
    Level = 22
    NumInputUnits = 150
    MaxWidth = 352
    MaxHeight = 288
    DataEndianess = 1
    InputChromaFormat = 9
    InputContentType = 1
    OperatingMode = 1
    InputDataMode = 3
    OutputDataMode = 3
    NumOutputUnits = 1
    dataLayout = 0
    inputWidth = 352
    inputHeight = 288
    refFrameRate = 30000
    targetFrameRate = 25000
    targetBitRate = 4000000
    maxBitRate = -1
    minBitRate = -1
    intraFrameInterval = 1
    interFrameInterval = 1
    generateHeader = 0
    captureWidth = 352
    captureHeight = 288
    captureTopLeftx = 0
    captureTopLefty = 0
    forceFrame = -1
    mvAccuracy = 2
    sampleAspectRatioHeight = 1
    sampleAspectRatioWidth = 1
    ignoreOutbufSizeFlag = 1
    interCodingPreset = 1
    searchRangeHorP = 144
    searchRangeVerP = 32
    searchRangeHorB = 144
    searchRangeVerB = 16
    interCodingBias = 1
    skipMVCodingBias = 0
    minBlockSizeP = 0
    minBlockSizeB = 0
    searchCenter_x = 12
    searchCenter_y = 56
    intraCodingPreset = 1
    lumaIntra4x4Enable = 309
    lumaIntra8x8Enable = 320
    lumaIntra16x16Enable = 4
    chromaIntra8x8Enable = 4
    intraRefreshMethod = 1
    intraRefreshRate = 352
    constrainedIntraPredEnable = 1
    chromaComponentEnable = 1
    loopfilterPreset = 1
    loopfilterDisableIDC = 2
    filterOffsetA = 12
    filterOffsetB = -2
    entropyCodingMode = 1
    sliceCodingPreset = 1
    sliceMode = 1
    sliceUnitSize = 15
    streamFormat = 0
    sliceStartOffset0 = 0
    sliceStartOffset1 = 0
    sliceStartOffset2 = 0
    fmoCodingPreset = 0
    numSliceGroups = 0
    sliceGroupMapType = 0
    sliceGroupChangeDirectionFlag = 0
    sliceGroupChangeRate = 0
    sliceGroupChangeCycle = 0
    #sliceGroupParams = 0
    rateControlParamPreset = 1
    scalingMatrixPreset = 2
    qpI = -1
    qpP = -1
    qpOffsetB = 0
    rcAlgo = 0
    qpMaxI = 10
    qpMinI = 0
    qpMaxP = 11
    qpMinP = 0
    qpMaxB = 10
    qpMinB = 0
    minPicSizeRatioI = 0
    maxPicSizeRatioI = 0
    minPicSizeRatioP = 0
    maxPicSizeRatioP = 0
    minPicSizeRatioB = 0
    maxPicSizeRatioB = 0
    allowFrameSkip = 0
    removeExpensiveCoeff = 0
    chromaQPIndexOffset = 0
    IPQualityFactor = 0
    initialBufferLevel = 4000000
    HRDBufferSize = 4000000
    naluControlPreset = 1
    naluPresentMaskStartOfSequence = 8672
    naluPresentMaskIDRPicture = 8544
    naluPresentMaskIntraPicture = 8672
    naluPresentMaskNonIntraPicture = 0
    naluPresentMaskEndOfSequence = 3072
    vuiCodingPreset = 1
    aspectRatioInfoPresentFlag = 1
    aspectRatioIdc = 1
    videoSignalTypePresentFlag = 1
    videoFormat = 0
    videoFullRangeFlag = 1
    timingInfoPresentFlag = 0
    gopStructure = 0
    IDRFrameInterval = 3
    bottomFieldIntra = 0
    transformBlockSize = 2
    log2MaxFNumMinus4 = 5
    picOrderCountType = 1
    topFieldFirstFlag = 1
    interlaceCodingType = 2
    numProcessCall = 30
    H264UserDataSEI = 0
    forceIDRPeriod = 26
    forceSKIPPeriod = 25
    GmvDataInSei = 1
    stereoInfoPreset = 2
    topFieldIsLeftViewFlag = 0
    viewSelfContainedFlag = 0
    enablePartialFrameSkip = 1

    Thanks

    Ramprasad

  • Hi Ram/Feroz,

    We managed to make it working with below changes:

    1) We edit the VENC component of EzSDK (Overlay code which we received from you in past) where dataLayout was set as "IVIDEO_FIELD_SEPARATED" and we changed it to "IVIDEO_FIELD_INTERLEAVED".

    2) Divided Encoder input height by 2

    3) Setting inputContentType = IVIDEO_INTERLACED in videnc2Params

    Thanks Ram and Feroz for giving me continuous input from your side.

    Regards,

    Hitesh

  • Hello Feroz/Ram,

    We are still facing some issue (may be some minor mistake). With the working interlaced encoded file, the video is jumping vertically. I have attached the sample here 1680.dump_h264.txt (Rename the file to txt as h264 extension is not supported in upload functionality).

    Can you tell me why it is happening?

    Is there any encoder configuration which i missed out to configure and as result i am getting such jumps?

    Waiting for a quick response.

    --

    Regards,

    Hitesh

  • Hi Hitesh,

    I had a look into the stream you attached. Are you changing anything with SetConfig for every processing?

    it looks like initially everything is proper and vertical jumping increase gradually.

    For what cases it was working properly?

    Ram

  • Hi Ram,

    Thanks for a prompt reply. Please find attached Encoder_Settings.txt file that contains my encoder settings

    1680.Encoder_Settings.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    OMX_ERRORTYPE IL_ClientSetEncodeParams (IL_Client *pAppData)
    {
    OMX_ERRORTYPE eError = OMX_ErrorUndefined;
    OMX_HANDLETYPE pHandle = NULL;
    OMX_VIDEO_PARAM_PROFILELEVELTYPE tProfileLevel;
    OMX_VIDEO_PARAM_ENCODER_PRESETTYPE tEncoderPreset;
    OMX_VIDEO_PARAM_BITRATETYPE tVidEncBitRate;
    OMX_VIDEO_PARAM_PORTFORMATTYPE tVideoParams;
    OMX_PARAM_PORTDEFINITIONTYPE tPortDef;
    OMX_VIDEO_CONFIG_DYNAMICPARAMS tDynParams;
    OMX_VIDEO_PARAM_STATICPARAMS tStaticParam;
    OMX_VIDEO_PARAM_AVCTYPE tAVCParams;
    pHandle = pAppData->pEncHandle;
    /* Number of frames to be encoded */
    pAppData->encILComp->numFrames = pAppData->evmAppInParams->noFrames;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Please let me know if i did something wrong in those parameter initialization. We didn't performed any parameter initializations runtime using SetConfig. We did use SetConfig API to initialize some of the parameters at creation time.

    One more observation, this happens only in case of interlaced encoding. If i enable DEI and encode it as progressive, encoded video doesn't jump.

    Let me know if you need any more information.

    Regards,

    Hitesh

  • Hi Hitesh,

    Your paramters look fine. I have forwarded this to codec team to analyze once again.

    Can you try out with "encode" example once?

    Thanks

    Ram

  • Hitesh,

    Try the following modifications in the encoder configuration

    1. set the flag bottomFieldIntra to non-zero
    2. try changing the interlaceCodingType to MRF
    3. Check if raw YUV content fed to encoder is clean
    4. Share the full set of encoder configuration by doing a control call with XDM_GETSTATUS command. You need to collect status structure and share it with us so that we can try in our stand-alone setup

    Thanks 

  • Thanks you so much, Ram and Santosh.

    I really appreciate your quick response. I will try with both of your suggestions towards fixed to the problem. I will update you soon on this.

    Thanks,

    Hitesh

  • Hi Ram and Santosh,

    Currently I am working on this issue. We have tried your suggestions, Please find below information.

    1. set the flag bottomFieldIntra to non-zero

    We have changed value of bottomFieldIntra to 1 from 0 but there is not any change in output encoded file.

    2. try changing the interlaceCodingType to MRF

    We have changed value of interlaceCodingType to MRF but there is not any change in output encoded file. We have printed this value before capture starts but we are getting value of interlaceCodingType = 3(ARF), which should be 2 (MRF)

    3. Check if raw YUV content fed to encoder is clean

    We have checked encode only demo with interlace encoder setting, output encoded file do not have any jumping effect (output file is proper as it should).

    4. Share the full set of encoder configuration by doing a control call with XDM_GETSTATUS command. You need to collect status structure and share it with us so that we can try in our stand-alone setup

    Please find below list of encoder configuration Param value in our system.

    #### IH264ENC_Status Param
    #### Value of interlaceCodingType     = 3
    #### Value of bottomFieldIntra        = 1
    #### Value of gopStructure            = 0
    #### Value of entropyCodingMode       = 1
    #### Value of transformBlockSize      = 1
    #### Value of log2MaxFNumMinus4       = 12
    #### Value of picOrderCountType       = 0
    #### Value of enableWatermark         = 0
    #### Value of IDRFrameInterval        = 0
    #### Value of maxIntraFrameInterval   = 65535
    #### Value of debugTraceLevel         = 0
    #### Value of lastNFramesToLog        = 0
    #### Value of enableAnalyticinfo      = 0
    #### Value of enableGMVSei            = 0
    #### Value of constraintSetFlags      = 0
    #### Value of enableRCDO              = 0
    #### Value of enableLongTermRefFrame  = 0
    #### Value of LTRPPeriod              = 0
    #### Value of searchCenter            = 0
    #### Value of enableStaticMBCount     = 0
    #### Value of numTemporalLayer        = 1
    #### Value of referencePicMarking     = 0
    #### Value of extMemoryDebugTraceSize = 36
    #### Value of enableROI               = 0

    #### IH264ENC_Status->rateControlParams Param
    #### Value of rateControlParamsPreset      = 0
    #### Value of scalingMatrixPreset          = 0
    #### Value of rcAlgo                       = 0
    #### Value of qpI                          = -1
    #### Value of qpMaxI                       = 36
    #### Value of qpMinI                       = 10
    #### Value of qpP                          = -1
    #### Value of qpMaxP                       = 40
    #### Value of qpMinP                       = 10
    #### Value of qpOffsetB                    = 4
    #### Value of qpMaxB                       = 44
    #### Value of qpMinB                       = 10
    #### Value of allowFrameSkip               = 0
    #### Value of removeExpensiveCoeff         = 0
    #### Value of chromaQPIndexOffset          = 0
    #### Value of IPQualityFactor              = 0
    #### Value of initialBufferLevel           = 8000000
    #### Value of HRDBufferSize                = 8000000
    #### Value of minPicSizeRatioI             = 0
    #### Value of maxPicSizeRatioI             = 0
    #### Value of minPicSizeRatioP             = 0
    #### Value of maxPicSizeRatioP             = 0
    #### Value of minPicSizeRatioB             = 0
    #### Value of maxPicSizeRatioB             = 0
    #### Value of enablePRC                    = 1
    #### Value of enablePartialFrameSkip       = 0
    #### Value of discardSavedBits             = 0
    #### Value of reserved                     = 0
    #### Value of VBRDuration                  = 8
    #### Value of VBRsensitivity               = 0
    #### Value of skipDistributionWindowLength = 5
    #### Value of numSkipInDistributionWindow  = 1
    #### Value of enableHRDComplianceMode      = 1
    #### Value of frameSkipThMulQ5             = 0
    #### Value of vbvUseLevelThQ5              = 0

    #### IH264ENC_Status->interCodingParams Param
    #### Value of interCodingPreset  = 0
    #### Value of searchRangeHorP    = 144
    #### Value of searchRangeVerP    = 32
    #### Value of searchRangeHorB    = 144
    #### Value of searchRangeVerB    = 16
    #### Value of interCodingBias    = 1
    #### Value of skipMVCodingBias   = 1
    #### Value of minBlockSizeP      = 0
    #### Value of minBlockSizeB      = 0
    #### Value of meAlgoMode         = 0

    #### IH264ENC_Status->intraCodingParams Param
    #### Value of intraCodingPreset          = 0
    #### Value of lumaIntra4x4Enable         = 31
    #### Value of lumaIntra8x8Enable         = 31
    #### Value of lumaIntra16x16Enable       = 15
    #### Value of chromaIntra8x8Enable       = 15
    #### Value of chromaComponentEnable      = 1
    #### Value of intraRefreshMethod         = 0
    #### Value of intraRefreshRate           = 0
    #### Value of gdrOverlapRowsBtwFrames    = 0
    #### Value of constrainedIntraPredEnable = 0
    #### Value of intraCodingBias            = 0

    #### IH264ENC_Status->nalUnitControlParams
    #### Value of naluControlPreset              = 1
    #### Value of naluPresentMaskStartOfSequence = 8672
    #### Value of naluPresentMaskIDRPicture      = 8672
    #### Value of naluPresentMaskIntraPicture    = 8450
    #### Value of naluPresentMaskNonIntraPicture = 2
    #### Value of naluPresentMaskEndOfSequence   = 0

    #### IH264ENC_Status->sliceCodingParams
    #### Value of sliceCodingPreset = 0
    #### Value of sliceMode         = 0
    #### Value of sliceUnitSize     = 0
    #### Value of streamFormat      = 0

    #### IH264ENC_Status->loopfilterPreset
    #### Value of loopfilterPreset      = 0
    #### Value of loopfilterDisableIDC  = 0
    #### Value of filterOffsetA         = 0
    #### Value of filterOffsetB         = 0

    #### IH264ENC_Status->fmoCodingParams
    #### Value of fmoCodingPreset               =0
    #### Value of numSliceGroups                =1
    #### Value of sliceGroupMapType             =4
    #### Value of sliceGroupChangeDirectionFlag =0
    #### Value of sliceGroupChangeRate          =0
    #### Value of sliceGroupChangeCycle         =0
    #### Value of sliceGroupParams[0]           =0
    #### Value of sliceGroupParams[1]           =0

    #### IH264ENC_Status->vuiCodingParams
    #### Value of vuiCodingPreset            = 1
    #### Value of aspectRatioInfoPresentFlag = 0
    #### Value of aspectRatioIdc             = 0
    #### Value of videoSignalTypePresentFlag = 0
    #### Value of videoFormat                = 2
    #### Value of videoFullRangeFlag         = 0
    #### Value of timingInfoPresentFlag      = 1
    #### Value of hrdParamsPresentFlag       = 1
    #### Value of numUnitsInTicks            = 1000

    #### IH264ENC_Status->stereoInfoParams
    #### Value of stereoInfoPreset       = 0
    #### Value of topFieldIsLeftViewFlag = 0
    #### Value of viewSelfContainedFlag  = 0

    #### IH264ENC_Status->framePackingSEIParams
    #### Value of framePackingPreset = 0
    #### Value of framePackingType   = 0
    #### Value of frame0PositionX    = 0
    #### Value of frame0PositionY    = 0
    #### Value of frame1PositionX    = 0
    #### Value of frame1PositionY    = 0
    #### Value of reservedByte       = 0

    #### IH264ENC_Status->svcCodingParams
    #### Value of svcExtensionFlag    = 0
    #### Value of dependencyID        = 0
    #### Value of qualityID           = 0
    #### Value of enhancementProfileID= 0
    #### Value of layerIndex          = 0
    #### Value of refLayerDQId        = 0

  • Hi Ram and Santosh,

    FYI, Please find attached file which is having our capture and dei param settings.

    2337.SetCaptureParams.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    OMX_ERRORTYPE IL_ClientSetCaptureParams (IL_Client *pAppData)
    {
    OMX_PARAM_VFCC_HWPORT_PROPERTIES sHwPortParam;
    OMX_PARAM_VFCC_HWPORT_ID sHwPortId;
    OMX_CONFIG_VFCC_FRAMESKIP_INFO sCapSkipFrames;
    OMX_PARAM_CTRL_VIDDECODER_INFO sVidDecParam;
    OMX_PARAM_BUFFER_MEMORYTYPE memTypeCfg;
    OMX_PARAM_PORTDEFINITIONTYPE paramPort;
    OMX_ERRORTYPE eError = OMX_ErrorNone;
    OMX_INIT_PARAM (&paramPort);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    3443.SetDeiParams.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    OMX_ERRORTYPE IL_ClientSetDeiParams (IL_Client *pAppData)
    {
    OMX_ERRORTYPE eError = OMX_ErrorNone;
    OMX_PARAM_BUFFER_MEMORYTYPE memTypeCfg;
    OMX_PARAM_PORTDEFINITIONTYPE paramPort;
    OMX_PARAM_VFPC_NUMCHANNELPERHANDLE sNumChPerHandle;
    OMX_CONFIG_ALG_ENABLE algEnable;
    OMX_CONFIG_VIDCHANNEL_RESOLUTION chResolution;
    OMX_CONFIG_SUBSAMPLING_FACTOR sSubSamplinginfo = {0};
    OMX_INIT_PARAM(&sSubSamplinginfo);
    sSubSamplinginfo.nSubSamplingFactor = 1;
    eError = OMX_SetConfig ( pAppData->pDeiHandle, ( OMX_INDEXTYPE )
    ( OMX_TI_IndexConfigSubSamplingFactor ),
    &sSubSamplinginfo );
    OMX_INIT_PARAM (&memTypeCfg);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Could you please share videnc2Status also? It's part of H264ENC_Status.

    PS : videnc2Status contains the base class of status structure parameters.

    Thanks.

  • Hi Brijesh,

    From your statement

    We have checked encode only demo with interlace encoder setting, output encoded file do not have any jumping effect (output file is proper as it should).

    encode demo doesn't have issue with same parameter settings right?

    So issue doesn't seem to be with encode then. 

    Now your use case capture --> encode is having problem of jumping artifacts. Could you check the YUV output of catprue?


    Ram

  • Hi Ram,

    Thank you for your quick reply.
    We have also tried one Capture->Encode->Dump based application as we are having doubt on DEI parameter setting but still output video file having same jumping effect.

  • Hi Ram,

    We have doubt on Capture parameter setting because in our setup LCD also is connected.

    Preview on LCD display is also having jumping effect.

  • Ram,

    As we are not much exposed to capture systems and other peripherals, introducing this thread to camera/capture team or to somebody form application team would be preferable. Could you please pull in such an expert to this discussion?

    Thanks.

  • Hi Santosh,

    Please find below videnc2Status structure parameters.

    #### videnc2Status Param

    #### Value of extendedError          = 0
    #### Value of encodingPreset         = 3
    #### Value of data                   = 0
    #### Value of accessMask             = 0
    #### Value of rateControlPreset      = 5
    #### Value of maxInterFrameInterval  = 1
    #### Value of inputChromaFormat      = 9
    #### Value of inputContentType       = 1
    #### Value of operatingMode          = 1
    #### Value of profile                = 100
    #### Value of level                  = 42
    #### Value of inputDataMode          = 3
    #### Value of outputDataMode         = 3
    #### Value of numInputDataUnits      = 1
    #### Value of numOutputDataUnits      = 1
    #### Value of configurationID        = 1271
    #### Value of minNumInBufs           = 2
    #### Value of minNumOutBufs          = 1
    #### Value of minInBufSize[0]        = 720
    #### Value of minOutBufSize[0]       = 622080
    #### Value of inBufMemoryType[0]     = 1
    #### Value of outBufMemoryType[0]    = 0
    #### Value of minNumBufSets          = 1
    #### Value of metadataType[0]        = -1
    #### Value of metadataType[1]        = -1
    #### Value of metadataType[2]        = -1
    #### Value of size                      = 236
    #### Value of inputHeight               = 288
    #### Value of inputWidth                = 720
    #### Value of refFrameRate              = 60000
    #### Value of targetFrameRate           = 25000
    #### Value of targetBitRate             = 4000000
    #### Value of intraFrameInterval        = 30
    #### Value of generateHeader            = 0
    #### Value of captureWidth              = 720
    #### Value of forceFrame                = -1
    #### Value of interFrameInterval = 30
    #### Value of mvAccuracy                = 2
    #### Value of sampleAspectRatioHeight   = 1
    #### Value of sampleAspectRatioWidth    = 1
    #### Value of ignoreOutbufSizeFlag      = 0
    #### Value of lateAcquireArg            = 0

  • Hi Brijesh,

    I am confused with what  case of interlaced encoding is working fine for you

    1) Encode only demo. This seems to be working fine as per your statement

    2) Capture --> Encode: Does this demo work or you are seeing  jumping effects?

    3) Catprue --> DEI --> encode(progressive encoding). This must be working as per Hitesh's earlier threads on this issue.

    4) Now your LCD is also having jumping display means, capture --> DEI ---> Display has jumping effect. Is it?

    Ram

  • Hi Ram,

    Please find my answers below,

    1) Encode only demo. This seems to be working fine as per your statement
    -> Yes this is working perfect

    2) Capture --> Encode: Does this demo work or you are seeing  jumping effects?
    -> No this does not work for me, it is having jumping effect in encoded file

    3) Catprue --> DEI --> encode(progressive encoding). This must be working as per Hitesh's earlier threads on this issue.
    -> Yes progressive encoding is working perfect

    4) Catprue --> DEI --> encode(intelace encoding). This must be working as per Hitesh's earlier threads on this issue.
    -> No this does not work for me, it is having jumping effect in encoded file

    5) Now your LCD is also having jumping display means, capture --> DEI ---> Display has jumping effect. Is it?
    -> Yes, Capture --> DEI ---> Display has jumping effect

  • Hi Brijesh,

    So capture seems to have issues then. From your capture settings, it looks like you are using a some ADV7611 video decoder.  Not sure what this external decoder's behaviour.

    Could you try out with TVP7002 as video decoder?

    Can you please confirm capture dump itself has jumping effects?

    Ram

  • Hi Ram,

    Thank you very much for you quick response.

    In our custom device there are total two types video inputs can possible one is via HDMI for which we are using ADV7611 as decoder chip and other is SDI input for which we are using SDI IP in FPGA (SDI Decoder IP inside FPGA)

    Video Input - 1 (HDMI Path) -> ADV7611 -> FPGA -> DM VIP0

    Video Input - 2 (SDI Path) -> FPGA (which is having SDI IP) -> DM VIP1

    We have tested our application with both of this video path SDI and HDMI, but we are having same jumping effect in both the path.

  • Hi Ram and Santosh,

    Please find our observation below.

    Input Video : PAL

    1. For interlaced encoding we did below changes in omx source.

    File : ezsdk_dm814x-evm_5_05_01_04/component-sources/omx-ti81xx-src_05_02_00_46/src/ti/omx/comp/venc/src/omx_h264ve.c

          if ( frameDataContentType.eContentType == OMX_Video_Interlaced )
          {
            pVidEncComPvt->tVedEncInBufsPtr->contentType = IVIDEO_INTERLACED;
            pVidEncComPvt->tVedEncInBufsPtr->dataLayout = IVIDEO_FIELD_INTERLEAVED;
            pVidEncComPvt->tVedEncInBufsPtr->topFieldFirstFlag = 1;

            pVidEncComPvt->tVedEncInBufsPtr->secondFieldOffsetHeight[0] = extHeight;
            pVidEncComPvt->tVedEncInBufsPtr->secondFieldOffsetHeight[1] = extHeight >> 1;
            pVidEncComPvt->tVedEncInBufsPtr->secondFieldOffsetHeight[2] = extHeight >> 1;
            pVidEncComPvt->tVedEncInBufsPtr->secondFieldOffsetWidth[0] = 0;
            pVidEncComPvt->tVedEncInBufsPtr->secondFieldOffsetWidth[1] = 0;
            pVidEncComPvt->tVedEncInBufsPtr->secondFieldOffsetWidth[2] = 0;

          }

    Output File (renamed by txt extension, so renamed back to .h264 extension) : 4048.sample_1.txt

    Observation : There is a jumping effect in output h264 file.\

    2. We did below changes in omx source to resolve jumping effect in encoded file.

    File : ezsdk_dm814x-evm_5_05_01_04/component-sources/omx-ti81xx-src_05_02_00_46/src/ti/omx/comp/venc/src/omx_h264ve.c

          if ( frameDataContentType.eContentType == OMX_Video_Interlaced )
          {
            pVidEncComPvt->tVedEncInBufsPtr->contentType = IVIDEO_INTERLACED;
            pVidEncComPvt->tVedEncInBufsPtr->dataLayout = IVIDEO_FIELD_SEPARATED;
            pVidEncComPvt->tVedEncInBufsPtr->topFieldFirstFlag = 1;

            pVidEncComPvt->tVedEncInBufsPtr->secondFieldOffsetHeight[0] = 0;
            pVidEncComPvt->tVedEncInBufsPtr->secondFieldOffsetHeight[1] = 0;
            pVidEncComPvt->tVedEncInBufsPtr->secondFieldOffsetHeight[2] = 0;
            pVidEncComPvt->tVedEncInBufsPtr->secondFieldOffsetWidth[0] = 0;
            pVidEncComPvt->tVedEncInBufsPtr->secondFieldOffsetWidth[1] = 0;
            pVidEncComPvt->tVedEncInBufsPtr->secondFieldOffsetWidth[2] = 0;

          }

    Output File (renamed by txt extension, so renamed back to .h264 extension) :

    5557.sample_2.txt

    5810.sample_3.txt

    Observation : There is not jumping effect in both the videos (sample_2, sample_3) but having issue in resolution. We modify FrameHeight parameter value (from application side) to generate this two different (sample_2 and sample_3) encoded files.

    As we were doubting on capture parameters but after this test case it seems to have some issue with encoder setting. Can you suggest us any solution.

  • Hi Brijesh,

    Configuration with Sample-2 seems to be correct to me since the inputHeight should be half of actual height.

    What is the issue with sample_2 now?

    Ram

  • Hi Ram,

    Sample-1 video is full size(in terms of height) video in which you can see play button(bottom left side) as well where Sample-2 video is exactly half in height of actual video there is not any play button is visible, it should be full size(same hight covered with Sample-1) video. Both this videos are for same location and captured with same camera. Sample-3 video is covering full height but having wrong resolution.

  • Hi Brijesh,

    Please refer the dataLayout table I posted earlier in this.

    Looks there is some mistake. When dataLayout = FIELD_SEPARATED, secondFieldWidht/height is 0, encoder treats it as 60 process call enocidng. It should be set to a non-zero value(ID 2)

    Santhosh,

    Can you please comment?

    Ram

  • Brijesh,

    I think you are messing up with resolutions for capture device and encoder. Please share few frames of raw data (YUV) fed to encoder in all three cases. 

    Raw data -> output of capture device i.e., encoder input

    How is your capture device configured? resolution ? fps ? How are fields stored , field separate or field interleaved manner? You cannot simply play with encoder settings unless you know the capture device behaviour.

    Thanks,

    Santosh

  • Hi Ram, Santhosh,

    We have tested capture encode application on EVM below is our observations.

    1. Test with default capture_encode application (Progressive Capture on ti8148EVM)

    Input Video : 1080i

    Output Encoded File(renamed by txt extension, so renamed back to .h264 extension) : 3463.evm_sample_1.txt

    2. Test with capture_encode application (Interlaced Capture on ti8148EVM)

    We added below code in capture_encode application for interlaced encoding

    file : component-sources/omx_05_02_00_46/examples/ti/omx/demos/capture_encode/src/ilclient_utils.c

    function : IL_ClientSetEncodeParams()

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

    OMX_ERRORTYPE IL_ClientSetEncodeParams (IL_Client *pAppData)
    {
      ...
      ...

      OMX_INIT_PARAM (&tStaticParam);

      tStaticParam.nPortIndex = OMX_VIDENC_OUTPUT_PORT;

      eError = OMX_GetParameter (pHandle, OMX_TI_IndexParamVideoStaticParams,
                                 &tStaticParam);

      /* To use extended parameters */
      tStaticParam.videoStaticParams.h264EncStaticParams.rateControlParams.HRDBufferSize
                                                 = 4000000;
      tStaticParam.videoStaticParams.h264EncStaticParams.videnc2Params.encodingPreset
                                                 = XDM_USER_DEFINED;
      tStaticParam.videoStaticParams.h264EncStaticParams.videnc2Params.rateControlPreset
                                                 = IVIDEO_USER_DEFINED;

      /* for interlace, base profile can not be used */
      tStaticParam.videoStaticParams.h264EncStaticParams.videnc2Params.profile = IH264_HIGH_PROFILE;
      tStaticParam.videoStaticParams.h264EncStaticParams.videnc2Params.level = IH264_LEVEL_22;

      /* setting Interlace mode */
      tStaticParam.videoStaticParams.h264EncStaticParams.videnc2Params.inputContentType = IVIDEO_INTERLACED;
      tStaticParam.videoStaticParams.h264EncStaticParams.bottomFieldIntra = 0;
      tStaticParam.videoStaticParams.h264EncStaticParams.interlaceCodingType = IH264_INTERLACE_FIELDONLY;
      tStaticParam.videoStaticParams.h264EncStaticParams.videnc2Params.encodingPreset = XDM_USER_DEFINED;
      tStaticParam.videoStaticParams.h264EncStaticParams.videnc2Params.rateControlPreset = IVIDEO_USER_DEFINED;

      tStaticParam.videoStaticParams.h264EncStaticParams.intraCodingParams.lumaIntra4x4Enable = 309;
      tStaticParam.videoStaticParams.h264EncStaticParams.intraCodingParams.lumaIntra8x8Enable = 320;

     /* To set user-defined NAL Unit */
      tStaticParam.videoStaticParams.h264EncStaticParams.nalUnitControlParams.naluControlPreset = IH264_NALU_CONTROL_USERDEFINED;
      H264_SETNALU_MASK_SPS(tStaticParam.videoStaticParams.h264EncStaticParams.nalUnitControlParams.naluPresentMaskIntraPicture);
      H264_SETNALU_MASK_PPS(tStaticParam.videoStaticParams.h264EncStaticParams.nalUnitControlParams.naluPresentMaskIntraPicture);
      H264_SETNALU_MASK_SPS(tStaticParam.videoStaticParams.h264EncStaticParams.nalUnitControlParams.naluPresentMaskIDRPicture);
      H264_SETNALU_MASK_PPS(tStaticParam.videoStaticParams.h264EncStaticParams.nalUnitControlParams.naluPresentMaskIDRPicture);
      H264_SETNALU_MASK_SEI(tStaticParam.videoStaticParams.h264EncStaticParams.nalUnitControlParams.naluPresentMaskIDRPicture);
      H264_SETNALU_MASK_SPS(tStaticParam.videoStaticParams.h264EncStaticParams.nalUnitControlParams.naluPresentMaskStartOfSequence);
      H264_SETNALU_MASK_PPS(tStaticParam.videoStaticParams.h264EncStaticParams.nalUnitControlParams.naluPresentMaskStartOfSequence);
      H264_SETNALU_MASK_SEI(tStaticParam.videoStaticParams.h264EncStaticParams.nalUnitControlParams.naluPresentMaskStartOfSequence);

      /* To set VUI information */
      tStaticParam.videoStaticParams.h264EncStaticParams.vuiCodingParams.vuiCodingPreset = IH264_VUICODING_USERDEFINED;
      tStaticParam.videoStaticParams.h264EncStaticParams.vuiCodingParams.hrdParamsPresentFlag = 1;
      tStaticParam.videoStaticParams.h264EncStaticParams.vuiCodingParams.timingInfoPresentFlag = 1;

      tStaticParam.videoStaticParams.h264EncStaticParams.maxIntraFrameInterval = 0xFFFF;

       eError = OMX_SetParameter (pHandle, OMX_TI_IndexParamVideoStaticParams,
                                 &tStaticParam);

      ...
      ...
    }

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

    Input Video : 1080i

    Output Encoded File (renamed by txt extension, so renamed back to .h264 extension) : 5140.evm_sample_2.txt

    Observation : Same jumping effect is there in encoded file.

    So we are facing same jumping effect issue for interlaced encoding in EVM as well.

  • Hi Ram, Santhosh,

    Please find attached required yuv file : https://shared.com/ejthg7977u

    Resolution : PAL

    FPS : 25

    Field Stored : Field Separated

    I have already posted capture device configuration in this post (

    2337.SetCaptureParams.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    OMX_ERRORTYPE IL_ClientSetCaptureParams (IL_Client *pAppData)
    {
    OMX_PARAM_VFCC_HWPORT_PROPERTIES sHwPortParam;
    OMX_PARAM_VFCC_HWPORT_ID sHwPortId;
    OMX_CONFIG_VFCC_FRAMESKIP_INFO sCapSkipFrames;
    OMX_PARAM_CTRL_VIDDECODER_INFO sVidDecParam;
    OMX_PARAM_BUFFER_MEMORYTYPE memTypeCfg;
    OMX_PARAM_PORTDEFINITIONTYPE paramPort;
    OMX_ERRORTYPE eError = OMX_ErrorNone;
    OMX_INIT_PARAM (&paramPort);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    ).

  • Hello Ram/Santosh/Feroz,

    If you guys play this YUV file posted by Brijesh in YUVTool, It shows both the fields are separate which means VFCC captures interlaced input as field separated. One more thing is to observe closely is "In Frame-16, bottom field has 1st vertical jump, In Frame-22, again bottom field has (2nd) jump, In Frame-23 both the fields have jump.

    So what we understood is,

    1) VPSS capture hardware misses/duplicates some of the scan lines of the captured video.

    2) Both the fields individually has jumps, so when it is encoded/rendered as Frame, it shows continuous and big jumps

    3) And as a result encoded data (in capture_encode demo) has jumping interlaced encoded video.

    We also did the same thing with EVM board with EIO which has TVP7002 decoder chip, in that also we are getting jumpy encoded video (posted by Brijesh) in above post. So the issue is not with the decoder chips which we used in our product (correct if we are wrong).

    Please respond quickly and give some directions so that we can move ahead.

    Regards,

    Hitesh

  • Hi Hitesh/Brihesh,

    We will download the YUV and test in stand-alone. I am still having soem doubts.

    1) What is the behaviour for this YUV with "encode" demo?

    2) Your earlier thread said, Capture(Interlaced) -> DEI -> Encode works properly. is this with TVP7002 as decoder?

    Santhosh,

    Please encode this yuv in stand-alone and let us know the behaviour.

    Thanks

    Ram

  • Hi Brijesh/Hitesh,

    Is it possible to share your ilclient for Capture--> encode example with TVP7002 as decoder for interlace encoding so that, I will try to reproduce the issue here?

    Thanks

    Ramprasad

  • Hitesh has already concluded saying that the issue is with capture device and not encoder HW/SW. And the same was even said by Ram in earlier replies. So now we will have to look more into capture HW rather than doubting on encoder.

    I could download the YUV but not able to play it or encode it. Is it PAL 576i ? 

    Question : For time being, is it okay if you that capture device captures in progressive mode and encoder streams it into interlaced bit stream ? This would be one more test to rule out doubt on encoder. 

    Capture :: 720 x 576 progressive

    Encoder Settings : 

     pVidEncComPvt->tVedEncInBufsPtr->contentType = IVIDEO_INTERLACED;
     pVidEncComPvt->tVedEncInBufsPtr->dataLayout = IVIDEO_FIELD_INTERLEAVED; Width = capture_width = 720 Height = Capture_height >> 1 = 288

    Thanks,

    Santosh


  • Hi Ram, Santosh,

    Please find our answers in-line to your questions.

    1) What is the behaviour for this YUV with "encode" demo?

    - YUV file that we captured is YCbCr and encode only demo requires YUV420SemiPlanar.

    - YUV file it self has jumping effect so it will also propogate to encoder as well.

    - Can you check that YUV file and let us know what is reason behind such jumping ? Am I doing any wrong in capture configuration or this is something know isuue in HDVPSS driver itself ?

    2) Your earlier thread said, Capture(Interlaced) -> DEI -> Encode works properly. is this with TVP7002 as decoder?

    - This is working for any decoder chip (TVP7002, ADV7611 and FPGA SDI decoder core)

    - This is only with progressive encoding while DEI is enabled.

    - Our observation is that DEI removes jumping effect of captured YUV data so encoder encodes it properly and we didn't have any jumping effects.

    Let me know if you need any more information.

  • Hi Ram,

    Please find attached ilclient.c and ilclient_utils.c

    0753.ilclient.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    /*
    * Copyright (c) 2010-2011, Texas Instruments Incorporated
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    *
    * * Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    *
    * * Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in the
    * documentation and/or other materials provided with the distribution.
    *
    * * Neither the name of Texas Instruments Incorporated nor the names of
    * its contributors may be used to endorse or promote products derived
    * from this software without specific prior written permission.
    *
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    4617.ilclient_utils.c

    Let me know if you need any more information.

  • Hi Santosh,

    I have verified that YUV file by downloading and playing in YUV Player.

    Please find below snaps having all information of YUV file. Try to play in YUV Tools with below settings.

    As per your question we did encoder setting for interlace encoding and capture setting for progressive capture.

    Input : 576p

    Output : https://shared.com/x23okllfi1

    Observation : If you play this encoded file, It has issue of croma offset as a result color is not proper but in Elecard player if you play with Y only data setting there is no jumping in encoded file.

    So we can conclude that issue is not with interlace encoding but in interlace capture.

    Let me know if you need any more information.

  • Thanks Brijesh,

    I tried to integrate your files. I am getting compilation errors for the the new variables added by you.

    Can you please share ilclient.h and ilClient_uitls.h also?

    Thanks

    Ram

  • Hi Brijesh,

    I just came to know, there is one bug in VFCC component for interlaced capturing.

    Can you please try applying the attached patch and let me know if this resolves the issue?

    Thanks

    Ram

  • Hi Brijesh,

    .patch extension was not uploaded. I have renamed it to .txt

    3386.interlaced_capture_fix.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    diff -crB omx-ti81xx-src_05_02_00_48/src/ti/omx/comp/vfcc/src/omx_vfcc_drvif.c michael_field_merge/omx-ti81xx-src_05_02_00_48/src/ti/omx/comp/vfcc/src/omx_vfcc_drvif.c
    *** omx-ti81xx-src_05_02_00_48/src/ti/omx/comp/vfcc/src/omx_vfcc_drvif.c 2013-04-26 16:58:21.326176677 +0530
    --- michael_field_merge/omx-ti81xx-src_05_02_00_48/src/ti/omx/comp/vfcc/src/omx_vfcc_drvif.c 2013-04-26 18:47:55.850424171 +0530
    ***************
    *** 1209,1215 ****
    storagePrms.bufferFmt = FVID2_BUF_FMT_FRAME;
    /* capture would give fid as top or bottom field in case of interlace */
    if (pVFCCComPvt->hwPortProperties.eScanType == OMX_VIDEO_CaptureScanTypeInterlaced) {
    ! storagePrms.bufferFmt = FVID2_BUF_FMT_FIELD;
    }
    storagePrms.fieldMerged = pVFCCComPvt->bFieldMerged;
    status = FVID2_control (pVFCCComPvt->fvidHandle[handleId],
    --- 1209,1220 ----
    storagePrms.bufferFmt = FVID2_BUF_FMT_FRAME;
    /* capture would give fid as top or bottom field in case of interlace */
    if (pVFCCComPvt->hwPortProperties.eScanType == OMX_VIDEO_CaptureScanTypeInterlaced) {
    ! if(pVFCCComPvt->bFieldMerged == OMX_FALSE) {
    ! storagePrms.bufferFmt = FVID2_BUF_FMT_FIELD;
    ! }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Ram,

    Please find attached capture_encode application.

    I am also verifying your patch and update you soon.

    Please change file extension to .tgz

    8156.capture_encode.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    ···�$R·�=ks�Ʋ���?bΦ�··����·��U···�:{sR*Y·�c!�h�·����y������·U%F3===�=�=3�Y�
    �yHM�����߼�S�Tj������^�=���VkU���7�Zeg����}·ʫ���{o�ދP���Yd���FW�����
    ·3·����CYiv��>P����+����+�_٭�`}u·~�!�ut���·��w�IǎG·I�N�1����·k·��<�3·5�ul+r|/����Y7$��w�XB�<·�0�#�x��a·�sg��̾ft�Á��#2·a�z��·n·
    E�\�·r·��+��4W�����·ͯll��···�eK׷-����{+:�����·����u�(��Gs��/htM)·|·ފ·2�Νhz�5··D��0��Fd��·
    9 �<�6��l+��·��·*�3wB���··���·ٙ69 ���.�B2··?J�R�·X·��wL�·�O� �·h� ���>��q·>·0�·�/�·���·����je���·v�Z�۫n��k<K��P/2aj��4��>·�/d��?8��{!������(�����W����G���·�)o��··+·܆�d
    ·�.�··e·�W-�·8·Ft�E�|·J���·�����C[޼OG·@8··�y�3�����Ц�����·
    ·�5�H··��󈣙�#g,=C�X`��#͜·
    �'t·h�����5�@··���·G�
    g4:P��!�{8I·�=��·���,�·
    �$S8·x<?rlZ·��·��'2K·�j��3�a�·j��·s·50bp:�··��*T#��·��··p18·Q���D·\z�9=��·;��m·Ƴf· �_�`0 8JHQ�D��=э·2��··j·��'�·A)Ee·���·��·�l�\q=��P/���qt��"����ڨ|��A�·Q�<����G78�
    bt[��z_#���~қZ�·�J�4���}��t@N���7H�ӄ�Π�···](x[7��[�·+��D��·��A�}����: �·���@׌"�;����wN�·��Nw@���>�A�()Ӗ4%�·9���Sx�·�m}����····�I��·�a���z�~�kh·��ԍF���i�·P·=·��··��n/��{���0·aU�C>ր��q[···�z_k·pdɯ·0·�l·���·:����4·W�����·����!·i���'0��#8·�j·��··l1���@····9�v�������74·g��Њ�ˠ�;··�9���s>ꝁ��·{··@���%��·͛��··a��gD����·ĝ�jP�G·s�Ց%·p�1H�b���Aj������·���·�\7�·�P7·H·ݟס�!·>�··?SJ-y·B&z�ԛ�t·�lja�R�8··�R··i�l��·,·�3aQ0�
    ���·�=·��h·��0��a.Rr�ߐ�����·�jZ�(`�+�߫���P�0���\���޾,ћ�·9%۟��]��=��ٸ�r�R�Vc;�e�·�h·QP4�� �q�;·���··�����Q·��·��·S�1G�-H�m���··�a·��···���d��·L�����V�0OM3�݈��V··z۔��zo��··
    ·�����f�;�����
    K�45··(w���(�+p.#·���eT�bu���·v·l���<H�2n# �zspJ�'_��Ze·��·7�)��·�E��F]��|��-·>%��MEFKo�ڴ��_$�-𧄁�s��F�Yǰ·��KgшX�v·T1��կ���·�.Ȣc}�-�·�8��·�8y��ӛEBҭ���T··.·-x\����
    ··��~·�� �q�··nv��4���·ˀ···�r·���·>·F·����y�8�&··0�3ܞ�*·�`·�cǥ?���·p···Q·D8&·=��·2� F�C�C�·bc�4Kp�··���nMgt�··10o.X(·t�z�R·%�·.x���J�9�
    0��w0��&·��(%[·�9(������IJ<"�·vQ D���)��-� ��·/�·;��|�iШ!֣=·�a�SQE��z·4�Ȃ���k|·���M�<��`���W�·����·D���Jԧb}"qI#�=�� �^�<�����ς��y·Z·A·�u��···��� `k
    ·�"�··��Ƿ�{̙x|�·-�,�� p.=·��Gp�5#8�·��=�·9� ··w����)�`M�J·�P�@·>���·L·�bL�'��c�··/6��N?���· 8CF��·��?���C:�:3�··@��`|·�[g�Cw�r�·�ҳ����A|��5�1=����W�·�5x��yS���U6���l��6�·�f�o��������m���$��-��އS�#�_··�gZ·J�(�··
    &·m'���s����7�n·s!·3�·�󫕸"e��AK�]�|A�D··��3���ǐ^�j��··�\7�{�|\·9��·����··��=�l�C,���G��P��·���5�·Ɔ��^�·v�":�Z·+(�-[
    ·������·b¿�h·����c��u.·�B0··e�ȶ�l���.C����܋ "+·��;·:��&��[·LCX�#·pc����MB�1LXʍ��S�g7e·��ز)+�·�ά��j��K߆·����Ӛȍ�l;����T����fl�·,y·��~·�ށ@����·�����FdN·_��f�؟{<·n*�I��/��+D6�"·�^·�Ciw·'�U·�x���P��D>�<·%`·gKC��=b9·Mt
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Ram,

    Thank you for this patch. I have tried this patch and tested application but still there is same problem of jumping effect in encoded file.

    Are you able to compile our capture_encode application source ?

1 2