i tried with the working configuration with CE_DEBUG=3 that time also it rebooted automatic and then tried to run , it was running absolutely fine.
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.
Hi Anshuman,
As i informed you already the new codec is now working fine with our exisisting application.
As i was trying to verify the fps for platinum codec , i found it's not coming to appx 30fps.
after cross checking the relese document i modifed 1st " encodingPreset = XDM_HIGH_QUALITY / XDM_HIGH_SPEED" earlier i had defined it XDM_USER_DEFINED.
then VIDENC1_create() is returnning NULL.
what can be the problem ?
also what are the parameters UMV, PRC, SM means as mentioned in Table-1.
H.264 High profile levels up to 5.0, UMV – ON, PRC – H264_ENC_01 OFF,T8x8Inter – OFF and T8x8Intra – OFF, SM – ON, CABAC – ON, encoderPreset – XDM_HIGH_SPEED/XDM_HIGH_QUALITY, IntraPeriod-30
Hi Sujit,
What was the encQuality setting that you were using with XDM_USER_DEFINED? What are the parameters that you are using for creating the codec? How much is the fps you are getting when your system is working?
Please share the log with CE_DEBUG=3 so that we can provide some inputs, looking at the log.
Regards,
Anshuman
PS: Please mark this post as verified if you think it has answered your questions. Thanks.
earlier with encodingPreset = XDM_USER_DEFINED encQuality = 0; which was working and fps i was getting 22.
now i modified
encodingPreset = XDM_HIGH_QUALITY; // XDM_USER_DEFINED;
encQuality = 2; // 0;
entropyMode = 1; // 0 ; /*1: CABAC 0: CAVLC */
unrestrictedMV = 1; // 0; /* 0 : Disable 1: Enable */
transform8x8FlagIntraFrame = 0;
transform8x8FlagInterFrame = 0;
sliceMode = 3; // 0;
enableARM926Tcm = 1 ; //0;
(pDynParams->videncDynamicParams).intraFrameInterval = 30 ; // 15 ;
perceptualRC = 0; //1;
For your quick reference i have shared two reports
1. Platinum_Parameter_Setting_Error2.log where i found error code 40977 ( i.e A011 which refers to EntropMode CABAC Not supported )
2. Then i tried to modify the above setting with
entropyMode = 0; // 0 ; /*1: CABAC 0: CAVLC */
and tried to run, but same problem, but i didn't find any error message in the CE_DEBUG Log " Platinum_Parameter_Setting_Error3.log "
Hi Sujit,
Looking at the error code in Platinum_Parameter_Setting_Error2.log, it seems like you are trying to set entropyMode as CABAC for Base Profile. Can you check your ProfileIDC parameter? Are you trying BP or HP?
Platinum_Parameter_Setting_Error3.log -- I dont see any error in the log. It is creating the algorithm correctly. What is the problem you are facing with this log?
Regards,
Anshuman
Hi Anshuman,
in Platinum_Parameter_Setting_Error2.log i was trying to use entropymode CABAC as mentioned in the Table.1 CABAC-ON
and profile idc is BP i.e 66.
after the error code i modified to CAVLC and generated Platinum_Parameter_Setting_Error3.log . here as you mentioned no error message in the Log but while starting same problem at VIDENC1_create() returns NULL.
Anshuman
one more doubt, is therany where we need to set for the Platinum Mode to select ? like H264_ENC_01 or H264_ENC_02 ?
how the create interface will come to know that we are trying to use the backward compatibility mode codec or platinum codec ?
Hi Sujith,
Please refer to the user guide that comes with H.264 Encoder release. It mentions the settings needed for new mode aka "platinum or lite mode" and for old legacy mode (equivalent to ver 1.10.xx). I hope you are using ver 2.00.00.09 version of H.264 codec.
for your reference, i am mentioning the settings needed for old mode
encodingPreset = XDM_USER_DEFINED and encQuality = 0
For platinum mode
encodingPreset = XDM_HIGH_SPEED or XDM_HIGH_QUALITY
Another thing to note is that CABAC is not supported in BP (as per the spec). So CABAC should not be turned on when you have selected base profile in profileIDC parameter.
Coming to the Platinum_Parameter_Setting_Error3.log, i do not see any error reported, nor do i see VIDENC1_Create() being returned. Is the log complete or am i missing something else? BTW, are you sure you have taken care of the memory allocations and EDMA channel allocations for the codec? As i had said in earlier posts, this new codec needs more EDMA channels and you would need to ensure that rest of your system is leaving 46 channels for the codec.
Looks like either your log is not complete or it does have FC debug_trace turned on.
Regards,
Anshuman
PS: Please mark this post as verified, if you think it has answered your question. Thanks.
Hi Anshuman,
following are parameters for normal mode which is working fine.
/* Base Params */
encodingPreset = XDM_USER_DEFINED; /* For Platinum mode/lite mode : XDM_HIGH_QUALITY/XDM_HIGH_SPEED */
/* For version 1.1 support : XDM_USER_DEFINED */
rateControlPreset = VIDEO_RATE_VBR; // VIDEO_RATE_VBR ; /* 0: CBR 1:VBR */
maxHeight = 1024 ; // collected from web interface
maxWidth = 1280; // collected from web interface i.e the capture width
maxFrameRate = 30000 ;
maxBitRate=5242880;
inputChromaFormat = XDM_YUV_420SP;
reconChromaFormat = XDM_YUV_420SP;
dataEndianness = XDM_BYTE;
maxInterFrameInterval = 1;
inputContentType = IVIDEO_PROGRESSIVE;
entropyMode = 1; /* 0 - CAVLC 1- CABAC */
profileIdc = 100; /* High Profile */
levelIdc = IH264VENC_LEVEL_40;
transform8x8FlagIntraFrame = 0;
transform8x8FlagInterFrame = 0;
aspectRatioX = 1;
aspectRatioY = 1;
pixelRange = 1;
timescale = 30000;
numUnitsInTicks = 1000;
enableVUIparams = 0;
disableHDVICPeveryFrame = 0;
meAlgo = 1;
unrestrictedMV = 1;
seqScalingFlag = 1;
encQuality = 0; /* 0 - version 1.1 1,2 - platinum mode */
enableARM926Tcm = 0;
enableDDRbuff = 1;
sliceMode = 0;
outputDataMode = 1;
sliceFormat = 1;
/* Dyanamic Params */
inputHeight = 1024;
inputWidth = 1280;
targetBitRate = 5242880;
rcAlgo = 1
intraFrameInterval = 15;
generateHeader = XDM_ENCODE_AU;
captureWidth = 1280;
targetFrameRate = 30000;
refFrameRate = 30000;
forceFrame = IVIDEO_NA_FRAME;
mbDataFlag = 0;
sliceSize = 0;
airRate = 0;
intraFrameQP = 27;
interPFrameQP = 27;
initQ = 27;
rcQMax = 51;
rcQMin = 0;
rcQMaxI = 51;
rcQMinI = 0;
mvSADoutFlag = 0;
enableROI = 0;
metaDataGenerateConsume = 0;
maxDelay = 2000;
intraSliceNum = 0;
lfDisableIdc = 0;
meMultiPart = 0;
enableBufSEI = 0;
enablePicTimSEI = 0;
intraThrQF = 5;
perceptualRC = 1;
idrFrameInterval = 15;
resetHDVICPeveryFrame = 1;
For Platinum Mode once i modify the followinf two parameters :
encodingPreset = XDM_HIGH_QUALITY; /* For Platinum mode/lite mode : XDM_HIGH_QUALITY/XDM_HIGH_SPEED */ encQuality = 1; /* 0 - version 1.1 1,2 - platinum mode */ VIDENC1_create() call returns NULL. so we are not able set platinum mode. also i have modified the following for DMA as suggested by you.,
/*Modified By Sujit Mahapatro For H264 Platinum Codec */ #define DM365_DMACH2EVENT_MAP0 0x0C00000Cu #define DM365_DMACH2EVENT_MAP1 0x80000000u
i am using the platinum codec relese package REL_210_V_H264_E_HP_DM365_02_00_00_09.
With the following two changes
i got error code 40990.
encodingPreset = XDM_HIGH_QUALITY; /* For Platinum mode/lite mode : XDM_HIGH_QUALITY/XDM_HIGH_SPEED */
encQuality = 1; /* 0 - version 1.1 1,2 - platinum mode */
again i modified
encQuality = 0; /* 0 - version 1.1 1,2 - platinum mode */ for testing i didn't get any error in the log but after the CE_DEBUG it reboots and then once i try to run same errors coming. i have attached the error log.
For platinum code mode, just set encodingPreset to XDM_HIGH_QUALITY and leave encQuality to 0 or 2. Do not set encQuality to 1. It is already deprecated.
Regards,
Anshuman
sujit mahapatro said:i didn't get any error in the log but after the CE_DEBUG it reboots and then once i try to run same errors coming.
i have attached the error log.
Unfortunately the log that you attached does not show CE_DEBUG information when H264 enc create failed after reboot. When CE_DEBUG log is present, there is no error. I don't know how much we can interpret from this situation. It mainly points to the fact that some parameters are not getting correctly set. It doesn't make sense to me that the same executable says H264 enc create failure, that worked earlier before reboot. If you have a failing log with the right settings, i can be of more help.
Regards,
Anshuman
Hi Anshuman,
as i said after CE_DEBUG=3 it reboots automatic and while again i tried to run without CE_DEBUG=3
i get the error message for VIDENC1_create()
[ERR]Failed to open DM365 H264 encoder (h264enc)
if you will see my last log Platinum_Parameter_Setting_Error6.log
the last lines in the log this message is there.
Anshuman,
i took a fresh copy of the platinum codec just to satisfy myself wether i was using the right version or not.
but problem is same, once the setting encoding preset changed for XDM_HIGH_SPEED.
i wonder how in the CE_DEBUG level 3 ALG_create() displaying ok...
is there any thing else which we are missing to point out.
it became a deadlock for me to proceed futher.
i added the recent log message. you can find the eroor message after all the CE_DEBUG messages, it autoboots up , and then while running VIDENC1_create error message.
Anman,
i have attched the codec package which i am using.
can please verify it.
sorry but i have so many doubts coming now mainly wether this is the package which i am using supports platinum mode or not.
Attached the file which allocates all the base parametrs and dynamic parameters.
Hi Anshuman,
Attached the recent CE_DEBUG Level3 Log which is working fine for ver 1.1, in which all parameters set as per user guide except encoding preset to XDM_HIGH_SPEED and encquality=2
bcoz with these 2 values ( i.e platinum mode ) instance creation is not happening.
Hi Sujith,
Looks like you are not able to generate a reliable log at all when you switch on XDM_HIGH_QUALITY or XDM_HIGH_SPEED encoding Preset. I have another suggestion.
- Use the parameters mentioned in sec 2.4.3
- Use h264venc_ti_arm926_debug.a library instead of the h264venc_ti_arm926.a library
Using the above two, please share the log with me. No need to use CE_DEBUG=3 in this case. If it is codec returning error, we will know from the log. If it is EDMA or CMEM, then this log will not help.
BTW, instead of a complex software, why dont you create a very simple main() function that does nothing but does a VIDECN1_create(). I am still suspecting that it is because of the way your system memory and EDMAs are allocated. And if we dont get any clue from the above experiment, then we need to go this path of making a simple code to try out the encoder creation.
Regards,
Anshuman
Hi Anshuman,
attached the log with ARM DEBUG Library.
i dont know what information is available in the log.
the only difference in the log i observed is at the begining its showing DM36x initialization passed
i was thinking it will give a similar kind of information like CE_DEBUG=3.
may be from the log you will get some info.
Hi Sujith,
The log you sent shows that there is nothing wrong in the codec parameters and codec did not return an error. Anyways, i am attaching the test code that i have used just now after testing it with H.264 Encoder ver 2.00.00.09. You can place this code in <DVSDK>/dvsdk_demos_xx_xx_xx/dm365/ folder or anyother place in your build tree. Build this code and do not run any of your applications. Boot your hardware and then just run the application as follows:
# ./mp4vtest <input file name for 720x480> <output file name> <frame count, say 1>
This should be able to show you that codec is getting created. See if you can make my test pass and then you can recreate exactly the same thing in your system.
Regards,
Anshuman
PS: Please mark this post as verified, if you think it has answered your question. Thanks.
Hi Sujith,
Is there any update on this issue? Could you try the package i provided?
Regards,
Anshuman
hi Anshuman,
i was just about to reply you. i got fever yesterday , thats why didn't go office. may be tomorrow i will go.
i will try the package and let you know.
sorry, yesterday i didn't check mail, thats why couldn't reply you from home.
Hi Anshuman,
with the makefile provided in the package , i modified the required XDCPATH and InCLUDES and path to the rules.make file etc
but i am not able compile it.
so many errors related to the encoder lib.
-------------------------
./main.c:3:21: error: xdc/std.h: No such file or directory
./main.c:4:33: error: ti/sdo/ce/CERuntime.h: No such file or directory
./main.c:5:32: error: ti/sdo/ce/trace/gt.h: No such file or directory
./main.c:6:30: error: ti/sdo/ce/Engine.h: No such file or directory
./main.c:7:35: error: ti/sdo/ce/osal/Memory.h: No such file or directory
./main.c:8:38: error: ti/sdo/ce/video1/videnc1.h: No such file or directory
./main.c:9:38: error: ti/sdo/ce/image1/imgenc1.h: No such file or directory
./main.c:10:45: error: ti/sdo/ce/utils/trace/TraceUtil.h: No such file or directory
./main.c:11:45: error: ti/sdo/codecs/mpeg4enc/imp4venc.h: No such file or directory
./main.c:12:45: error: ti/sdo/codecs/h264enc/ih264venc.h: No such file or directory
./main.c:13:44: error: ti/sdo/codecs/jpegenc/ijpegenc.h: No such file or directory
./main.c:14:49: error: ti/sdo/linuxutils/cmem/include/cmem.h: No such file or directory
./main.c:15:33: error: ti/sdo/fc/rman/rman.h: No such file or directory
./main.c:16:36: error: ti/sdo/fc/ires/iresman.h: No such file or directory
./main.c:17:47: error: ti/sdo/fc/ires/vicp/iresman_vicp2.h: No such file or directory
./main.c:18:50: error: ti/sdo/fc/ires/hdvicp/iresman_hdvicp.h: No such file or directory
./main.c:19:56: error: ti/sdo/fc/ires/edma3chan/iresman_edma3Chan.h: No such file or directory
./main.c:21:53: error: ti/sdo/fc/ires/addrspace/ires_addrspace.h: No such file or directory
./main.c:22:56: error: ti/sdo/fc/ires/addrspace/iresman_addrspace.h: No such file or directory
./main.c: In function âmainâ:
./main.c:47: error: âEngine_Handleâ undeclared (first use in this function)
./main.c:47: error: (Each undeclared identifier is reported only once
./main.c:47: error: for each function it appears in.)
./main.c:47: error: expected â;â before âhCEâ
./main.c:48: error: âVIDENC1_Handleâ undeclared (first use in this function)
./main.c:48: error: expected â;â before âhH264Encâ
./main.c:49: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âcmemParamsâ
./main.c:49: error: âcmemParamsâ undeclared (first use in this function)
./main.c:50: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âinitM4VParamsâ
./main.c:50: error: âinitM4VParamsâ undeclared (first use in this function)
./main.c:51: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âinitH264Paramsâ
./main.c:51: error: âinitH264Paramsâ undeclared (first use in this function)
./main.c:57: warning: implicit declaration of function âprintfâ
./main.c:57: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:63: error: âIRESMAN_Edma3ChanParamsâ undeclared (first use in this function)
./main.c:63: error: expected â;â before âconfigParamsâ
./main.c:64: error: âIRESMAN_VicpParamsâ undeclared (first use in this function)
./main.c:64: error: expected â;â before âiresmanConfigParamsâ
./main.c:66: warning: implicit declaration of function âCERuntime_initâ
./main.c:67: warning: implicit declaration of function âRMAN_initâ
./main.c:67: error: âIRES_OKâ undeclared (first use in this function)
./main.c:69: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:72: error: âiresmanConfigParamsâ undeclared (first use in this function)
./main.c:72: error: âRMAN_PARAMSâ undeclared (first use in this function)
./main.c:76: warning: implicit declaration of function âRMAN_registerâ
./main.c:76: error: âIRESMAN_VICP2â undeclared (first use in this function)
./main.c:76: error: âIRESMAN_Paramsâ undeclared (first use in this function)
./main.c:76: error: expected expression before â)â token
./main.c:78: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:83: error: âconfigParamsâ undeclared (first use in this function)
./main.c:86: error: âIRESMAN_EDMA3CHANâ undeclared (first use in this function)
./main.c:86: error: expected expression before â)â token
./main.c:88: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:91: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:95: error: âIRESMAN_HdVicpParamsâ undeclared (first use in this function)
./main.c:95: error: expected â;â before âconfigParamsâ
./main.c:102: error: âIRESMAN_HDVICPâ undeclared (first use in this function)
./main.c:102: error: expected expression before â)â token
./main.c:104: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:110: error: âIRESMAN_AddrSpaceParamsâ undeclared (first use in this function)
./main.c:110: error: expected â;â before âaddrspaceConfigParamsâ
./main.c:113: error: âaddrspaceConfigParamsâ undeclared (first use in this function)
./main.c:117: error: âIRESMAN_ADDRSPACEâ undeclared (first use in this function)
./main.c:117: error: expected expression before â)â token
./main.c:119: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:122: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:126: error: âCMEM_HEAPâ undeclared (first use in this function)
./main.c:127: error: âCMEM_NONCACHEDâ undeclared (first use in this function)
./main.c:129: warning: implicit declaration of function âCMEM_initâ
./main.c:134: error: âEngine_Errorâ undeclared (first use in this function)
./main.c:134: error: expected â;â before âecâ
./main.c:135: error: âhCEâ undeclared (first use in this function)
./main.c:135: warning: implicit declaration of function âEngine_openâ
./main.c:135: error: âecâ undeclared (first use in this function)
./main.c:137: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:415: error: âVIDENC1_Statusâ undeclared (first use in this function)
./main.c:415: error: expected â;â before âvidStatusâ
./main.c:417: error: âIH264VENC_DynamicParamsâ undeclared (first use in this function)
./main.c:417: error: expected â;â before âdynParamsâ
./main.c:420: error: âIH264VENC_Paramsâ undeclared (first use in this function)
./main.c:422: error: âXDM_HIGH_SPEEDâ undeclared (first use in this function)
./main.c:423: error: âIVIDEO_USER_DEFINEDâ undeclared (first use in this function)
./main.c:428: error: âXDM_BYTEâ undeclared (first use in this function)
./main.c:430: error: âXDM_YUV_420SPâ undeclared (first use in this function)
./main.c:431: error: âIVIDEO_PROGRESSIVEâ undeclared (first use in this function)
./main.c:435: error: âIH264VENC_LEVEL_31â undeclared (first use in this function)
./main.c:453: error: âIH264VENC_TI_ENTIREFRAMEâ undeclared (first use in this function)
./main.c:454: error: âIH264VENC_TI_BYTESTREAMâ undeclared (first use in this function)
./main.c:456: error: âdynParamsâ undeclared (first use in this function)
./main.c:465: error: âXDM_ENCODE_AUâ undeclared (first use in this function)
./main.c:467: error: âIVIDEO_NA_FRAMEâ undeclared (first use in this function)
./main.c:469: error: âXDM_DEFAULTâ undeclared (first use in this function)
./main.c:495: error: âhH264Encâ undeclared (first use in this function)
./main.c:495: warning: implicit declaration of function âVIDENC1_deleteâ
./main.c:496: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:498: error: âhH264Enc1â undeclared (first use in this function)
./main.c:498: warning: implicit declaration of function âVIDENC1_createâ
./main.c:498: error: âVIDENC1_Paramsâ undeclared (first use in this function)
./main.c:498: error: expected expression before â)â token
./main.c:513: error: âvidStatusâ undeclared (first use in this function)
./main.c:515: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:516: warning: implicit declaration of function âVIDENC1_controlâ
./main.c:516: error: âXDM_SETPARAMSâ undeclared (first use in this function)
./main.c:516: error: âVIDENC1_DynamicParamsâ undeclared (first use in this function)
./main.c:516: error: expected expression before â)â token
./main.c:516: error: âXDM_EFAILâ undeclared (first use in this function)
./main.c:570: error: âVIDENC1_InArgsâ undeclared (first use in this function)
./main.c:570: error: expected â;â before âencInArgsâ
./main.c:571: error: âVIDENC1_OutArgsâ undeclared (first use in this function)
./main.c:571: error: expected â;â before âencOutArgsâ
./main.c:573: error: âIVIDEO1_BufDescInâ undeclared (first use in this function)
./main.c:573: error: expected â;â before âinBufDescâ
./main.c:575: error: âXDM_BufDescâ undeclared (first use in this function)
./main.c:575: error: expected â;â before âoutBufDescâ
./main.c:586: error: âFILEâ undeclared (first use in this function)
./main.c:586: error: âpfInâ undeclared (first use in this function)
./main.c:586: error: âpfOutâ undeclared (first use in this function)
./main.c:586: warning: left-hand operand of comma expression has no effect
./main.c:588: warning: implicit declaration of function âfopenâ
./main.c:590: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:595: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:603: warning: implicit declaration of function âCMEM_allocâ
./main.c:605: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:610: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:621: error: âinBufDescâ undeclared (first use in this function)
./main.c:622: error: âXDAS_Int8â undeclared (first use in this function)
./main.c:622: error: expected expression before â)â token
./main.c:623: error: expected expression before â)â token
./main.c:628: error: âoutBufDescâ undeclared (first use in this function)
./main.c:629: error: âXDAS_Int32â undeclared (first use in this function)
./main.c:629: error: expected expression before â)â token
./main.c:630: error: expected expression before â)â token
./main.c:636: error: âencOutArgsâ undeclared (first use in this function)
./main.c:639: error: âencInArgsâ undeclared (first use in this function)
./main.c:663: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:666: warning: implicit declaration of function âfreadâ
./main.c:681: warning: implicit declaration of function âVIDENC1_processâ
./main.c:683: error: âIVIDENC1_EOKâ undeclared (first use in this function)
./main.c:692: warning: implicit declaration of function âfwriteâ
./main.c:692: warning: incompatible implicit declaration of built-in function âfwriteâ
./main.c:700: warning: implicit declaration of function âfcloseâ
./main.c:706: warning: incompatible implicit declaration of built-in function âprintfâ
./main.c:726: warning: implicit declaration of function âEngine_closeâ
./main.c:730: warning: implicit declaration of function âRMAN_unregisterâ
./main.c:733: warning: implicit declaration of function âRMAN_exitâ
./main.c:734: warning: implicit declaration of function âCMEM_freeâ
./main.c:736: warning: implicit declaration of function âCMEM_exitâ
-------------------------
i am not sure why it is not getting the PATHS.
i used modified make file with the library's and compiled successfully.
While running i am getting the following error.
i used the input file from platinum codec release folder.
---
mp4vtest-r colorful_toys_cif_5frms_420p.yuv test.h264 1
VICP or EDMA3 Protocols registered
ADDRSPACE Protocol Registration Success
Before VIDENC1_create(h264enc)
Segmentation fault
Sujith,
The Makefile system of mp4vtest code that i gave you is based on DVSDK 2.10 make scheme. There is a Rules.make in DVSDK 2.10 which has all the paths to different components and the MakeFile of mp4vtest includes that Rules.make.
Where have you placed mp4vtest?
I have placed it in dvsdk_demos_2_10_00_17/dm365 as i had mentioned in my last post.
If you place it in the same folder, you can see that in the mp4vtest MakeFile there are following lines which map to the Rules.make of the DVSDK
ROOTDIR = ../../
include $(ROOTDIR)/rules.make
I hope this solves your problem of building.
Regards,
Anshuman
BTW, can you confirm the versions of FC and Linuxutils in your DVSDK?
Regards,
Anshuman
i was getting some error
Linking debug/mp4vtestd from debug/main.o..
arm_v5t_le-gcc: ../utils/lib/rszcopyd.a: No such file or directory
arm_v5t_le-gcc: ../utils/lib/smoothd.a: No such file or directory
thats why i used the different makefile.
i am using "framework_components_2_25_00_04"
why these library rszcopyd.a and smooth.d.a are used in the make file ?
You can remove those libraries from the MakeFile. Delete the following lines. It is existing because we need it in our system but probably not needed for this standalone app.
RELLDFLAGS = ../utils/lib/rszcopy.a \
../utils/lib/smooth.a
DBGLDFLAGS = ../utils/lib/rszcopyd.a \
../utils/lib/smoothd.a
Anshuman,
after running same segmentation fault error is coming.
-----------------
# ./mp4vtest colorful_toys_cif_5frms_420p.yuv test.h264 1
VICP or EDMA3 Protocols registered
ADDRSPACE Protocol Registration Success
Segmentation fault
-----------------------------
my input file is the problem ?
can you send the input file used by you for testing ?
Anshuman,
i debugged the code for the segmentation fault.
following is the trace.
----------------------------------
Program received signal SIGSEGV, Segmentation fault.
0x0006c790 in H264VENC_TI_initResources ()
Current language: auto
The current source language is "auto; currently asm".
(gdb) bt
#0 0x0006c790 in H264VENC_TI_initResources ()
#1 0x000682bc in RMAN_assignResources (alg=0x40231000, resFxns=0xfb418, scratchGroupId=1) at rman.c:265
#2 0x00012644 in Algorithm_create ()
#3 0x00010f44 in VISA_create2 ()
#4 0x00011380 in VISA_create ()
#5 0x0000c814 in VIDENC1_create ()
#6 0x0000b378 in main (argc=4, argv=0xbea97e14) at main.c:497
(gdb) quit
A debugging session is active.
Inferior 1 [Remote target] will be killed.
As per the above trace error message it is in rman.c line 265 function RMAN_assignResources()
algStatus = resFxns->initResources(alg, resDesc, yieldFxn, yieldArgs);
I am not sure what might be causing this problem. I am attaching my loadmodules_hd.sh (rename .txt to .sh). You can try this out. Also, i can provide you my kernel image but then it is meant for TI EVM. Let me know if you need it.
In my configuration, i have 100 MB for CMEM but i dont know if this should cause any problem.
Did you do a make clean and then make when you used my mp4vtest app?
Regards,
Anshuman
Looks like i missed attachment in last post. Attaching my loadmodules again,
Regards
Anshuman
hi Anshuman,
i tried using the loadmodules_hd.sh present inside svsdk_demos_xxx folder by modifying the address but same problem i got.
tomorrow i will try the .sh file sent by you. as i mentioned the error is coming from fc directory raman.c file
thats why my doubt is CMEM or DMA .
what is the DMA configuration you have made to get 46 channels.
how to know whether my application is getting 46 free dma channels or not?
i modified the DMA configuration as suggested by you last time.
let me know what changes has been done for application to get required 46 DMA channels.
Hi Anshuman,
attached the CE_DEBUG Level 3 Log for the mprvtest application. i used the memory as provided by you with different address.
i went through the log and couldn't find any error. As only the test application is running , so there is no doubt about DMA.
i don't understand where is the dead lock. we don't have an EVM to verify the application directly.
Now few basic steps which i had followed for Platinum codec.
1. i copied the "h264enc" folder " dm365_h264enc_02_00_00_09_production" installation folder and replace with the old h264enc folder at
dvsdk_2_10_01_18\dm365_codecs_01_00_06\packages\ti\sdo\codecs\h264enc folder.
2. i modified the rules.make file present inside "h264enc\apps\client\build\arm926\" folder.
3. made "make clean" and then "make".
4.after successfull make, i made "distclean, dep and make at the "dvsdk_2_10_01_18" dir.
Now Everything along with platinum codec is ready for use.
i just want to conform the same from you, as you were asking yesterday whether i am using the platinum codec or not .
what to be done next ?
Per the gdb bt and the CE_DEBUG log, it seems like the seg fault occurs when the codec's IRES_Fxns::initResources is called. This is when the codec is given the resources it had requested.
Anshuman, do we have any visibility inside the codec ? (debug/trace?) to work back from there ?
Thanks Gunjan,
We are almost at the end of the debugging phase. The issue was with the wrong usage of the .cfg file where MEMTCM was not used. I am helping Sujit with one-to-one emails and would post the final discussion summary over here. We just need to verify an error returned in VIDENC1_Control call and that should be hopefully all :)
Regards,
Anshuman
Sujit,
This is not the CE configuration file i asked for. The cfg file would be named like <your app name>.cfg where you configure the parameters for different codecs using codec engine.
Regards,
Anshuman
Can you check by switching the following setting to false
algSettings.useCache = true;
to
algSettings.useCache = false;
Also, as i had asked earlier, please try to get me CE_DEBUG log where the error is seen. In your earlier latest log, the error was not seen at all.
I assume you are not setting enableDDRBuff parameter of codec. Although, it does not make a difference, i think you can keep it off for now.
BTW, from all the messages, it is not clear whether you get error in VIDENC1_create() or VIDENC1_control or in VIDENC1_process. Have you ensured that VIDENC1_create happens correctly before you call VIDENC1_process? Your CE_DEBUG logs do not show the clear picture.
Regards,
Anshuman
Hi Anshuman,
i tried changing
algSettings.useCache = false; also DDRBuff=0.
the error comes in VIDENC_control() call because VIDENC_create() is success.
i have attached the log.
Hi Anshuman,
finally the answer has come as YES PLATINUM CODEC IS WORKING IN ALL PROFILES WITH PLATINUM MODE
yes, just now it happened.
the problem was with the dynamic parameter "mvSADoutFlag = 0; //1"
earlier it was set to 1, i changed to 0. now it is working fine.
again for cross check i changed to 1 from 0 and the same CMEM error came.
Thank you very much for your kind support and guidance in every step.
now i have to check how many frames i am getting per second on an average, because we need appx 28,29 frames per second.
i will let you know in another 1 hour.
also i checked this parameter mvSADoutFlag is related to contol call with getbuffinfo.
but i don't know how it was affecting the CMEM
please let me more about this.
Hi Every one,
There are few conversations between me and Anshuman, which is not posted in this thread.
i just copied all and pasted below.
----------------------------------------------------------
i tried with the working configuration with CE_DEBUG=3 that time also it rebooted automatic and then tried to run , it was running absolutely fine.
Reboot with CE_DEBUG=3 might be happening because of the kernel print messages. Can you try CE_DEBUG=2 which will print less messages and not take up lot of kernel memory. With CE_DEBUG=2, please try with XDM_HIGH_SPEED and let me know the log. I hope it wont reboot.
Regards,
Anshuman
with CE_DEBUG=2, .encodingPreset = XDM_HIGH_SPEED; encQuality = 2;
also it auto reboots after printing the debug.
can i attach the log file in reply message ? or i need to send in the group message.
i compared both the logs one with encodingPreset = XDM_HIGH_SPEED and encQuality = 2 , other with
encodingPreset = XDM_USER_DEFINED and encQuality = 0, CE_DEBUG=2 , i could not find any difference messages compare to the working one with non working one.
also both makes an auto reboot.
i have sent the file in group attachement.
setParameters(), setDynamicParameters() are teo functions which sets the configuration for Base params and dynamic params.
few params are taken from the web interface by the specific function calls. so i have put the what parameters are received in comment of those functions.
Hi,
I asked a question on available DDR memory. Could you answer that please? Do you have 256MB memory on your board?
Sorry, i was out most of the second half of the day. So you say that your DDR is 256MB and you have allocated a big chunk for kernel memory using boot args (mem=192 MB). Let me review your create parameters and then i can comment better. But one thing i did not understand, you had shared CE_DEBUG logs with me yesterday with error = 40990. How did you get that log, because you are saying that system reboots automatically even with older working settings when CE_DEBUG is turned on?
Regards,
Anshuman
Hi Anshuman,
error code 40990 was due to entropyMode as i remember, but as per ur suggestion i changed that to CABAC with HIgh profile. earlier i was using Base Line profile.
While error code was there in the CE_DEBUG=3 it was not auto booting.
Older Working settings as wrote means with out platinum mode set, i.e XDM_USER_DEFINED , with this it is also rebooting after CE_DEBUG message but while i run it works fine with live video.
Can you just test the encoder with base parameters. The parameters are listed in the user guide of the codec sec 2.4.3 Let us go step by step and confirm the basic things are working or not. I see lot of parameters in your settings, which i can doubt like enableDDRBuff. But let us wait and check the params first listed in sec 2.4.3
Regards,
Anshuman
As i said, lets do basics right. Just try the base params and dynamic params of VIDENC1 class as listed in sec 2.4.3 Use exactly the same parameters and let us see if creation passes. Then start changing one step at a time. Also, please make sure you print all the parameters which are passed to VIDENC1_create(). I have my inhibitions that although the app code says parameters are set correctly, some parameters going into actual function call might be wrong. BTW, dynamic params do not come in create call. They come in VIDENC1_CONTROL call, and i am completely assuming that VIDENC1_create() is the one that is failing.
Regards,
Anshuman
Hi Anshuman,
as per our discussion
1. As per the parameters set in sec 2.4.3 with XDM_HIGH_SPEED problem is same. Create instance was not happening.
Base_params_As_Per_2.4.3_encquality_2_log.log
2. With encoding preset XDM_USER_DEFINED , error code 40990. and then i modified encquality to 0;
Base_params_As_Per_2.4.3_encodingpreset_userdefined_useArm926TCM_0.log
3. After modifying enableDDRbuff =1 ,ncoding preset XDM_USER_DEFINED,encquality to 0
create() for ver1.1 ok but control() is not happening.
Base_params_As_Per_2.4.3_encodingpreset_userdefined_useArm926TCM_0_enableDDRbuff_1.log
but in the log i am not getting the error code.
i have attached all 3 log and sending you in group attachment.
Hi Anshuman,
no settings make platinum mode work. i tried all possibilities.
as per user guide settings, with out encoding preset XDM_HIGH_SPPED , and encQuality=0 it works fine i.3 1.1 mode encoder works fine
But Platinum mode doesn't work.
Following is the parameters exactly as per user guide except image height, width, ddr buffer enable and encquality for Platinum mode.
/*Encoder Static Params*/
IVIDENC1 Params: size =132
IVIDENC1 Params:encodingPreset =3
IVIDENC1 Params:rateControlPreset = 2
IVIDENC1 Params:maxHeight =1024
IVIDENC1 Params:maxWidth =1280
IVIDENC1 Params:maxFramerate =120000
IVIDENC1 Params:maxBitRate =50000000
IVIDENC1 Params:inputChromaFormat =9
IVIDENC1 Params:reconChromaFormat =9
IVIDENC1 Params:dataEndianness =1
IVIDENC1 Params:maxInterFrameInterval =1
IVIDENC1 Params:inputContentType =0
IH264ENC Params:timeScale =60
IH264ENC Params:numUnitsInTicks =1
IH264ENC Params:aspectRatioX =1
IH264ENC Params:aspectRatioY =1
IH264ENC Params:pixelRange =1
IH264ENC Params:enableVUIparams =1
IH264ENC Params:meAlgo =1
IH264ENC Params:profileIdc =100
IH264ENC Params:levelIdc =30
IH264ENC Params:unrestrictedMV =0
IH264ENC Params:entropyMode =1
IH264ENC Params:transform8x8FlagIntraFrame =1
IH264ENC Params:transform8x8FlagInterFrame =1
IH264ENC Params:seqScalingFlag =1
IH264ENC Params:encQuality =0
IH264ENC Params:enableARM926Tcm =0
IH264ENC Params:enableDDRbuff =1
IH264ENC Params:sliceMode =0
IH264ENC Params:outputDataMode =1
IH264ENC Params:sliceFormat =1
/* Dynamic Param*/
Dyn params:inputHeight 1024
Dyn params:inputWidth 1280
Dyn params:targetBitRate 512000
Dyn params:intraFrameInterval 29
Dyn params:generateHeader 0
Dyn params:captureWidth 1280
Dyn params:targetFrameRate 30000
Dyn params:refFrameRate 30000
Dyn params:forceFrame -1
Dyn params:mbDataFlag 0
Dyn params:sliceSize 0
Dyn params:airRate 0
Dyn params:intraFrameQP 48
Dyn params:interPFrameQP 48
Dyn params:initQ 28
Dyn params:rcQMax 42
Dyn params:rcQMin 0
Dyn params:rcQMaxI 40
Dyn params:rcQMinI 0
Dyn params:mvSADoutFlag 0
Dyn params:enableROI 0
Dyn params:metaDataGenerateConsume 0
Dyn params:maxDelay 2000
Dyn params:meMultiPart 0
Dyn params:intraThrQF 0
Dyn params:perceptualRC 1
Dyn params:idrFrameInterval 0
i have sent the recent CE_DEBUG log for the above parameters.
kindly send me the above setiings which is working for platinum mode at TI.
Sujit,
I was in a meeting. I will try to setup a small code for you that you can run with platinum mode codec.
Regards,
Anshuman
Anshuman
i sent you the log with ARM926 debug library
i could not get any info from that
i just modified the lib name in the makefile and builded.
then builded the enire dvsdk dir, and then my application.
have i done correct.
because i was expecting a log like CE_DEBUG=3.
Sorry, I had been mostly in meetings whole day today. Just catching up on emails
i just replied you in the group.
i want to know what modifications done for platinum codec to get 46 channels as compare to the previous codec, inside kernel module.
How to know whether 46 channels is available for application or not.
so that i can start tomorrow and let you know by the time you will reach office.
Sujith, I saw your message. Basically, we do need to do anything for getting the EDMA channels. I am assuming you are not running your application or any other code when testing mp4vtest. It should be pure kernel boot followed by the mp4vtest code.
The .cfg file does the configuration for CE, RMAN FC etc. and i have given .cfg file in the package. So you need not worry about it. You should have tried getting the CE_DEBUG logs to see where the segmentation fault might be happening. Do you have a TI EVM there? If yes, can you try it on the TI EVM also? BTW, can you reduce your kernel memory footprint to something smaller also? Can we try it with just 128MB kernel memory?
It is surprising that code which i tested on 3 setups is not working and giving segmentation fault. You already have code for RMAN etc. Can you jump into it using gdb and find the exact place where problem occurs? If you want, i can give you my CE, FC and linuxutils package too.
Regards,
Anshuman
Anshuman,
in rman.c line 265 function RMAN_assignResources()
algStatus = resFxns->initResources(alg, resDesc, yieldFxn, yieldArgs);
other memory things i will try.
Did you check if any of these parameters to initResources is NULL? You are using the latest H.264 encoder when using this test app. Isnt it?
Regards,
Anshuman
Ofcourse i am using the latest H264 encoder.
Parameters i have not checked, l am not sure. let me have a try.
Is there any CMEM error returned before InitResources is called?
Regards,
Anshuman
Sujit,
Did you try reducing the kernel memory and start CMEM from earlier location? I mean something like assume total of 128MB memory and give say 72MB to kernel and rest to CMEM.
Did you check the handles/parameters for the InitResources?
One possible reason for seg fault can be wrong usage of codec header file also. i assume you have taken care of it when you replaced the complete h264 enc folder. Can you share the build log also with me?
Regards,
Anshuman
Looks like i know where the problem might be. I think it is in my loadmodules_hd.sh
Use the following line instead
insmod cmemk.ko phys_start=0x86400000 phys_end=0x88000000 pools=30x64, 50x512,2x4096,2x8192,2x16384,1x32768,1x51200,1x102400,1x3200000,1x9000,1x18480,1x9240,1x5328,1x2664,2x1468800 allowOverlap=1 phys_start_1=0x00001000 phys_end_1=0x00008000 pools_1=1x28672
i had used the same.
in your .sh file allowOverlap=1 phys_start_1=0x00001000 phys_end_1=0x00008000 pools_1=1x28672 was not there, thats why i had added that last time.
Good morning Anshuman,
i have attached the mp4vtest build log.
and as asked by you to reducing the kernel size memory allocated, i have not done that. as i need to ask some one else for that. as per our memory 7 MB for kernel,32 MB for rootfs, 150MB allocated for Application and 64 MB for CMEM.
Sujit,
I looked at your build log. It shows only mp4vtest. I was looking for the logs of following commands from the DVSDK root.
# make clean
# make
# make install
Regards,
Anshuman
Anshuman,
Create returned succes. i directly tried in my application with some modifications in my *.cfg file.
Now control is returning error.
after adding these 2 changes in my cfg file VIDENC1_create() returned success.
var MEMTCM = xdc.useModule('ti.sdo.fc.ires.memtcm.MEMTCM');
MEMTCM.cmemBlockId = 1; //Since we use _1 in our insmod command.
Now for VIDENC1_control(XDM_SETPARAMS) i am getting the error.
i have set all dynamic params properly but getting the error
i took the CE_DEBUG=3 log but i am not getting any VIDENC1_control() call in the log.
You know what, i was finally going to ask for your .cfg file. The .cfg file should have MEMTCM and it is mentioned in the user guide of codec. My test code had that in the .cfg file.
Ok now, can you check the extended error code in the VIDENC1_control command and tell me so that we can catch the exact parameter that is causing the problem?
Regards,
Anshuman
i thought of following your cfg file today. and i tried that.
what is the significance of MEMTCM ?
now as i took the CE_DEBUG=3 log, i am not finding the VIDENC1_control call . so i am not getting any error code from the log.
Sujit,
MEMTCM is needed for the new codec operation. The codec uses ARM TCM memory for some optimizations and hence it is needed.
For extendedError code, you can directly get it from outArgs of VIDENC1_control. No need for a CE_DEBUG log. Please refer to user guide.
Regards,
Anshuman
Anshuman,
as per the extended error code 0x403c9070.
which error is this, as i am not finding the code in the XDM error codes.
The error code are mentioned in ih264enc.h or in the user guide of H.264 encoder.
Regards,
Anshuman
As this error code is not in the list, i want to conform the steps after VIDENC1_create().
1. m_pHandle = VIDENC1_create(m_pEngine, "h264enc", (VIDENC1_Params*)m_pParams);
2.status = VIDENC1_control(m_pHandle, XDM_GETSTATUS, (VIDENC1_DynamicParams*)m_pDynParams, (VIDENC1_Status*)m_pStatus);
3.status = VIDENC1_control(m_pHandle, XDM_GETBUFINFO, (VIDENC1_DynamicParams*)m_pDynParams, (VIDENC1_Status*)m_pStatus);
4. status = VIDENC1_control(m_pHandle, XDM_SETPARAMS, (VIDENC1_DynamicParams*)m_pDynParams, (VIDENC1_Status*)m_pStatus);
5. status = VIDENC1_process(m_pHandle, &inBufDesc, &outBufDesc,(VIDENC1_InArgs *) m_pInArgs, m_pOutArgs);
is the above sequence is correct ?
Hi,
Where exactly did you get this error code?In VIDENC1_process call or in VIDENC1_control call? Can you tell me exactly what you printed and after which step in your steps 1 to 5? If it is coming after VIDENC1_control, i hope you are printing m_pStatus-->extendedError?
Regards,
Anshuman
yes Anshuman,
in step 4 while i am printing the extended error code of the XDM_SETPARAMS contol call, this error code is coming.
after the XDM_SETPARAMS control call , process call has been made.
Your step2 goes fine????
But step 4 gives error??? This is strange..
Can you tell me what exactly is the difference in parameters in step 2 and step 4?
Also, can you please show exactly how you are printing the extended Error code? Let us remove the process call for now...
Regards,
Anshuman
1. m_pHandle = VIDENC1_create(m_pEngine, "h264enc", (VIDENC1_Params*)m_pParams);
if (NULL == m_pHandle)
{
Dm365Environment::getInstance()->getGHelper()->dp(SYS_ERR, "Failed to open DM365 H264 encoder (%s)\n", "h264enc");
close();
return false;
}
2.
XDAS_Int32 status = VIDENC1_control(m_pHandle, XDM_GETSTATUS, (VIDENC1_DynamicParams*)m_pDynParams, (VIDENC1_Status*)m_pStatus);
if (VIDENC1_EOK != status)
{
Dm365Environment::getInstance()->getGHelper()->dp(SYS_ERR, "Can't get status-4 of H264 with error (%d ext :0x%x)\n", status,(Uns)(m_pOutArgs->extendedError));
close();
return false;
}
3. XDAS_Int32 status = VIDENC1_control(m_pHandle, XDM_GETBUFINFO, (VIDENC1_DynamicParams*)m_pDynParams, (VIDENC1_Status*)m_pStatus);
if (VIDENC1_EOK != status)
{
Dm365Environment::getInstance()->getGHelper()->dp(SYS_ERR, "Can't get buffer info from H264 encoder\n");
close();
return false;
}
4.XDAS_Int32 status = VIDENC1_control(m_pHandle, XDM_SETPARAMS, (VIDENC1_DynamicParams*)m_pDynParams, (VIDENC1_Status*)m_pStatus);
if (VIDENC1_EOK != status)
{
Dm365Environment::getInstance()->getGHelper()->dp(SYS_ERR, "Can't get status of H264 with error (%d ext :0x%x)\n", status,(Uns)(m_pOutArgs->extendedError));
close();
return false;
}
Sujit,
I was suspecting this. You are printing (Uns)(m_pOutArgs->extendedError) after VIDENC1_Control, but where do you see pOutArgs getting updated? For VIDENC1_Control, you need to print m_pStatus-->extendedError. That is the structure which will report the extended error for this call. I had mentioned this in my previous post also.
Please print m_pStatus-->extendedError for both calls of VIDENC1_Control and then tell me the value.
Regards,
Anshuman
ohh. thanks.
i thought you left office, thats why i came from office just now.
reached home.
so tomorrow only i can update you. may be tomorrow you won't be going office. but once i will get the proper error code i will try to solve.
may be monday i will tell you platinum encoder running fine. hope so.
good night.
one more thing would like to conform about the sequence 1-2-3-4-5
i sent, was that correct sequence
i mean create-> control ( GET STATUS) -> contol ( GETBUFINFO) -> control(SETPARAMS)-> process()
is it right ?
Ok.. hopefully your problem should get soved. Actually, the error code should give you the exact reason of failure. You can refer to my parameters that are already working.
yes, that sequence should work.. any sequence that works with legacy codec would work with platinum codec mode too..
Hi Anshuman,
i found the error code as A03E, which is related to " putDataGetSpaceFxn " as i have set outputDataMode = 0; //IH264VENC_TI_ENTIREFRAME; because of that it was going for low latency and looking for that buff.
after i modified that to 1 (IH264VENC_TI_ENTIREFRAME )
i am getting CMEM error.
i am trying to check the buffer sizes.
Hi Sujit,
Thanks for the update. Really glad to see that you could make lot of progress. CMEM allocation might be just some basic issue with proper allocation for codecs. I hope that can be fixed soon. Let me know if you need more help.
Regards,
Anshuman
Hi Anshuman,
good morning.
i was refering to the loadmodules_hd.sh file sent by you.
------
insmod cmemk.ko phys_start=0x86400000 phys_end=0x88000000 pools=30x64, 50x512,2x4096,2x8192,2x16384,1x32768,1x51200,1x102400,1x3200000,1x9000,1x18480,1x9240,1x5328,1x2664,2x1468800 allowOverlap=1 phys_start_1=0x00001000 phys_end_1=0x00008000 pools_1=1x28672
------
i have some doubt , as per the datasheet memory requirement like input buffer, output buffer, memTabs , i am not finding the memory allocations in the file. how you have calculated , don't we need to follow the datasheet ?
Hi Sujit,
You should modify the loadmodules based on the codec datasheet. It is the right way to decide allocations. I had taken my earlier loadmodules and just modified it. It might not match exactly to codec or your system requirements. Other crude way is to keep modifying the CMEM pools based on the allocation errors you get when application runs.
BTW, we use CMEM heap in our IP Network camera reference design an we dont need to change any allocations anytime the codec requirement changes.
Regards,
Anshuman
Hi Anshuman,
i am doing the same thing , as you said keep on adding as it asks .
and regarding CMEM heap i.e in IPNC , right ?
We use heap in IPNC, but that can be used anywhere. If you are close to production, then i would not recommend that because you would have to do lot of testing.
Regards,
Anshuman
Anshuman
i am keep on adding pool buffers as it asked.
but one memory of size 62 its asking. i already added 4096x62 but still is asking.
what can be the problem ?
Hi Anshuman,
i kept on adding as per the message.
but finally i am getting following error. what ever buffers i added all , its appx 33MB , and my CMEM size is 64MB. then why such an error, ot it is related to some thing else ?
-------------------------------
CMEM Error: getPhys: Failed to get physical address of 0
CMEMK Error: get_phys: Unable to find phys addr for 0x00000000
CMEMK Error: get_phys: get_user_pages() failed: -14
CMEMK Error: GETPHYS: Failed to convert virtual 0x0 to physical.
CMEM Error: getPhys: Failed to gCMEMK Error: get_phys: Unable to find phys addr for 0x00000000
et physical addrCMEMK Error: get_phys: get_user_pages() failed: -14
---------------------------------
Sujit,
Can you show me the complete log during the execution?
Regards,
anshuman
The error comes if there is some memory that is not allocated and still being used. It clearly shows that CMEM is not correctly used. Access to location 0x0 is being done, which surely would not have the mapped physical address. Can you send the log with CE_DEBUG=3 for the same run? I want to see which tab of codec is causing this problem.
Regards,
Anshuman
Hi Anshuman,
i have allocated the buffers as requested, but finally same error comes.
i verified the required number buffers its trying to allocate from the log.
i also increased the CMEM size from 64 MB to 80MB but same error comes.
i am not able to understand how to solve this.
i looked at your CE_DEBUG log yesterday but it did not show error again. There was no such error as you mentioned in your previous messages. Can you share your .cfg file? I want to see that.
Hi,
sorry, sorry
by mistake i sent that.
i am sending the cfg file, but the parameters are initialized via functions. do you want the parameter initializing functions also ?
So, you are again stuck at the same problem that control call is failing but now due to CMEM pointers corruption. I want to make sure that you are calling control call from the same thread context as the create call. Isnt it? Also, can you use the debug mode library of H.264 and show the logs. I want to see where in the code is control call failing. Which MemTab is causing this problem. I am still doubting that somewhere your CMEM pointers are getting corrupted and which can very much happen form the system code.
Hi Anshuman
its working now, i posted the detail to you in the group
-----------------------------------------------------------
and my final static and dynamic parameters are as below.
----------------------------------------------------------
/*Encoder Static Params*/
IVIDENC1 Params: size =132
IVIDENC1 Params:encodingPreset =2
IVIDENC1 Params:rateControlPreset = 1
IVIDENC1 Params:maxHeight =1024
IVIDENC1 Params:maxWidth =1280
IVIDENC1 Params:maxFramerate =30000
IVIDENC1 Params:maxBitRate =12000000
IVIDENC1 Params:inputChromaFormat =9
IVIDENC1 Params:reconChromaFormat =9
IVIDENC1 Params:dataEndianness =1
IVIDENC1 Params:maxInterFrameInterval =0
IVIDENC1 Params:inputContentType =0
IH264ENC Params:timeScale =60
IH264ENC Params:numUnitsInTicks =2
IH264ENC Params:aspectRatioX =1
IH264ENC Params:aspectRatioY =1
IH264ENC Params:pixelRange =0
IH264ENC Params:enableVUIparams =0
IH264ENC Params:meAlgo =0
IH264ENC Params:profileIdc =66
IH264ENC Params:levelIdc =40
IH264ENC Params:unrestrictedMV =1
IH264ENC Params:transform8x8FlagIntraFrame =0
IH264ENC Params:transform8x8FlagInterFrame =0
IH264ENC Params:seqScalingFlag =0
IH264ENC Params:encQuality =0
IH264ENC Params:enableARM926Tcm =1
IH264ENC Params:enableDDRbuff =1
/* Dynamic Param*/
Dyn params:inputHeight 1024
Dyn params:inputWidth 1280
Dyn params:targetBitRate 8388608
Dyn params:intraFrameInterval 15
Dyn params:generateHeader 0
Dyn params:captureWidth 1280
Dyn params:targetFrameRate 30000
Dyn params:refFrameRate 30000
Dyn params:forceFrame -1
Dyn params:mbDataFlag 0
Dyn params:sliceSize 0
Dyn params:airRate 0
Dyn params:intraFrameQP 27
Dyn params:interPFrameQP 27
Dyn params:initQ 27
Dyn params:rcQMax 27
Dyn params:rcQMin 0
Dyn params:mvSADoutFlag 0
Dyn params:maxDelay 1000
Dyn params:meMultiPart 1
Dyn params:intraThrQF 5
Dyn params:perceptualRC 0
Dyn params:idrFrameInterval 15
Dyn params:rcAlgo 1
---------------------------------------------------------