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.

TMS320DM368: H264 encoder simultaneous with DEI problem

Part Number: TMS320DM368

Hello all,

I am using DVSDK 4_02_00_01 and facing a problem related to simultaneous use of DEI and h264 encoder

My application goes into deadlock or receives a SIGSEV.


I am attaching debug logs and hoping to get this issue resolved

CrashDebug.txt

Thanks and Regards

Apurv Padole

  • Anyone facing same problem? Can someone resolve this Issue?

  • Hi Apurv,

    Can you try setting the below parameter to 1.

    enableDDRbuff = 1

  • Enabled this flag. Still no luck
  • h264Params.videncParams.size = sizeof(IH264VENC_Params);
    h264Params.profileIdc = 100; /*!< profile idc */
    h264Params.levelIdc = 50; /*!< level idc */
    h264Params.entropyMode = 1; /*!< entropy mode flag 0-CAVLC, 1-CABAC */
    h264Params.transform8x8FlagIntraFrame = 1; /*!< Flag for 8x8 Transform in Inter frames*/
    h264Params.transform8x8FlagInterFrame = 1; /*!< Flag for 8x8 Transform in Intra Frames*/
    h264Params.seqScalingFlag = 1;
    h264Params.videncParams.maxFrameRate = 25000;
    h264Params.videncParams.reconChromaFormat = 9;
    h264Params.videncParams.rateControlPreset = 2;
    h264Params.videncParams.maxBitRate = 1500000;
    h264Params.videncParams.encodingPreset = 2;
    h264Params.videncParams.maxWidth = 576;
    h264Params.videncParams.maxHeight = 720;
    h264Params.videncParams.inputChromaFormat = 9;
    h264Params.enableDDRbuff = 1;

    Other h264 prameters are set to default.

    Both DEI and H264 encoders process are running in different threads.
    Output buffer from deinterlacer is given to Resizer, Resizer converts this to expected resolution viz 736x576 and then output buffer from resizer is given to H264 encoder.
    I am creating Output buffer for Dei just before calling the process function.

    DEI version 2.0 and H264 version 2.20

    opermode in uboot is set to one shot mode

    both algorithms are in different scratch group id and if they are in same scratch group id then frame loss occurs.

  • Please do reply i am waiting for you solution.
  • Hi,

    Apurv Padole said:
    H264 version 2.20

    this is quite old version. Latest GAed release is 02.30.00.06 downloadable @ 

    I have attached the debug library of latest version along with its interface file. please take the necessary changes in interface files. Can you try with this debug library, rename it to .a. All your parameter settings looks fine. 

    h264venc_ti_arm926_debug.a.txt

    ih264venc.h

  • Hello Prashanth,

    Thank you for your support.

    I have changed Codec and debug library as suggested by you. Now I am not getting Segmentation fault but there is a FATAL Non recoverable error in H264 process.

    I am attaching current debug logs:13Feb_CrashingDebug2.txt


    Thanks and Regards,

    Apurv Padole

  • Hi Apurv,
    Thanks for log. and the update.

    Did you use debug library for this log? If no, can you please rename the debug lib which I shared to "h264venc_ti_arm926.a". Don't enable CE_DEBUG logs for now. The debug library logs should be sufficient for now. Also can you share all the parameters you use now.

  • Hi Praveen,

    Really Sorry couldn't get back in time

    h264 parameters are same as before.

    Deinterlacer Parameters

        deiAttrs.height = 576;
        deiAttrs.width = 720;
        deiAttrs.inFormat = ColorSpace_UYVY;
        deiAttrs.outFormat = ColorSpace_UYVY;
        deiAttrs.threshold[0] = 1;
        deiAttrs.threshold[1] = 33;
        deiAttrs.sysBaseAddr = sysBaseAddr;

        deiOutBufferAttrs.dim.height = 576;
        deiOutBufferAttrs.dim.width = 720;
        deiOutBufferAttrs.dim.lineLength = Dmai_roundUp(BufferGfx_calcLineLength(deiOutBufferAttrs.dim.width,
                        ColorSpace_UYVY), 32);
        deiOutBufferAttrs.dim.x = 0;
        deiOutBufferAttrs.dim.y = 0;
        deiOutBufferAttrs.colorSpace = ColorSpace_UYVY;


    I have changed the H264 debug library and i am attaching Debug logs

    14Jan_DebugCrashing.txt
    CODEC_DEBUG_ENABLE: Inside Funtion to get memtab Requirement -> H264VENC_TI_numA
    lloc                                                                            
    CODEC_DEBUG_ENABLE: Number of memtabs required: 15                              
    CODEC_DEBUG_ENABLE: Inside Funtion to Get Memory Requirements of the current alg
    oirthm  instance -> H264VENC_TI_alloc                                           
    CODEC_DEBUG_ENABLE: H264VENC_TI_Obj-memTab[0].size =             0x0710         
    CODEC_DEBUG_ENABLE: tH264EncState-memTab[1].size =               0x1498         
    CODEC_DEBUG_ENABLE: tH264EncState-memTab[2].size =               0x1498         
    CODEC_DEBUG_ENABLE: EXT_MEM_SCRATCH-memTab[3].size =             0x5000         
    CODEC_DEBUG_ENABLE: EXT_MEM_PERSIST-memTab[4].size =             0x0800         
    CODEC_DEBUG_ENABLE: MAX_REF_BUFFERS-memTab[5].size =             0x199800       
    CODEC_DEBUG_ENABLE: LIST_SLICE_SIZES-memTab[6].size =            0x0320         
    CODEC_DEBUG_ENABLE: uiMaxCodeSize-memTab[7].size =               0xcd94         
    CODEC_DEBUG_ENABLE: uiMaxCodeSize-memTab[8].size =               0xcd94         
    CODEC_DEBUG_ENABLE: KALEIDO_COMMANDS-memTab[9].size =            0x10600        
    CODEC_DEBUG_ENABLE: AIR_BIT_STORAGE-memTab[10].size =            0x20000        
    CODEC_DEBUG_ENABLE: AIR_BIT_STORAGE-memTab[11].size =            0x40000        
    CODEC_DEBUG_ENABLE: tStPhysicalAddrHandle-memTab[12].size =      0x0280         
    CODEC_DEBUG_ENABLE: IMCOP_TO_DDR-memTab[13].size =               0xc000         
    CODEC_DEBUG_ENABLE: MEGAPIX_IMCOP_TO_DDR-memTab[14].size =               0x3900 
    CODEC_DEBUG_ENABLE: Exiting Funtion H264VENC_TI_alloc                           
                                                                                    
    CODEC_DEBUG_ENABLE: Inside Init Obj Function                                    
    CODEC_DEBUG_ENABLE: Intialises the memory allocated for a given handle object in
    stance                                                                          
    CODEC_DEBUG_ENABLE: Checking MemTab Parameters-> Base_Null, Base_Not_Aligned and
     Overlap                                                                        
    CODEC_DEBUG_ENABLE: Checking MemTab Parameters-> Base_Null, Base_Not_Aligned and
     Overlap Completed                                                              
    CODEC_DEBUG_ENABLE: Checking Input parameter Values                             
    CODEC_DEBUG_ENABLE: Checking of Input parameter Completed                       
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_Copy_codearm968 Function to Copy Code & D
    ata Sections                                                                    
    CODEC_DEBUG_ENABLE: Succesfully Copied Code & Data Sections                     
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_Copy_codearm968_3 Function to Copy Code &
     Data Sections                                                                  
    CODEC_DEBUG_ENABLE: Succesfully Copied Code & Data Sections                     
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_Copy_codearm968_4 Function to Copy Code &
     Data Sections                                                                  
    CODEC_DEBUG_ENABLE: Succesfully Copied Code & Data Sections                     
    CODEC_DEBUG_ENABLE: Initializing SPS parameters                                 
    CODEC_DEBUG_ENABLE: SPS parameters initialization Completed                     
    CODEC_DEBUG_ENABLE: Initializing PPS parameters                                 
    CODEC_DEBUG_ENABLE: SPS parameters initialization Completed                     
    CODEC_DEBUG_ENABLE: Inside Slice Initilization Call                             
    CODEC_DEBUG_ENABLE: Slice Initilization Completed                               
    CODEC_DEBUG_ENABLE: Inside IRES Call to get Number of Resources -> H264VENC_TI_n
    umResourceDescriptors                                                           
    CODEC_DEBUG_ENABLE: Number of Resources Required - 49                           
    CODEC_DEBUG_ENABLE: Inside IRES Call to Get Resource -> H264VENC_TI_getResouceDe
    scriptors                                                                       
    CODEC_DEBUG_ENABLE: Exiting IRES Call to Get Resource function                  
    CODEC_DEBUG_ENABLE: Inside DDR allocation                                       
    CODEC_DEBUG_ENABLE: Inside IRES Call to Init Resource -> H264VENC_TI_initResourc
    es                                                                              
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 0                                         
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 63                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b57e0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 1                                         
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 6                              
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b50c0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 2                                         
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 7                              
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b50e0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 3                                         
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 8                              
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5100                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 4                                         
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 9                              
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5120                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 5                                         
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 10                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5140                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 6                                         
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 11                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5160                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 7                                         
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 12                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5180                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 8                                         
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 13                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b51a0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 9                                         
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 14                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b51c0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 10                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 15                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b51e0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 11                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 16                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5200                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 12                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 17                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5220                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 13                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 18                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5240                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 14                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 19                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5260                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 15                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 20                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5280                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 16                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 21                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b52a0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 17                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 22                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b52c0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 18                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 23                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b52e0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 19                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 24                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5300                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 20                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 25                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5320                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 21                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 28                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5380                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 22                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 29                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b53a0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 23                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 30                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b53c0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 24                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 31                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b53e0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 25                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 32                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5400                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 26                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 33                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5420                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 27                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 34                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5440                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 28                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 35                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5460                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 29                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 36                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5480                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 30                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 37                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b54a0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 31                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 38                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b54c0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 32                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 39                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b54e0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 33                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 40                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5500                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 34                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 41                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5520                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 35                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 42                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5540                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 36                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 43                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5560                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 37                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 44                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5580                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 38                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 45                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b55a0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 39                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 46                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b55c0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 40                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 47                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b55e0                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 41                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 48                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5600                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 42                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 49                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5620                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 43                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 50                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5640                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 44                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 51                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5660                    
                                                                                    
    CODEC_DEBUG_ENABLE: Resource Number - 45                                        
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 52                             
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1                                   
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5680                    
    CODEC_DEBUG_ENABLE: IRES Call to Open EDMA Channel Successfully Completed       
    CODEC_DEBUG_ENABLE: Resource Number - 46                                        
    CODEC_DEBUG_ENABLE: HDVICP resoruce alloted                                     
    Setting dynParams size 736x576 bitrate 1500000                                  
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Activate Call -> H264VENC_TI
    _activate                                                                       
    CODEC_DEBUG_ENABLE: Inside IRES Call to Activate All Resources -> H264VENC_TI_ac
    tivateAllResources                                                              
    CODEC_DEBUG_ENABLE: Control Call With SETPARAM Command                          
    CODEC_DEBUG_ENABLE: Control Call With SETPARAM Command Completed Successfully   
    CODEC_DEBUG_ENABLE: Inside IRES Call to Deactivate All Resources -> H264VENC_TI_
    deactivateAllResources                                                          
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Deactivate Call -> H264VENC_
    TI_deactivate                                                                   
    Made XDM_SETPARAMS control call                                                 
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Activate Call -> H264VENC_TI
    _activate                                                                       
    CODEC_DEBUG_ENABLE: Inside IRES Call to Activate All Resources -> H264VENC_TI_ac
    tivateAllResources                                                              
    CODEC_DEBUG_ENABLE: Control Call With GETBUFINFO Command                        
    CODEC_DEBUG_ENABLE: Control Call With GETBUFINFO Command Completed Successfully 
    CODEC_DEBUG_ENABLE: Inside IRES Call to Deactivate All Resources -> H264VENC_TI_
    deactivateAllResources                                                          
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Deactivate Call -> H264VENC_
    TI_deactivate                                                                                         
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Activate Call -> H264VENC_TI
    _activate                                                                       
    CODEC_DEBUG_ENABLE: H264VENC_TI_encode function executing..                     
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Deactivate Call -> H264VENC_
    TI_deactivate                                                                   
    @5,503,265us: [+7 T:0x42eda490] ti.sdo.dmai - [Venc1] VIDENC1_process() failed w
    ith error (-1 ext: 0x8012)                                                      
    _ENCO Error: Failed to encode video buffer                                      
    Arm Load:19%, Resoultion:720x576, PreviewFps:73, EncodeFps:0, videoKBps:0       
                                                                                    
    Arm Load:0%, Resoultion:720x576, PreviewFps:0, EncodeFps:0, videoKBps:0         
                                                                                    
     emory status =  10564808 KB                                                    
    Arm Load:0%, Resoultion:720x576, PreviewFps:0, EncodeFps:0, videoKBps:0         
                                                                                    
    Arm Load:0%, Resoultion:720x576, PreviewFps:0, EncodeFps:0, videoKBps:0         
                                                                                    
     emory status =  10564808 KB      
    



    Thanks and regards
    Apurv Padole

  • Hi,

    Can you set your maxWidth = 1920 and maxHeight  = 1080 . And set inputWidth and inputHeight desired by you.

  • Still not working.

    Debug logs:

    16Jan2017.txt
    CODEC_DEBUG_ENABLE: Inside Funtion to get memtab Requirement -> H264VENC_TI_numAlloc
    CODEC_DEBUG_ENABLE: Number of memtabs required: 15
    CODEC_DEBUG_ENABLE: Inside Funtion to Get Memory Requirements of the current algoirthm  instance -> H264VENC_TI_alloc
    CODEC_DEBUG_ENABLE: H264VENC_TI_Obj-memTab[0].size =             0x0710
    CODEC_DEBUG_ENABLE: tH264EncState-memTab[1].size =               0x1498
    CODEC_DEBUG_ENABLE: tH264EncState-memTab[2].size =               0x1498
    CODEC_DEBUG_ENABLE: EXT_MEM_SCRATCH-memTab[3].size =             0x5000
    CODEC_DEBUG_ENABLE: EXT_MEM_PERSIST-memTab[4].size =             0x0800
    CODEC_DEBUG_ENABLE: MAX_REF_BUFFERS-memTab[5].size =             0x6b8800
    CODEC_DEBUG_ENABLE: LIST_SLICE_SIZES-memTab[6].size =            0x0320
    CODEC_DEBUG_ENABLE: uiMaxCodeSize-memTab[7].size =               0xcd94
    CODEC_DEBUG_ENABLE: uiMaxCodeSize-memTab[8].size =               0xcd94
    CODEC_DEBUG_ENABLE: KALEIDO_COMMANDS-memTab[9].size =            0x10600
    CODEC_DEBUG_ENABLE: AIR_BIT_STORAGE-memTab[10].size =            0x20000
    CODEC_DEBUG_ENABLE: AIR_BIT_STORAGE-memTab[11].size =            0x40000
    CODEC_DEBUG_ENABLE: tStPhysicalAddrHandle-memTab[12].size =      0x0280
    CODEC_DEBUG_ENABLE: IMCOP_TO_DDR-memTab[13].size =               0xc000
    CODEC_DEBUG_ENABLE: MEGAPIX_IMCOP_TO_DDR-memTab[14].size =               0x8e80
    CODEC_DEBUG_ENABLE: Exiting Funtion H264VENC_TI_alloc
    
    CODEC_DEBUG_ENABLE: Inside Init Obj Function
    CODEC_DEBUG_ENABLE: Intialises the memory allocated for a given handle object instance
    CODEC_DEBUG_ENABLE: Checking MemTab Parameters-> Base_Null, Base_Not_Aligned and Overlap
    CODEC_DEBUG_ENABLE: Checking MemTab Parameters-> Base_Null, Base_Not_Aligned and Overlap Completed
    CODEC_DEBUG_ENABLE: Checking Input parameter Values
    CODEC_DEBUG_ENABLE: Checking of Input parameter Completed
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_Copy_codearm968 Function to Copy Code & Data Sections
    CODEC_DEBUG_ENABLE: Succesfully Copied Code & Data Sections
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_Copy_codearm968_3 Function to Copy Code & Data Sections
    CODEC_DEBUG_ENABLE: Succesfully Copied Code & Data Sections
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_Copy_codearm968_4 Function to Copy Code & Data Sections
    CODEC_DEBUG_ENABLE: Succesfully Copied Code & Data Sections
    CODEC_DEBUG_ENABLE: Initializing SPS parameters
    CODEC_DEBUG_ENABLE: SPS parameters initialization Completed
    CODEC_DEBUG_ENABLE: Initializing PPS parameters
    CODEC_DEBUG_ENABLE: SPS parameters initialization Completed
    CODEC_DEBUG_ENABLE: Inside Slice Initilization Call
    CODEC_DEBUG_ENABLE: Slice Initilization Completed
    CODEC_DEBUG_ENABLE: Inside IRES Call to get Number of Resources -> H264VENC_TI_numResourceDescriptors
    CODEC_DEBUG_ENABLE: Number of Resources Required - 49
    CODEC_DEBUG_ENABLE: Inside IRES Call to Get Resource -> H264VENC_TI_getResouceDescriptors
    CODEC_DEBUG_ENABLE: Exiting IRES Call to Get Resource function
    CODEC_DEBUG_ENABLE: Inside DDR allocation
    CODEC_DEBUG_ENABLE: Inside IRES Call to Init Resource -> H264VENC_TI_initResources
    
    CODEC_DEBUG_ENABLE: Resource Number - 0 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 63 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b57e0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 1 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 6 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b50c0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 2 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 7 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b50e0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 3 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 8 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5100 
    
    CODEC_DEBUG_ENABLE: Resource Number - 4 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 9 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5120 
    
    CODEC_DEBUG_ENABLE: Resource Number - 5 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 10 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5140 
    
    CODEC_DEBUG_ENABLE: Resource Number - 6 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 11 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5160 
    
    CODEC_DEBUG_ENABLE: Resource Number - 7 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 12 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5180 
    
    CODEC_DEBUG_ENABLE: Resource Number - 8 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 13 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b51a0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 9 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 14 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b51c0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 10 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 15 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b51e0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 11 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 16 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5200 
    
    CODEC_DEBUG_ENABLE: Resource Number - 12 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 17 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5220 
    
    CODEC_DEBUG_ENABLE: Resource Number - 13 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 18 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5240 
    
    CODEC_DEBUG_ENABLE: Resource Number - 14 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 19 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5260 
    
    CODEC_DEBUG_ENABLE: Resource Number - 15 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 20 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5280 
    
    CODEC_DEBUG_ENABLE: Resource Number - 16 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 21 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b52a0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 17 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 22 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b52c0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 18 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 23 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b52e0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 19 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 24 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5300 
    
    CODEC_DEBUG_ENABLE: Resource Number - 20 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 25 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5320 
    
    CODEC_DEBUG_ENABLE: Resource Number - 21 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 28 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5380 
    
    CODEC_DEBUG_ENABLE: Resource Number - 22 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 29 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b53a0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 23 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 30 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b53c0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 24 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 31 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b53e0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 25 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 32 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5400 
    
    CODEC_DEBUG_ENABLE: Resource Number - 26 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 33 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5420 
    
    CODEC_DEBUG_ENABLE: Resource Number - 27 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 34 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5440 
    
    CODEC_DEBUG_ENABLE: Resource Number - 28 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 35 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5460 
    
    CODEC_DEBUG_ENABLE: Resource Number - 29 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 36 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5480 
    
    CODEC_DEBUG_ENABLE: Resource Number - 30 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 37 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b54a0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 31 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 38 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b54c0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 32 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 39 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b54e0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 33 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 40 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5500 
    
    CODEC_DEBUG_ENABLE: Resource Number - 34 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 41 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5520 
    
    CODEC_DEBUG_ENABLE: Resource Number - 35 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 42 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5540 
    
    CODEC_DEBUG_ENABLE: Resource Number - 36 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 43 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5560 
    
    CODEC_DEBUG_ENABLE: Resource Number - 37 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 44 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5580 
    
    CODEC_DEBUG_ENABLE: Resource Number - 38 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 45 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b55a0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 39 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 46 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b55c0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 40 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 47 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b55e0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 41 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 48 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5600 
    
    CODEC_DEBUG_ENABLE: Resource Number - 42 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 49 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5620 
    
    CODEC_DEBUG_ENABLE: Resource Number - 43 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 50 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5640 
    
    CODEC_DEBUG_ENABLE: Resource Number - 44 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 51 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5660 
    
    CODEC_DEBUG_ENABLE: Resource Number - 45 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 52 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450b5680 
    CODEC_DEBUG_ENABLE: IRES Call to Open EDMA Channel Successfully Completed
    CODEC_DEBUG_ENABLE: Resource Number - 46 
    CODEC_DEBUG_ENABLE: HDVICP resoruce alloted
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Activate Call -> H264VENC_TI_activate
    CODEC_DEBUG_ENABLE: Inside IRES Call to Activate All Resources -> H264VENC_TI_activateAllResources
    CODEC_DEBUG_ENABLE: Control Call With SETPARAM Command
    CODEC_DEBUG_ENABLE: Control Call With SETPARAM Command Completed Successfully
    CODEC_DEBUG_ENABLE: Inside IRES Call to Deactivate All Resources -> H264VENC_TI_deactivateAllResources
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Deactivate Call -> H264VENC_TI_deactivate
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Activate Call -> H264VENC_TI_activate
    CODEC_DEBUG_ENABLE: Inside IRES Call to Activate All Resources -> H264VENC_TI_activateAllResources
    CODEC_DEBUG_ENABLE: Control Call With GETBUFINFO Command
    CODEC_DEBUG_ENABLE: Control Call With GETBUFINFO Command Completed Successfully
    CODEC_DEBUG_ENABLE: Inside IRES Call to Deactivate All Resources -> H264VENC_TI_deactivateAllResources
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Deactivate Call -> H264VENC_TI_deactivate
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Activate Call -> H264VENC_TI_activate
    CODEC_DEBUG_ENABLE: H264VENC_TI_encode function executing.. 
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Deactivate Call -> H264VENC_TI_deactivate
    @9,272,047us: [+7 T:0x42eda490] ti.sdo.dmai - [Venc1] VIDENC1_process() failed with error (-1 ext: 0x8012)
    _ENCO Error: Failed to encode video buffer
    
    

  • Just for the record I am calling Resource allocation function(Venc1_create) for Deinterlacer before H264 Encoder resource allocation(Venc1_create("h264")). Is there some problem in doing so?

    When I call resources allocation for H264 encoder before Deinterlacer no SIGSEGV is received but Deinterlacing is not happening.

  • Can we get debug libraries for Deinterlacer 2.0 and JPEG to see what resources are shared how can we optimize our resources sharing.
  • Hi,

    Apurv Padole said:
    Just for the record I am calling Resource allocation function(Venc1_create) for Deinterlacer before H264 Encoder resource allocation(Venc1_create("h264")). Is there some problem in doing so?

    This should not cause any problem.

    Can you try setting the default params in the sample testapplication with h264 package. You can find it at dvsdk_insatlldir/dm365_codecs_xx_xx_xx_xx/packages/ti/sdo/codecs/h264enc/apps/client/test/testvecs/config/testparams.cfg

    let enableDDRbuff = 1; and also make sure XDM_YUV_420SP is fed to h264 encoder. Other formats are not supported.

    For Debug library of DEI you need to contact your local TI FAE. 

  • Hello,

    I tried allocating resources for h264 encoder before allocating resources for Deinterlacer and I can see some difference in the debug logs.

    Code was working but it Video quality deteriorated by this approach. I am attaching debug logs :

    17Jan2017.txt
    CODEC_DEBUG_ENABLE: Inside Funtion to get memtab Requirement -> H264VENC_TI_numAlloc
    CODEC_DEBUG_ENABLE: Number of memtabs required: 16
    CODEC_DEBUG_ENABLE: Inside Funtion to Get Memory Requirements of the current algoirthm  instance -> H264VENC_TI_alloc
    CODEC_DEBUG_ENABLE: H264VENC_TI_Obj-memTab[0].size =             0x0724
    CODEC_DEBUG_ENABLE: tH264EncState-memTab[1].size =               0x14a8
    CODEC_DEBUG_ENABLE: tH264EncState-memTab[2].size =               0x14a8
    CODEC_DEBUG_ENABLE: EXT_MEM_SCRATCH-memTab[3].size =             0x5000
    CODEC_DEBUG_ENABLE: EXT_MEM_PERSIST-memTab[4].size =             0x0800
    CODEC_DEBUG_ENABLE: MAX_REF_BUFFERS-memTab[5].size =             0x199800
    CODEC_DEBUG_ENABLE: LIST_SLICE_SIZES-memTab[6].size =            0x0320
    CODEC_DEBUG_ENABLE: uiMaxCodeSize-memTab[7].size =               0xcd20
    CODEC_DEBUG_ENABLE: uiMaxCodeSize-memTab[8].size =               0xcef8
    CODEC_DEBUG_ENABLE: KALEIDO_COMMANDS-memTab[9].size =            0x10680
    CODEC_DEBUG_ENABLE: AIR_BIT_STORAGE-memTab[10].size =            0x20000
    CODEC_DEBUG_ENABLE: AIR_BIT_STORAGE-memTab[11].size =            0x40000
    CODEC_DEBUG_ENABLE: tStPhysicalAddrHandle-memTab[12].size =      0x0280
    CODEC_DEBUG_ENABLE: IMCOP_TO_DDR-memTab[13].size =               0xc000
    CODEC_DEBUG_ENABLE: MEGAPIX_IMCOP_TO_DDR-memTab[14].size =               0x3900
    CODEC_DEBUG_ENABLE: Privacy Masking[15].size =           0x1dc0
    CODEC_DEBUG_ENABLE: Exiting Funtion H264VENC_TI_alloc
    
    CODEC_DEBUG_ENABLE: Inside Init Obj Function
    CODEC_DEBUG_ENABLE: Intialises the memory allocated for a given handle object instance
    CODEC_DEBUG_ENABLE: Checking MemTab Parameters-> Base_Null, Base_Not_Aligned and Overlap
    CODEC_DEBUG_ENABLE: Checking MemTab Parameters-> Base_Null, Base_Not_Aligned and Overlap Completed
    CODEC_DEBUG_ENABLE: Checking Input parameter Values
    CODEC_DEBUG_ENABLE: Checking of Input parameter Completed
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_Copy_codearm968 Function to Copy Code & Data Sections
    CODEC_DEBUG_ENABLE: Succesfully Copied Code & Data Sections
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_Copy_codearm968_3 Function to Copy Code & Data Sections
    CODEC_DEBUG_ENABLE: Succesfully Copied Code & Data Sections
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_Copy_codearm968_4 Function to Copy Code & Data Sections
    CODEC_DEBUG_ENABLE: Succesfully Copied Code & Data Sections
    CODEC_DEBUG_ENABLE: Initializing SPS parameters
    CODEC_DEBUG_ENABLE: SPS parameters initialization Completed
    CODEC_DEBUG_ENABLE: Initializing PPS parameters
    CODEC_DEBUG_ENABLE: SPS parameters initialization Completed
    CODEC_DEBUG_ENABLE: Inside Slice Initilization Call
    CODEC_DEBUG_ENABLE: Slice Initilization Completed
    CODEC_DEBUG_ENABLE: Inside IRES Call to get Number of Resources -> H264VENC_TI_numResourceDescriptors
    CODEC_DEBUG_ENABLE: Number of Resources Required - 49
    CODEC_DEBUG_ENABLE: Inside IRES Call to Get Resource -> H264VENC_TI_getResouceDescriptors
    CODEC_DEBUG_ENABLE: Exiting IRES Call to Get Resource function
    CODEC_DEBUG_ENABLE: Inside DDR allocation
    CODEC_DEBUG_ENABLE: Inside IRES Call to Init Resource -> H264VENC_TI_initResources
    
    CODEC_DEBUG_ENABLE: Resource Number - 0 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 63 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc7e0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 1 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 0 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc000 
    
    CODEC_DEBUG_ENABLE: Resource Number - 2 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 1 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc020 
    
    CODEC_DEBUG_ENABLE: Resource Number - 3 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 2 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc040 
    
    CODEC_DEBUG_ENABLE: Resource Number - 4 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 3 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc060 
    
    CODEC_DEBUG_ENABLE: Resource Number - 5 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 4 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc080 
    
    CODEC_DEBUG_ENABLE: Resource Number - 6 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 5 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc0a0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 7 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 6 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc0c0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 8 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 7 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc0e0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 9 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 8 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc100 
    
    CODEC_DEBUG_ENABLE: Resource Number - 10 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 9 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc120 
    
    CODEC_DEBUG_ENABLE: Resource Number - 11 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 10 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc140 
    
    CODEC_DEBUG_ENABLE: Resource Number - 12 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 11 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc160 
    
    CODEC_DEBUG_ENABLE: Resource Number - 13 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 12 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc180 
    
    CODEC_DEBUG_ENABLE: Resource Number - 14 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 13 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc1a0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 15 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 14 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc1c0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 16 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 15 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc1e0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 17 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 16 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc200 
    
    CODEC_DEBUG_ENABLE: Resource Number - 18 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 17 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc220 
    
    CODEC_DEBUG_ENABLE: Resource Number - 19 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 18 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc240 
    
    CODEC_DEBUG_ENABLE: Resource Number - 20 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 19 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc260 
    
    CODEC_DEBUG_ENABLE: Resource Number - 21 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 20 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc280 
    
    CODEC_DEBUG_ENABLE: Resource Number - 22 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 21 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc2a0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 23 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 22 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc2c0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 24 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 23 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc2e0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 25 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 24 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc300 
    
    CODEC_DEBUG_ENABLE: Resource Number - 26 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 25 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc320 
    
    CODEC_DEBUG_ENABLE: Resource Number - 27 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 28 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc380 
    
    CODEC_DEBUG_ENABLE: Resource Number - 28 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 29 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc3a0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 29 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 30 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc3c0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 30 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 31 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc3e0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 31 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 32 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc400 
    
    CODEC_DEBUG_ENABLE: Resource Number - 32 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 33 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc420 
    
    CODEC_DEBUG_ENABLE: Resource Number - 33 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 34 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc440 
    
    CODEC_DEBUG_ENABLE: Resource Number - 34 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 35 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc460 
    
    CODEC_DEBUG_ENABLE: Resource Number - 35 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 36 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc480 
    
    CODEC_DEBUG_ENABLE: Resource Number - 36 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 37 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc4a0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 37 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 38 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc4c0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 38 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 39 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc4e0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 39 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 40 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc500 
    
    CODEC_DEBUG_ENABLE: Resource Number - 40 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 41 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc520 
    
    CODEC_DEBUG_ENABLE: Resource Number - 41 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 42 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc540 
    
    CODEC_DEBUG_ENABLE: Resource Number - 42 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 43 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc560 
    
    CODEC_DEBUG_ENABLE: Resource Number - 43 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 44 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc580 
    
    CODEC_DEBUG_ENABLE: Resource Number - 44 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 45 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc5a0 
    
    CODEC_DEBUG_ENABLE: Resource Number - 45 
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 46 
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x450bc5c0 
    CODEC_DEBUG_ENABLE: IRES Call to Open EDMA Channel Successfully Completed
    CODEC_DEBUG_ENABLE: Resource Number - 46 
    CODEC_DEBUG_ENABLE: HDVICP resoruce alloted
    Setting dynParams size 736x576 bitrate 1500000
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Activate Call -> H264VENC_TI_activate
    CODEC_DEBUG_ENABLE: Inside IRES Call to Activate All Resources -> H264VENC_TI_activateAllResources
    CODEC_DEBUG_ENABLE: Control Call With SETPARAM Command
    CODEC_DEBUG_ENABLE: Control Call With SETPARAM Command Completed Successfully
    CODEC_DEBUG_ENABLE: Inside IRES Call to Deactivate All Resources -> H264VENC_TI_deactivateAllResources
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Deactivate Call -> H264VENC_TI_deactivate
    Made XDM_SETPARAMS control call
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Activate Call -> H264VENC_TI_activate
    CODEC_DEBUG_ENABLE: Inside IRES Call to Activate All Resources -> H264VENC_TI_activateAllResources
    CODEC_DEBUG_ENABLE: Control Call With GETBUFINFO Command
    CODEC_DEBUG_ENABLE: Control Call With GETBUFINFO Command Completed Successfully
    CODEC_DEBUG_ENABLE: Inside IRES Call to Deactivate All Resources -> H264VENC_TI_deactivateAllResources
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Deactivate Call -> H264VENC_TI_deactivate
    
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Activate Call -> H264VENC_TI_activate
    CODEC_DEBUG_ENABLE: Inside IRES Call to Activate All Resources -> H264VENC_TI_activateAllResources
    CODEC_DEBUG_ENABLE: H264VENC_TI_encode function executing.. 
    CODEC_DEBUG_ENABLE: DEVICE ID CHECK completed
    CODEC_DEBUG_ENABLE: SEI USERDATA INSERTION initialization done..
    CODEC_DEBUG_ENABLE: H264VENC_TI_Init executed..
    CODEC_DEBUG_ENABLE: bitstream initialization done..
    CODEC_DEBUG_ENABLE: pAddrHndl computed and stored..
    CODEC_DEBUG_ENABLE: reset_vIMCOP_every_frame done..
    CODEC_DEBUG_ENABLE: Inside ARM926 H264VENC_TI_Encode_Frame_HeaderGen Function Call
    CODEC_DEBUG_ENABLE: Sequence Scaling Flag is 3
    CODEC_DEBUG_ENABLE: Seq scaling matrix Copied in to CALC command set
    CODEC_DEBUG_ENABLE: Generating the NAL unit containing Sequence Parameter Set SPS
    CODEC_DEBUG_ENABLE: Generation of the NAL unit containing Sequence Parameter Set (SPS) Completed
    CODEC_DEBUG_ENABLE: Generating the NAL unit containing Picture Parameter Set PPS
    CODEC_DEBUG_ENABLE: Generation of NAL unit containing Picture Parameter Set PPS Completed
    CODEC_DEBUG_ENABLE: H264V_TI_DMA_Map_TC executed..
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_KALEIDO_PSC_Reset Function
    CODEC_DEBUG_ENABLE: Exiting H264VENC_TI_KALEIDO_PSC_Reset Function
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_KALEIDO_PSC_Enable_InitRam_Low Function
    CODEC_DEBUG_ENABLE: Exiting H264VENC_TI_KALEIDO_PSC_Enable_InitRam_Low Function
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_Loader_arm968 Function to Load Code & Data Sections
    
    CODEC_DEBUG_ENABLE: DMA of Section 0 and Parameters are:
            Source Address: 0x893f6000       Destination Address: 0x12040000         Number of Bytes: 32
    
    CODEC_DEBUG_ENABLE: DMA of Section 1 and Parameters are:
            Source Address: 0[  405.890000] MUX: initialized INT_HDVICP_ENABLE
    x893f6020        Desti[  405.900000] MUX: Setting register INT_HDVICP_ENABLE
    nation Address: [  405.900000]     INTMUX (0x00000018) = 0x00000004 -> 0x00000005
    0x12040100       Number of Bytes: 45244
    
    CODEC_DEBUG_ENABLE: DMA of Section 2 and Parameters are:
            Source Address: 0x894010dc       Destination Address: 0x1206649c         Number of Bytes: 3992
    
    CODEC_DEBUG_ENABLE: DMA of Section 3 and Parameters are:
            Source Address: 0x89402074       Destination Address: 0x12067734         Number of Bytes: 116
    CODEC_DEBUG_ENABLE: Succesfully Loaded Code & Data Sections
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_KALEIDO_PSC_SyncReset Function
    CODEC_DEBUG_ENABLE: Exiting H264VENC_TI_KALEIDO_PSC_SyncReset Function
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_KALEIDO_PSC_Enable Function
    CODEC_DEBUG_ENABLE: Exiting H264VENC_TI_KALEIDO_PSC_Enable Function
    CODEC_DEBUG_ENABLE: Inside ARM926 H264VENC_TI_Encode_Frame Function Call
    CODEC_DEBUG_ENABLE: Physical addresses computed and stored in the structure
    CODEC_DEBUG_ENABLE: H264VENC_TI_Encode_Frame Function Executed..
    CODEC_DEBUG_ENABLE: Generate interrupt to arm968 using KLD intc
    CODEC_DEBUG_ENABLE: H264VENC_TI_Encode_End calling..
    CODEC_DEBUG_ENABLE: Inside ARM926 H264VENC_TI_Encode_End Function Call
    CODEC_DEBUG_ENABLE: ARM926 H264VENC_TI_Encode_End Function Executed
    CODEC_DEBUG_ENABLE: H264VENC_TI_Encode_End executed..
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_KALEIDO_PSC_Reset Function
    CODEC_DEBUG_ENABLE: Exiting H264VENC_TI_KALEIDO_PSC_Reset Function
    CODEC_DEBUG_ENABLE: Updating EncOutParams..
    CODEC_DEBUG_ENABLE: H264VENC_TII_encode executed successfully..
    CODEC_DEBUG_ENABLE: Inside IRES Call to Deactivate All Resources -> H264VENC_TI_deactivateAllResources
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Deactivate Call -> H264VENC_TI_deactivate
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Activate Call -> H264VENC_TI_activate
    CODEC_DEBUG_ENABLE: Inside IRES Call to Activate All Resources -> H264VENC_TI_activateAllResources
    CODEC_DEBUG_ENABLE: H264VENC_TI_encode function executing.. 
    CODEC_DEBUG_ENABLE: DEVICE ID CHECK completed
    CODEC_DEBUG_ENABLE: SEI USERDATA INSERTION initialization done..
    CODEC_DEBUG_ENABLE: H264VENC_TI_Init executed..
    CODEC_DEBUG_ENABLE: bitstream initialization done..
    CODEC_DEBUG_ENABLE: pAddrHndl computed and stored..
    CODEC_DEBUG_ENABLE: reset_vIMCOP_every_frame done..
    CODEC_DEBUG_ENABLE: Inside ARM926 H264VENC_TI_Encode_Frame_HeaderGen Function Call
    CODEC_DEBUG_ENABLE: H264V_TI_DMA_Map_TC executed..
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_KALEIDO_PSC_Reset Function
    CODEC_DEBUG_ENABLE: Exiting H264VENC_TI_KALEIDO_PSC_Reset Function
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_KALEIDO_PSC_Enable_InitRam_Low Function
    CODEC_DEBUG_ENABLE: Exiting H264VENC_TI_KALEIDO_PSC_Enable_InitRam_Low Function
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_Loader_arm968_4 Function to Load Code & Data Sections
    
    CODEC_DEBUG_ENABLE: DMA of Section 0 and Parameters are:
            Source Address: 0x89403000       Destination Address: 0x12040000         Number of Bytes: 32
    
    CODEC_DEBUG_ENABLE: DMA of Section 1 and Parameters are:
            Source Address: 0x89403020       Destination Address: 0x12040100         Number of Bytes: 48832
    
    CODEC_DEBUG_ENABLE: DMA of Section 2 and Parameters are:
            Source Address: 0x8940eee0       Destination Address: 0x12066994         Number of Bytes: 3532
    
    CODEC_DEBUG_ENABLE: DMA of Section 3 and Parameters are:
            Source Address: 0x8940fcac       Destination Address: 0x12067a60         Number of Bytes: 116
    
    
    CODEC_DEBUG_ENABLE: H264VENC_TI_Encode_End calling..
    CODEC_DEBUG_ENABLE: Inside ARM926 H264VENC_TI_Encode_End Function Call
    CODEC_DEBUG_ENABLE: ARM926 H264VENC_TI_Encode_End Function Executed
    CODEC_DEBUG_ENABLE: H264VENC_TI_Encode_End executed..
    CODEC_DEBUG_ENABLE: Inside H264VENC_TI_KALEIDO_PSC_Reset Function
    CODEC_DEBUG_ENABLE: Exiting H264VENC_TI_KALEIDO_PSC_Reset Function
    CODEC_DEBUG_ENABLE: Updating EncOutParams..
    CODEC_DEBUG_ENABLE: H264VENC_TII_encode executed successfully..
    CODEC_DEBUG_ENABLE: Inside IRES Call to Deactivate All Resources -> H264VENC_TI_deactivateAllResources
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Deactivate Call -> H264VENC_TI_deactivate
    CODEC_DEBUG_ENABLE: Inside IRES Call to get Number of Resources -> H264VENC_TI_numResourceDescriptors
    CODEC_DEBUG_ENABLE: Number of Resources Required - 49
    CODEC_DEBUG_ENABLE: Inside IRES Call to Get Resource -> H264VENC_TI_getResouceDescriptors
    CODEC_DEBUG_ENABLE: Exiting IRES Call to Get Resource function
    CODEC_DEBUG_ENABLE: Inside IRES Call to DeInit Resource -> H264VENC_TI_deinitResources
    CODEC_DEBUG_ENABLE: Inside Funtion to get memtab Requirement -> H264VENC_TI_numAlloc
    CODEC_DEBUG_ENABLE: Number of memtabs required: 16
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Free Call -> H264VENC_TI_free
    
    

    maxWidth and maxHeight are set to 720 x 576

    Thanks and Regards

    Apurv Padole

  • Hi Apurv,
    Great to see it working fine. I suggest you to keep maxWidth and maxHeight as 1920x1080 or 1280x720(suffificent for your usecase). Set inputWidth = 720 and inputHeight = 576.

    For better Quality you can opt HIGH_QUALITY
    set encodingPreset = 1 or you can set
    encodingPreset = 3(user defined) and EncoderQuality = 2

    Note: encodingPreset will override EncoderQuality. Either of settings will set the encoder to HIGH Quality. More info is in UserGuide.
  • Hi Prashant,

    Sorry to bother you again, but Quality seems to be an issue caused due to loss of frames.

    Deinterlacer uses Current fame and previous frame for generating deinterlaced output, assuming every second out of 25 frames 3 frames are lost, quality will degrade.

    Please help me with the optimal way to allocate resources and minimal delay during simultaneous processing.

    Thanks and Regards
    Apurv Padole
  • Hi,

    What quality issues you are facing?

    Why are there frame drops? Do DEI and H264 encoders run at 30 fps?

    regards,

    Anand

  • Frame loss was due to prevention of preemption of algorithms. I locked mutex before calling DEI process and unlocked it after DEI process completion. Same mutex was locked before calling h264 enc process and unlocked after h264 enc process completion.

    We are back to square one Segmentation fault is occurring
    But not on a regular basis. It happens once in a while. I am unable to get backtrace logs.

  • Hi,

    Once you set 'enableDDRBuff=1' for the H264 encoder then you don't need the mutex.

    H264 and DEI can run in parallel.

    regards,

    Anand

  • Hi,

    I think mutex was the problem which caused frame loss. I removed it and frame loss was not happening.

    But now I am trying to debug segmentation fault which is not occurring always.
    Is there a way by which I can get back trace logs.
    I tried inserting Signal handler for SIGSEV and printing back trace logs using backtrace() call. But there are no prints available.
    I even tried gdb but no luck.

    regards
    Apurv
  • Hi,

    If debug library for DEI and JPEG is provided it would be easier to debug Segmentation fault.

    Thanks and Regards
    Apurv

  • Hi Apurv,
    Can you please explain your use case. Earlier it used to be DEI + H264 Encoder. Are you using DEI+H264Encoder+JPEG Encoder simultaneously? How are you setting the group id's?

    When you set enableDDRBuff=1(as suggested earlier and also by Anand), DEI+H264 Encoder should work with out any issues.
    Can you please share more logs when you see Segmentation Fault, it will help for further analysis.
  • Hello Prashanth,

    The response is as following:-

    >> Can you please explain your use case. Earlier it used to be DEI + H264 Encoder. Are you using DEI+H264Encoder+JPEG Encoder simultaneously? How are you setting the group id's?

    Our previous use case is like recording and capture at same time. So we initialized the JPEG encoder initially. We are creating the instance of H264 and DEI during record on.

    But now, we are only trying with video recording. In this case, we are creating the H264 and DEI encoder during record on but not creating the JPEG encoder. In this case, We are also getting sometime segmentation fault and sometimes kernel reboot.

    We are setting groud id '1' for H264 and JPEG and '2' for DEI.

    >> When you set enableDDRBuff=1(as suggested earlier and also by Anand), DEI+H264 Encoder should work with out any issues.
         Can you please share more logs when you see Segmentation Fault, it will help for further analysis.

    We set the enableDDRBuff=1 but we are getting segmentation fault.

    Logs files for kernel reboot is attached with this.    Kernel _Rebooting_logs.txt

    Thanks & Regards

    Uma Shanker

  • Hi Uma Shanker,
    Thanks for the detailed reply and kernel reboot log(I am a codec Engineer and have limited knowledge on system side. It looks like a system issue). Can you please share the segmentation fault logs too?

  • Hello Prashanth,

    Thanks for your response.

    Now we are not getting segmentation fault. We are now getting kernel reboots.

    Can you confirm me is it any dependency of h264 parameters when we are using h264 and dei simultaneously?

    Out cmem parameters is as following:-

    modprobe cmemk phys_start=0x87800000 phys_end=0x90000000 allowOverlap=1 phys_start_1=0x00001000 phys_end_1=0x00008000 pools_1=1x28672 useHeapIfPoolUnavailable=1

    I am attaching our configuration file.

    2134.encodedecode_new.txt
    /*
     * encodedecode.cfg
     *
     * This configuration file configures the DVSDK encodedecode demos  for 
     * DM365 platform 
     *
     * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ 
     * 
     * 
     *  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" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     *
    */
    
    /* Load support for the Codec Engine OSAL */
    var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global');
    
    /* Configure CE to use it's DSP Link Linux version */
    osalGlobal.runtimeEnv = osalGlobal.LINUX;
    
    /*
     *  ======== Engine Configuration ========
     */
    var H264ENC  = xdc.useModule('ti.sdo.codecs.h264enc.ce.H264ENC');
    var H264DEC  = xdc.useModule('ti.sdo.codecs.h264dec.ce.H264DEC');
    var JPEGENC  = xdc.useModule('ti.sdo.codecs.jpegenc.ce.JPEGENC');
    var JPEGDEC  = xdc.useModule('ti.sdo.codecs.jpegdec.ce.JPEGDEC');
    var IPRUN	= xdc.useModule('ti.sdo.codecs.iprun.ce.IPRUN');
    var DEI		= xdc.useModule('ti.sdo.codecs.dei.ce.DEI');
    
    var Engine = xdc.useModule('ti.sdo.ce.Engine');
    var myEngine = Engine.create("encodedecode", [
        {name: "h264enc", mod: H264ENC, local: true, groupId: 1},
        {name: "h264dec", mod: H264DEC, local: true, groupId: 1},
        {name: "jpegenc", mod:  JPEGENC, local: true, groupId: 1},
        {name: "jpegdec", mod: JPEGDEC, local: true, groupId: 1},
        {name: "iprun",   mod: IPRUN,   local: true, groupId: 2},
    	{name: "dei",     mod: DEI,     local: true, groupId: 2},
    ]);
    
    /* Load support for the 'Davinci Multimedia Application Interface' modules */
    var DMAI = xdc.loadPackage('ti.sdo.dmai');
    
    /* Configure RMAN */ 
    var RMAN = xdc.useModule('ti.sdo.fc.rman.RMAN');
    RMAN.useDSKT2 = false;
    RMAN.persistentAllocFxn = "__ALG_allocMemory";
    RMAN.persistentFreeFxn = "__ALG_freeMemory";
    RMAN.semCreateFxn = "Sem_create";
    RMAN.semDeleteFxn = "Sem_delete";
    RMAN.semPendFxn = "Sem_pend";
    RMAN.semPostFxn = "Sem_post";
    RMAN.tableSize = 10;
    
    /* Configure VICPSYNC */
    var VICPSYNC = xdc.useModule('ti.sdo.fc.vicpsync.VICPSYNC');
    
    /* Configure HDVICPSYNC */
    var HDVICPSYNC = xdc.useModule('ti.sdo.fc.hdvicpsync.HDVICPSYNC');
    
    /* Configure MEMUTILS */
    var MEMUTILS = xdc.useModule('ti.sdo.fc.memutils.MEMUTILS');
    
    var EDMA3 = xdc.useModule('ti.sdo.fc.edma3.Settings');
    EDMA3.globalInit = true;
    EDMA3.maxQdmaChannels = [10,10,10,10];
    EDMA3.trace = false;
    EDMA3.debug = false;
    EDMA3.maxRequests = 256;
    
    var HDVICP = xdc.useModule('ti.sdo.fc.ires.hdvicp.HDVICP');
    
    var VICP = xdc.useModule('ti.sdo.fc.ires.vicp.VICP2');
    VICP.debug = false;
    
    var ADDRSPACE = xdc.useModule('ti.sdo.fc.ires.addrspace.ADDRSPACE');
    
    var EDMA3CHAN = xdc.useModule('ti.sdo.fc.ires.edma3chan.EDMA3CHAN');
    
    var EDMA = xdc.useModule('ti.sdo.linuxutils.edma.EDMA');
    
    var CMEM = xdc.useModule('ti.sdo.linuxutils.cmem.CMEM');
    
    var MEMTCM = xdc.useModule('ti.sdo.fc.ires.memtcm.MEMTCM');
    
    var OSAL_SETTINGS = xdc.useModule('ti.sdo.ce.osal.linux.Settings');
    
    OSAL_SETTINGS.maxCbListSize = 200;
    
    MEMTCM.cmemBlockId = 1; //Since we use _1 in our insmod command.
    
    /* Uncomment these lines if you wish to debug FC and enable FC trace */
     
    /*
    xdc.loadPackage('ti.sdo.fc.ires.vicp').profile = "debug_trace";
    xdc.loadPackage('ti.sdo.fc.ires.edma3chan').profile = "debug_trace";
    xdc.loadPackage('ti.sdo.fc.rman').profile = "debug_trace";
    xdc.loadPackage('ti.sdo.fc.edma3').profile = "debug_trace";
    EDMA3CHAN.trace = true;
    EDMA3CHAN.debug = true;
    */
    

    Thanks and Regards

    Uma Shanker

  • Hi Uma Shanker,

    There is no dependency between the H264 encoder and DEI as long as 'enableDDRBuff = 1' for the H264 encoder.

    I think the kernel reboots are because of WDT kicking in, because your system has hung.

    Pl. make sure H264 encoder is working properly in your system.

    regards,

    Anand

  • Hello Anand,


    Will kernel throw SIGSEV signal to application if system hangs?

    regards,
    Apurv

  • Hi Apurv,

    If you have enabled the Watch Dog Timer (WDT) then it will expire when there is inactivity and reboots the system.

    regards,

    Anand

  • Hello Anand,

    This issue is also coming after disabled the Watch Dog Timer (WDT).

    regards
    Uma Shanker