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.

DM6467T: H264FHVENC version 01_10_02_06 produce P images of 12 bytes

Hi all,

Following the closure of Multimedia Software Codecs Forum, I open this question there as the header of the old forum sub group indicate that "all new posts should be directed to the appropriate device forums". Is this the right place?

I'm a resuming Mike Soso investigation for this problem: https://e2e.ti.com/support/embedded/multimedia_software_codecs/f/356/t/207461

The problem is that we always got P images of 12 bytes with H264 HD codec version 01_10_02_06 on DM6467T.

Context:
- we have this problem on a custom board with a DM6467T with software built with arago (2011)
- we have reproduced successfully the problem on evaluation board from Digital Spectrum (DM6467T) with our software
- we have also reproduced successfully the problem with a clean installation of DVSDK 3.10.00.19 on evaluation board (this very close with Mike Soso configuration, using DVTB 4.20.18 to be able to investigate easily with someone else)

Our software stack built with Arago 2011 and the software build by DVSDK have the following differences:
- on Linux/ARM side, we build with GCC 4.5.3 for our software vs GCC 4.3.3 CodeSourcery (2009q1) for DVSDK
- on DSP side, we build with CGT6x 7.4.5 vs 6.1.14 for DVSDK

This would exclude a compiler or alignment issue (see also verbose output below).

DVTB give an output like this in perf-data.csv:

Thread, 87ff4, Frame#, 1, Frame Type, 0, Frame Size(bytes), 150789, EncTime(us), 29625
Thread, 87ff4, Frame#, 2, Frame Type, 1, Frame Size(bytes), 12, EncTime(us), 33683
Thread, 87ff4, Frame#, 3, Frame Type, 1, Frame Size(bytes), 12, EncTime(us), 34978
Thread, 87ff4, Frame#, 4, Frame Type, 1, Frame Size(bytes), 12, EncTime(us), 34963
Thread, 87ff4, Frame#, 5, Frame Type, 1, Frame Size(bytes), 12, EncTime(us), 35062
Thread, 87ff4, Frame#, 6, Frame Type, 1, Frame Size(bytes), 12, EncTime(us), 34965

Forum thread like this one e2e.ti.com/.../207461) does not end with a clear answer.

The last request of the original thread above was for a memory dump of codec creation param and dynamic parameter:

Using GDB on an DVTB compiled with debug symbol:

