AnsweredAssumed Answered

Problem with JPEG for BF525

Question asked by anjana on Oct 5, 2010
Latest reply on Oct 12, 2010 by CraigG



We are using Bf525 in our application.  We got the code for compresiion of an image(JPEG) from analog devices.  We are facing some problem with the code. i,e  in that code we have some instructions which are from the library functions those are


/* Configure JPEG struct: */
    JPEG_Param_CONFIG(&lImageEncParam, JPEG_FRAME_WIDTH, lMaxXDimn);
    JPEG_Param_CONFIG(&lImageEncParam, JPEG_FRAME_HEIGHT, lMaxYDimn);
    JPEG_Param_CONFIG(&lImageEncParam, JPEG_QUALITYFACTOR, 75);
    JPEG_Param_CONFIG(&lImageEncParam, JPEG_ENCODINGMODE, 1);
    JPEG_Param_CONFIG(&lImageEncParam, JPEG_THRESHOLD,0);
    JPEG_Param_CONFIG(&lImageEncParam, JPEG_IMAGEFORMAT,5);



from the above instructions when we are trying to execute the instructions


JPEG_Param_CONFIG(&lImageEncParam, JPEG_FRAME_HEIGHT, lMaxYDimn);



then control is going to IDLE state but with the remaining 3 instructions it is executing without any problem


and alsofor all the above 6 instructions if i replace the 2nd parameter with JPEG_FRAME_WIDTH then all the 6 instructions are executing without any problem Can u please help me to solve the above problem?


I will also provide some information regarding SDRAM

We are using SDRAM of 64MB(MT48LC32M16A2)  and SDRAM register configurations are



        //SDRAM Memory Bank Control Register
          *pEBIU_SDRRC = 0x03F6;

        *pEBIU_SDBCTL = 0x0025;
        //SDRAM Memory Global Control Register   
        *pEBIU_SDGCTL = 0xC099998D;


Please tell me if at all any changes in the SDRAM settings


And also the structure for JPEG_config is

typedef enum{
    JPEG_FRAME_WIDTH,   /* Maximum dimension value in horizontal direction. */
    JPEG_FRAME_HEIGHT,  /* Maximum dimension value in vertical direction. */
    JPEG_IMAGEFORMAT,      /* 1 for YUV4:2:0, 2 for YUV 4:2:2, 3 for YUV 4:4:4, 4 for YUV 4:0:0, 5 for RGB 24, and 6 for rotated YUV 4:2:2. */
    JPEG_QUALITYFACTOR,    /* Quality of encoding: 1 (worst quality) to 100 (best) */
    JPEG_ENCODINGMODE,     /* SEQUENTIAL for sequential (baseline); PROGRESSIVE for progressive encoding */
    JPEG_THRESHOLD,        /* Adaptive thresholding on (1) or off (0), only in sequential encoding mode */
    JPEG_POINTER_INPUT,    /* Address of input image frame */
    JPEG_POINTER_OUTPUT,   /* Address of encoded output */


    JPEG_IMAGE_WIDTH,  /* Actual width dimension of the image, excludes padding. */
    JPEG_IMAGE_HEIGHT  /* Actual height dimension of the image, excludes padding. */


} JPEG_config;


Looking forward for ur reply