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.

DM365 AEW engine output

Greetings:

There's 3 output formats in the dm365 AEW engine.  Such as:

enum aew_output_format {
    AEW_OUT_SUM_OF_SQUARES,
    AEW_OUT_MIN_MAX,
    AEW_OUT_SUM_ONLY
};
While using the AEW_OUT_SUM_ONLY mode, the aew buffer size is the count of the window multiply 16. After reading aew datas by using:

ret = read(fdAew,  buff_stat, buff_size);

But what is the exact output details of the aew data or where can I find the related information? Nothing have been found after checking the aew driver document.

And I found some struct definations in Leopard codecs

struct aew_one_win {
    unsigned short g1_accu,r_accu,b_accu,g2_accu;
    unsigned short g1_sat_accu,r_sat_accu,b_sat_accu,g2_sat_accu;
 //  unsigned int sum_square[4]; //square mode
};

struct aew_eight_win{
    struct aew_one_win win_accu[8];
    unsigned short unsat_cnt[8];
};

The struct aew_one_win here means the output of one window? But the size of aew_eight_win is 8*16+8*2 which equals to 144 and is 16 more than 128.

So the output data size is 16 bytes per window doesn't fit the leopard code and I feel confused about these things.

Thanks for any help.

Best regards;

  • Hi, Leon

          If you want the output format as AEW_OUT_SUM_ONLY, please noted that the output data size for each window is not 16(that is wrong), it is 18 bytes for each window, and what is the structure of the output data, please refer to the VPFE detailed document, the structure defined by Leopard code is also correct, you can use it for probe the statistics. by the way, when you configure the window count, please aware the total buffer size, as in kernel driver level, the size need to be aligned to the page size. if not , the statistics in the buffer may be un-stable and mixed!

  • I can attest to the confusion here... The VPFE programing guide (along with the Leopard code shown above) suggest clearly that data size is 18 bytes per window for sum only mode (including the unsaturated data). However, the driver dm365_aew.h file says that the data size is 16 bytes (AEW_WINDOW_SIZE_SUM_ONLY). An ioctl call also says the buffer is 1024 bytes for 8x8 windows, which is 128 bytes off of the required values (exactly the size for the unsaturated data for 8x8 windows).

    Has anybody been able to work with unsaturated counts with the DM365? Both the 2.10 and 3.10 packages have the same issue.

    -Derek

  • struct aew_one_win {
        unsigned short g1_accu,r_accu,b_accu,g2_accu;
        unsigned short g1_sat_accu,r_sat_accu,b_sat_accu,g2_sat_accu;
    };

    struct aew_eight_win{
        struct aew_one_win win_accu[8];
        unsigned short unsat_cnt[8];
    };

    size of aew_eight_win is 8*16+8*2

    the given math fits the c structures for a window count of 8.

    this and a few more(!) core aspects of the "AE" unit should definitely be written into the associated data sheet.