A. At creation time:
(gdb) l
151             }
152             else
153             {
154                     ve->venc1Cmd = XDM_SETPARAMS;
155                     if (DVEVM_ST_FAIL == dvtb_h264fhdEnc1Control(ve))
156                     {
157                             SYS_ERROR("Unable to set encoder dynamic parameters\n");
158                             retCode = DVEVM_ST_FAIL;
159                     }
160                     else
(gdb) frame
#0  dvtb_h264fhdEnc1Init (ve=0x89fb0 <TH+8124>) at linux/dvtbH264fhdEnc1.c:146
146             if (NULL == (ve->venc1Hdl = VIDENC1_create(ve->ceHdl, ve->venc1Name, (IVIDENC1_Params *) (&ve->venc1Params))))
(gdb) print ve->venc1Params
$5 = {
  videncParams = {
    size = 60,
    encodingPreset = 0,
    rateControlPreset = 2,
    maxHeight = 1088,
    maxWidth = 1920,
    maxFrameRate = 30000,
    maxBitRate = 10000000,
    dataEndianness = 3,
    maxInterFrameInterval = 0,
    inputChromaFormat = 9,
    inputContentType = 0,
    reconChromaFormat = -1
  },
  profileIdc = 66,
  levelIdc = 40,
  EntropyCodingMode = 0
}
(gdb) x ve->venc1Params
Value can't be converted to integer.
(gdb) print &ve->venc1Params
$6 = (IH264FHDVENC_Params *) 0x89ff4 <TH+8192>
(gdb) x
0x8a030 <TH+8252>:      0x00000088
(gdb) x 0x89ff4
0x89ff4 <TH+8192>:      0x0000003c
(gdb) x/x 0x89ff4
0x89ff4 <TH+8192>:      0x0000003c
(gdb) x16xb 0x89ff4
Undefined command: "x16xb".  Try "help".
(gdb) x/16xb 0x89ff4
0x89ff4 <TH+8192>:      0x3c    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x89ffc <TH+8200>:      0x02    0x00    0x00    0x00    0x40    0x04    0x00    0x00
(gdb) x/16xw 0x89ff4
0x89ff4 <TH+8192>:      0x0000003c      0x00000000      0x00000002      0x00000440
0x8a004 <TH+8208>:      0x00000780      0x00007530      0x00989680      0x00000003
0x8a014 <TH+8224>:      0x00000000      0x00000009      0x00000000      0xffffffff
0x8a024 <TH+8240>:      0x00000042      0x00000028      0x00000000      0x00000088
(gdb) x/64xw 0x89ff4    
0x89ff4 <TH+8192>:      0x0000003c      0x00000000      0x00000002      0x00000440
0x8a004 <TH+8208>:      0x00000780      0x00007530      0x00989680      0x00000003
0x8a014 <TH+8224>:      0x00000000      0x00000009      0x00000000      0xffffffff
0x8a024 <TH+8240>:      0x00000042      0x00000028      0x00000000      0x00000088
0x8a034 <TH+8256>:      0x00000440      0x00000780      0x00007530      0x00007530
0x8a044 <TH+8272>:      0x00989680      0x0000001e      0x00000000      0x00000000
0x8a054 <TH+8288>:      0xffffffff      0x00000000      0x00000000      0x00000000
0x8a064 <TH+8304>:      0x00000000      0x00000000      0x00000000      0x00000000
0x8a074 <TH+8320>:      0x00000000      0x00000000      0x00000000      0xffffffff
0x8a084 <TH+8336>:      0x00331c1c      0x00000000      0x00000000      0x00000000
0x8a094 <TH+8352>:      0x00000000      0x00000000      0x00000000      0x01000001
0x8a0a4 <TH+8368>:      0x00010000      0x00000000      0x000003e8      0x00000384
0x8a0b4 <TH+8384>:      0x00000384      0x0000000c      0x00000000      0x00000000
0x8a0c4 <TH+8400>:      0x0000016c      0x00000000      0x00000000      0x00000000
0x8a0d4 <TH+8416>:      0x00000000      0x00000000      0x00000000      0x00000000
0x8a0e4 <TH+8432>:      0x00000000      0x00000000      0x00000000      0x00000000
(gdb) ptype IH264FHDVENC_Params
type = struct IH264FHDVENC_Params {
    IVIDENC1_Params videncParams;
    XDAS_Int32 profileIdc;
    XDAS_Int32 levelIdc;
    XDAS_Int32 EntropyCodingMode;
}
(gdb) ptype IVIDENC1_Params
type = struct IVIDENC1_Params {
    XDAS_Int32 size;
    XDAS_Int32 encodingPreset;
    XDAS_Int32 rateControlPreset;
    XDAS_Int32 maxHeight;
    XDAS_Int32 maxWidth;
    XDAS_Int32 maxFrameRate;
    XDAS_Int32 maxBitRate;
    XDAS_Int32 dataEndianness;
    XDAS_Int32 maxInterFrameInterval;
    XDAS_Int32 inputChromaFormat;
    XDAS_Int32 inputContentType;
    XDAS_Int32 reconChromaFormat;
}
(gdb) x/15xw 0x89ff4             
0x89ff4 <TH+8192>:      0x0000003c      0x00000000      0x00000002      0x00000440
0x8a004 <TH+8208>:      0x00000780      0x00007530      0x00989680      0x00000003
0x8a014 <TH+8224>:      0x00000000      0x00000009      0x00000000      0xffffffff
0x8a024 <TH+8240>:      0x00000042      0x00000028      0x00000000


B. When calling SET_PARAMS (this is not the same GDB session than above)

(gdb) fra
#0  dvtb_h264fhdEnc1Init (ve=0x89fb0 <TH+8124>) at linux/dvtbH264fhdEnc1.c:155
155                     if (DVEVM_ST_FAIL == dvtb_h264fhdEnc1Control(ve))
(gdb) l
150                     retCode = DVEVM_ST_FAIL;
151             }
152             else
153             {
154                     ve->venc1Cmd = XDM_SETPARAMS;
155                     if (DVEVM_ST_FAIL == dvtb_h264fhdEnc1Control(ve))
156                     {
157                             SYS_ERROR("Unable to set encoder dynamic parameters\n");
158                             retCode = DVEVM_ST_FAIL;
159                     }
(gdb) print ve->venc1Cmd  
$9 = 1
(gdb) print ve->venc1
venc1Cmd        venc1DynParams  venc1Hdl        venc1InArgs     venc1Name       venc1OutArgs    venc1Params     venc1Status     
(gdb) print ve->venc1DynParams
$10 = {
  videncDynamicParams = {
    size = 136,
    inputHeight = 1088,
    inputWidth = 1920,
    refFrameRate = 30000,
    targetFrameRate = 30000,
    targetBitRate = 10000000,
    intraFrameInterval = 30,
    generateHeader = 0,
    captureWidth = 0,
    forceFrame = -1,
    interFrameInterval = 0,
    mbDataFlag = 0
  },
  sliceCodingParams = {
    sliceCodingPreset = IH264_SLICECODING_DEFAULT,
    sliceMode = IH264_SLICEMODE_NONE,
    sliceUnitSize = 0,
    sliceStartOffset = {0, 0, 0, 0},
    streamFormat = IH264_BYTE_STREAM
  },
  OutBufSize = -1,
  QPISlice = 28 '\034',
  QPSlice = 28 '\034',
  RateCtrlQpMax = 51 '3',
  RateCtrlQpMin = 0 '\000',
  NumRowsInSlice = 0 '\000',
  LfDisableIdc = 0 '\000',
  LFAlphaC0Offset = 0 '\000',
  LFBetaOffset = 0 '\000',
  ChromaQPOffset = 0 '\000',
  SecChromaQPOffset = 0 '\000',
  PicAFFFlag = 0 '\000',
  PicOrderCountType = 0 '\000',
  AdaptiveMBs = 0,
  SEIParametersFlag = 0 '\000',
  VUIParametersFlag = 0 '\000',
  VUIData = {
    buf = 0x0,
    bufSize = 0
  },
  NALUnitCallback = 0x0,
  SkipStartCodesInCallback = 1 '\001',
  Intra4x4EnableFlag = 0 '\000',
  BlockingCallFlag = 0 '\000',
  MESelect = 1 '\001',
---Type <return> to continue, or q <return> to quit---
  ME1080iMode = 0 '\000',
  MVDataFlag = 0 '\000',
  Transform8x8DisableFlag = 1 '\001',
  Intra8x8EnableFlag = 0 '\000',
  InterlaceReferenceMode = 0 '\000',
  ChromaConversionMode = 0 '\000',
  maxDelay = 1000,
  MaxSlicesSupported_IFrame = 900,
  MaxSlicesSupported_PFrame = 900
}
(gdb) print &ve->venc1DynParams
$11 = (IH264FHDVENC_DynamicParams *) 0x8a030 <TH+8252>
(gdb) x/136xb 0x8a030
0x8a030 <TH+8252>:      0x88    0x00    0x00    0x00    0x40    0x04    0x00    0x00
0x8a038 <TH+8260>:      0x80    0x07    0x00    0x00    0x30    0x75    0x00    0x00
0x8a040 <TH+8268>:      0x30    0x75    0x00    0x00    0x80    0x96    0x98    0x00
0x8a048 <TH+8276>:      0x1e    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x8a050 <TH+8284>:      0x00    0x00    0x00    0x00    0xff    0xff    0xff    0xff
0x8a058 <TH+8292>:      0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x8a060 <TH+8300>:      0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x8a068 <TH+8308>:      0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x8a070 <TH+8316>:      0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x8a078 <TH+8324>:      0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x8a080 <TH+8332>:      0xff    0xff    0xff    0xff    0x1c    0x1c    0x33    0x00
0x8a088 <TH+8340>:      0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x8a090 <TH+8348>:      0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x8a098 <TH+8356>:      0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x8a0a0 <TH+8364>:      0x01    0x00    0x00    0x01    0x00    0x00    0x01    0x00
0x8a0a8 <TH+8372>:      0x00    0x00    0x00    0x00    0xe8    0x03    0x00    0x00
0x8a0b0 <TH+8380>:      0x84    0x03    0x00    0x00    0x84    0x03    0x00    0x00
(gdb) print &ve->venc1DynParams
$12 = (IH264FHDVENC_DynamicParams *) 0x8a030 <TH+8252>
(gdb) ptype IH264FHDVENC_DynamicParams
type = struct IH264FHDVENC_DynamicParams {
    IVIDENC1_DynamicParams videncDynamicParams;
    IH264FHDVENC_SliceCodingParams sliceCodingParams;
    XDAS_Int32 OutBufSize;
    XDAS_UInt8 QPISlice;
    XDAS_UInt8 QPSlice;
    XDAS_UInt8 RateCtrlQpMax;
    XDAS_UInt8 RateCtrlQpMin;
    XDAS_UInt8 NumRowsInSlice;
    XDAS_UInt8 LfDisableIdc;
    XDAS_Int8 LFAlphaC0Offset;
    XDAS_Int8 LFBetaOffset;
    XDAS_Int8 ChromaQPOffset;
    XDAS_Int8 SecChromaQPOffset;
    XDAS_UInt8 PicAFFFlag;
    XDAS_UInt8 PicOrderCountType;
    XDAS_UInt16 AdaptiveMBs;
    XDAS_UInt8 SEIParametersFlag;
    XDAS_UInt8 VUIParametersFlag;
    XDM_SingleBufDesc VUIData;
    void (*NALUnitCallback)(XDAS_UInt8 *, XDAS_UInt32);
    XDAS_UInt8 SkipStartCodesInCallback;
    XDAS_UInt8 Intra4x4EnableFlag;
    XDAS_UInt8 BlockingCallFlag;
    XDAS_UInt8 MESelect;
    XDAS_UInt8 ME1080iMode;
    XDAS_UInt8 MVDataFlag;
    XDAS_UInt8 Transform8x8DisableFlag;
    XDAS_UInt8 Intra8x8EnableFlag;
    XDAS_UInt8 InterlaceReferenceMode;
    XDAS_UInt8 ChromaConversionMode;
    XDAS_Int32 maxDelay;
    XDAS_Int32 MaxSlicesSupported_IFrame;
    XDAS_Int32 MaxSlicesSupported_PFrame;
}
(gdb) print &ve->venc1DynParams.MaxSlicesSupported_IFrame
$13 = (XDAS_Int32 *) 0x8a0b0 <TH+8380>
(gdb) print &ve->venc1DynParams
$14 = (IH264FHDVENC_DynamicParams *) 0x8a030 <TH+8252>
(gdb) print 0x8a0b0 - 0x8a030
$15 = 128
(gdb) ptype IVIDENC1_DynamicParams
type = struct IVIDENC1_DynamicParams {
    XDAS_Int32 size;
    XDAS_Int32 inputHeight;
    XDAS_Int32 inputWidth;
    XDAS_Int32 refFrameRate;
    XDAS_Int32 targetFrameRate;
    XDAS_Int32 targetBitRate;
    XDAS_Int32 intraFrameInterval;
    XDAS_Int32 generateHeader;
    XDAS_Int32 captureWidth;
    XDAS_Int32 forceFrame;
    XDAS_Int32 interFrameInterval;
    XDAS_Int32 mbDataFlag;
}
(gdb) print sizeof(IVIDENC1_DynamicParams)
$16 = 48
(gdb) print sizeof(IH264FHDVENC_DynamicParams)
$17 = 136

  • Hi,

    Thanks for your post.

    As a first step, kindly ensure that in the codec server config. file, please map the udatasection as below:

    H264ENC_1080P.alg.udataSection  = "DDR2";

    Thanks & regards,

    Sivaraj K

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

    Please click the Verify Answer button on this post if it answers your question

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

  • Hi,

    Thank you for your reply.

    I had checked this point which is mentioned there too in the forum

    In both compilation environment, I have this in cs2dm6467_1_00_00_10/packages/ti/sdo/server/cs/codec.cfg:

        var H264FHDVENC = xdc.useModule('ti.sdo.codecs.h264fhdvenc.ce.H264FHDVENC');

            H264FHDVENC.manageInBufsCache = [true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true];
            H264FHDVENC.manageOutBufsCache = [true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true];
            H264FHDVENC.alg.watermark = false;
            H264FHDVENC.alg.codeSection = "DDR2";
            H264FHDVENC.alg.udataSection = "DDR2";
            H264FHDVENC.alg.dataSection = "DDR2";

    Luke

  • Sorry, I messed up the first post: the link should have been this one: https://e2e.ti.com/support/embedded/multimedia_software_codecs/f/356/p/211400/928704

    The problem is the same in both links, but Mike investigation is contain in this one, and it's last post from Prashanth Kumar requested for memory/member dump of creation parameters and dynamic parameters.

    Luke