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.

DM368 IPNC H264@720P + MJPEG@3MP mode error

Hi,

I'm working on DM368 IPNC with aptina 9p031 sensor.   I configured the sensor at 2048×1536 mode,and captured two channels, one is 720 mode for H264, the other is 3MP mode for MJPEG mode. the framerate is 10. the stream of h264 worked ok, but there is something wrong with the jpeg stream. pls see the picture below. could someone give me some hint what the problem is? thanks very much~

Forest

  • Hi,

     

    can you please tell us on what is the resolution you are trying to derive using RSZ A and RSZ B?

    For RSZ B, there is a restriction of the width that can be used. Please look at the ISP guide for details on the restirction.

    RSZ has max width of 1088

     

    Regards,

     

    Raghu

     

  • Dear Raghu,

    below is my configure code, is there anything wrong?

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

    #if 1

    /*

              if(platform==PLATFORM_DM368)

                config->resizerClkdivN = gAVSERVER_UI_config.vsEnable ? 60:70;

              else

                config->resizerClkdivN = 50;

    */

              config->resizerClkdivN      = 70;

              config->sensorMode          = DRV_IMGS_SENSOR_MODE_2048x1536;//DRV_IMGS_SENSOR_MODE_2592x1920;

              config->sensorFps           = 8;

              config->aewb_config.aewbBinEnable = TRUE;

     

              config->vstabTskEnable      = FALSE;//gAVSERVER_UI_config.vsEnable;

              config->ldcTskEnable        = FALSE;//gAVSERVER_UI_config.ldcEnable;

              config->vnfTskEnable        = FALSE;//gAVSERVER_UI_config.snfEnable|gAVSERVER_UI_config.tnfEnable;

              config->encryptTskEnable    = FALSE;

     

              config->captureRawInMode    = AVSERVER_CAPTURE_RAW_IN_MODE_DDR_IN;

              config->captureSingleResize = FALSE;

              config->captureYuvFormat    = DRV_DATA_FORMAT_YUV420;

     

              config->numCaptureStream    = 2;

     

              if(numEncodes > config->numCaptureStream)

                  numEncodes = config->numCaptureStream;

     

              config->numEncodeStream     = numEncodes;

     

              config->faceDetectConfig.captureStreamId = 0;//2;

              config->faceDetectConfig.fdEnable        = FALSE;//gAVSERVER_UI_config.fdEnable;

     

              config->displayConfig.captureStreamId    = 0;

              config->displayConfig.width              = 640;

              config->displayConfig.height             = 480;

              config->displayConfig.expandH            = 1;

     

              i=0;

     

              k=0;

              config->captureConfig[i].width           = 1280;

              config->captureConfig[i].height          = 736;

              config->captureConfig[i].ldcEnable       = gAVSERVER_UI_config.ldcEnable;

              config->captureConfig[i].snfEnable       = gAVSERVER_UI_config.snfEnable;

              config->captureConfig[i].tnfEnable       = gAVSERVER_UI_config.tnfEnable;

              config->captureConfig[i].vsEnable        = gAVSERVER_UI_config.vsEnable;

     

              if(numEncodes>0)

                config->captureConfig[i].numEncodes       = 1;

     

              config->captureConfig[i].encodeStreamId[k++]= 0;

              config->captureConfig[i].frameSkipMask      = 0x11111111;//0x24924924;

              //config->captureConfig[i].frameSkipMask      = 0x3FFFFFFF;

              i++;

     

              k=0;

              config->captureConfig[i].width          = 2048;

              config->captureConfig[i].height         = 1536;

              config->captureConfig[i].ldcEnable      = gAVSERVER_UI_config.ldcEnable;

              config->captureConfig[i].snfEnable      = FALSE;

              config->captureConfig[i].tnfEnable      = FALSE;

              config->captureConfig[i].vsEnable         = gAVSERVER_UI_config.vsEnable;

     

              if(numEncodes>1)

                config->captureConfig[i].numEncodes       = 1;

     

              config->captureConfig[i].encodeStreamId[k++]= 1;

              config->captureConfig[i].frameSkipMask      = 0x11111111;//0x24924924;

              //config->captureConfig[i].frameSkipMask    = 0x3FFFFFFF;

              i++;

    /*

              k=0;

              config->captureConfig[i].width              = 320;

              config->captureConfig[i].height             = 192;

              config->captureConfig[i].ldcEnable          = gAVSERVER_UI_config.ldcEnable;

              config->captureConfig[i].snfEnable          = FALSE;

              config->captureConfig[i].tnfEnable          = FALSE;

              config->captureConfig[i].vsEnable           = gAVSERVER_UI_config.vsEnable;

     

              if(numEncodes>2)

                  config->captureConfig[i].numEncodes       = 1;

              config->captureConfig[i].encodeStreamId[k++]= 2;

              //config->captureConfig[i].frameSkipMask      = 0x1AAAAAAA;

              config->captureConfig[i].frameSkipMask      = 0x3FFFFFFF;

              i++;

    */    

              i=0;

     

              config->encodeConfig[i].captureStreamId          = 0;

              config->encodeConfig[i].cropWidth                = ALIGN_ENCODE(1280);

              config->encodeConfig[i].cropHeight               = ALIGN_ENCODE(720);

              //config->encodeConfig[i].frameRateBase            = config->sensorFps*1000>>1;

              config->encodeConfig[i].frameRateBase          = config->sensorFps*1000;

              config->encodeConfig[i].frameSkipMask            = 0x11111111;//0x24924924;

              config->encodeConfig[i].codecType                = gAVSERVER_UI_config.codecType[i];

              config->encodeConfig[i].codecBitrate             = gAVSERVER_UI_config.codecBitrate[i];

              config->encodeConfig[i].encryptEnable            = FALSE;

              config->encodeConfig[i].fileSaveEnable           = FALSE;

              config->encodeConfig[i].motionVectorOutputEnable = FALSE;

              config->encodeConfig[i].qValue                   = gAVSERVER_UI_config.codecBitrate[i];

              i++;

     

              config->encodeConfig[i].captureStreamId          = 1;

              config->encodeConfig[i].cropWidth                = ALIGN_ENCODE(2048);

              config->encodeConfig[i].cropHeight               = ALIGN_ENCODE(1536);

              //config->encodeConfig[i].frameRateBase          = (config->sensorFps*1000)>>1;

              config->encodeConfig[i].frameRateBase            = config->sensorFps*1000;

              config->encodeConfig[i].frameSkipMask            = 0x11111111;//0x24924924;

              config->encodeConfig[i].codecType                = gAVSERVER_UI_config.codecType[i];

              config->encodeConfig[i].codecBitrate             = gAVSERVER_UI_config.codecBitrate[i];

              config->encodeConfig[i].encryptEnable            = FALSE;

              config->encodeConfig[i].fileSaveEnable           = FALSE;

              config->encodeConfig[i].motionVectorOutputEnable = FALSE;

              config->encodeConfig[i].qValue                   = gAVSERVER_UI_config.codecBitrate[i];

              i++;

    /*    

              config->encodeConfig[i].captureStreamId          = 2;

              config->encodeConfig[i].cropWidth                = ALIGN_ENCODE(320);

              config->encodeConfig[i].cropHeight               = ALIGN_ENCODE(192);

              //config->encodeConfig[i].frameRateBase           = (config->sensorFps*1000)>>1;

              config->encodeConfig[i].frameRateBase           = config->sensorFps*1000;

              config->encodeConfig[i].frameSkipMask            = 0x3FFFFFFF;

              config->encodeConfig[i].codecType                = gAVSERVER_UI_config.codecType[i];

              config->encodeConfig[i].codecBitrate             = gAVSERVER_UI_config.codecBitrate[i];

              config->encodeConfig[i].encryptEnable            = FALSE;

              config->encodeConfig[i].fileSaveEnable           = FALSE;

              config->encodeConfig[i].motionVectorOutputEnable = FALSE;

              config->encodeConfig[i].qValue                   = gAVSERVER_UI_config.codecBitrate[i];

              i++;

    */

     

     

    thanks very much

    Forest

  • Hi,

     

    Thanks for the setting, from the config it looks like the second rsz B is targeted with 3MP resolution which will give the artifacts you are getting as the max width is lesser than 3MP width. So since you are getting it in DDR_IN mode, you need modify the driver code so that RSZ A is doing both the resolution of 720P and 3MP, you cannot use RSZ B to generate both of these.

     

    Regards,

     

    Raghu

     

  • thanks Raghu,

     

    is there any way to make the output width of RSZB greater than 1088,such as 1280?

     

    thanks.

  • Thats is the limit for RSZB, so anything more than that cannot be done on RSZB

     

    Regards,

     

    Raghu