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.

MPEG4DEC Problems on dm368

Dear all:

I am debugging MPEG4 on dm368 platform (uses the DVSDK_2_10_01_18 and the Montavista tools V5).The MPEG4 encode is right, but MPEG4 decode only first frame is right.The log as follows:

the mpeg4enc version is MPEG4ENC.version.01.00.00.09.wizardversion.0.5.2

the mpeg4dec version is MPEG4DEC.version.01.10.00.01.wizardversion.0.5.3

frames=1 type=0 len=58044
outBufDesc.bufSizes=921600 outBufDesc.numBufs=2
outArgs.size=1952 numbufs=2 framPitch=1280 width=1280 height=720 outBufsInUseFlag = 0
outArgs.size=1952 outArgs.displayBufs[0].frameWidth=1280 frameHeight
OutBufId = 1Frame Ht = 720
Frame Wdth = 1280
Frame Pitch = 1280
Buffer Size = 921600
outArgs.decodedBufs.bufDesc[0].bufSize=921600, outArgs.decodedBufs.bufDesc[1].bufSize=460800
frames=2 type=1 len=16354
@0x000bc25c:[T:0x43971490] codecs - VIDDEC2_process() failed with error (-1 ext: 0xc800)
mpeg4dec_process failed!
frames=3 type=1 len=23659
@0x000ce939:[T:0x43971490] codecs - VIDDEC2_process() failed with error (-1 ext: 0xc800)
mpeg4dec_process failed!
frames=4 type=1 len=24050

I don't know the reason,Can you give me some clues?

Thank you!Give my best wishes to you!

  • Hi,

    Can you attach the encoded stream along with the parameters here so we can take a look at it?

    I presume you've tried with both v1.00.00.09 and 1.10.00.01 of the decoder?

    Regards,

    Akshay

  • Hi,  Akshay:

            Thank you for your attention! The dvsdk_2_10_01_18 default MPEG4DEC is MPEG4DEC.version.01.00.00.06.wizardversion.0.5.2,  and default MPEG4ENC is MPEG4ENC.version.01.00.00.09.wizardversion.0.5.2.I have tried to test it, there existed the same problems.So I used the newer version MPEG4DEC.version.01.10.00.01.wizardversion.0.5.3, but the problems is still.There is my paramters:


    const VIDENC1_Params mpeg4enc_fix_params_default = {
            sizeof(VIDENC1_Params),                        /* size */
            XDM_DEFAULT,                                           /* encodingPreset */
            IVIDEO_LOW_DELAY,                                /* rateControlPreset */
            mpeg4_codec_image_height_default,  /* maxHeight */
            mpeg4_codec_image_width_default,   /* maxWidth */
            30000,                                                           /* maxFrameRate */
            6000000,                                                      /* maxBitRate */
            XDM_BYTE,                                                  /* dataEndianness */
            0,                                                                    /* maxInterFrameInterval */
            XDM_YUV_420SP,                                      /* inputChromaFormat */
            IVIDEO_PROGRESSIVE,                           /* inputContentType */
            XDM_CHROMA_NA                                    /* reconChromaFormat */
    };

    const VIDENC1_DynamicParams mpeg4enc_var_params_default = {
            sizeof(IVIDENC1_DynamicParams),   /* size */
            720,                                                             /* inputHeight */
            1280,                                                           /* inputWidth */
            30000,                                                         /* refFrameRate */
            30000,                                                         /* targetFrameRate */
            6000000,                                                     /* targetBitRate */
            30,                                                                 /* intraFrameInterval */
            XDM_ENCODE_AU,                                  /* generateHeader */
            0,                                                                   /* captureWidth */
            IVIDEO_NA_FRAME,                                 /* forceFrame */
            1,                                                                   /* interFrameInterval */
            0                                                                    /* mbDataFlag */
    };

    const VIDDEC2_Params mpeg4dec_fix_params_default = {
            sizeof(VIDDEC2_Params),             /* size */
            720,                                                      /* maxHeight */
            1280,                                                    /* maxWidth */
            30000,                                                  /* maxFrameRate */
            6000000,                                             /* maxBitRate */
            XDM_BYTE,                                         /* dataEndianess */
            XDM_YUV_420SP,                             /* forceChromaFormat */
    };

    const VIDDEC2_DynamicParams mpeg4dec_var_params_default = {
            sizeof(VIDDEC2_DynamicParams),      /* size */
            XDM_DECODE_AU,                                  /* decodeHeader */
            0,                                                                   /* displayWidth */
            IVIDEO_NO_SKIP,                                     /* frameSkipMode */
            IVIDDEC2_DISPLAY_ORDER,               /* frameOrder */
            0,                                                                  /* newFrameFlag */
            0,                                                                  /* mbDataFlag */
    };  

    Thank you!Give my best wishes to you!

  • Hi, all:

             The problem has been sloved now!It's my mistake! After correct this line

      status = VIDDEC2_control(mpeg4dec->handle, XDM_RESET, &mpeg4dec->var_params, &vidStatus);

    to

      status = VIDDEC2_control(mpeg4dec->handle, XDM_SETPARAMS, &mpeg4dec->var_params, &vidStatus);

     Everything is OK!

    Thank you!Give my best wishes to you!