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.

How to configure Quantification Table on jpegenc version02.00.01.00 (DM6467T)

Hi all,

Could someone can give the right way to use custom quantification Table on the jpegenc.

When i use my custom quantification table, i have always the same wrong header in my jpeg file generated:

FF DB 00  84 (quantification table marker)

00 02 02  02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02 

02 02 02 02 02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02  02 02

01 02  02 02 02 02 02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02
02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02  02 02 02 02  02 02 02

FF  DA

and the image it's near 64kB and with another jpeg codec with the table below i'm near 11kB.

My code :

    IDMJPGE_TIGEM_Params JPEG_Params = {
            {
                    sizeof(IDMJPGE_TIGEM_Params),       /* Size of params structure */
                    288,
                    720,
                    0,
                    XDM_BYTE,
                    XDM_YUV_420P,
            },
    XDM_DEFAULT,
    XDM_DEFAULT,
    XDM_DEFAULT,
    XDM_DEFAULT,
    XDM_DEFAULT,
    XDM_DEFAULT,
  };

IDMJPGE_TIGEM_CustomQuantTables DQT_table = {
            {    /*Luma*/
                    14,9,8,14,21,35,45,54,
                    10,10,12,16,23,51,53,49,
                    12,11,14,21,35,50,61,50,
                    12,15,19,25,45,77,71,55,
                    16,19,33,50,60,97,92,68,
                    21,31,49,57,72,93,101,82,
                    43,57,69,77,92,108,107,90,
                    64,82,84,87,100,89,92,88
            },

           {    /*chroma*/
                    15,16,21,42,88,88,88,88,
                    16,18,23,59,88,88,88,88,
                    21,23,50,88,88,88,88,88,
                    42,59,88,88,88,88,88,88,
                    88,88,88,88,88,88,88,88,
                    88,88,88,88,88,88,88,88,
                    88,88,88,88,88,88,88,88,
                    88,88,88,88,88,88,88,88
            }

};

   IDMJPGE_TIGEM_DynamicParams JPEG_DynParams = {
        {
            sizeof(IDMJPGE_TIGEM_DynamicParams),
            XDM_DEFAULT,
            XDM_YUV_420P,
            288,
            720,
            720,
            XDM_ENCODE_AU,
            35,
         },
        288,
        0,
        &DQT_table,
        XDM_DEFAULT,
        XDM_DEFAULT,
        XDM_DEFAULT,
        XDM_DEFAULT,
        XDM_DEFAULT,
        XDM_DEFAULT,
        XDM_DEFAULT,
        XDM_DEFAULT,
        XDM_DEFAULT,
        XDM_DEFAULT,
        XDM_DEFAULT,
        XDM_DEFAULT,
        XDM_DEFAULT,
        XDM_DEFAULT,
        XDM_DEFAULT,
        XDM_DEFAULT,
        XDM_DEFAULT,
    };

imgenc1->hIe = Ienc1_create(imgenc1->hEngine, (Char*)imgenc1->codecName,
            (IMGENC1_Params*)&JPEG_Params, (IMGENC1_DynamicParams*)&JPEG_DynParams);