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.

ccdc_common.h: ccdc_frmfmt is wrong

Hello,

I've noticed what I think is an incongruence in ccdc_common.c and ccdc_common.h. In the first file, the field "frm_fmt" of the "ccdc_channel_config_params" structure seems to have a different meaning than in the second. This is the structure:

struct ccdc_channel_config_params {
        /* Name of the */
        char *name;
        /* Indicates width of the image for this mode */
        u16 width;
        /* Indicates height of the image for this mode */
        u16 height;
        u8 fps;
        /* Indicates whether this is interlaced or progressive format */
        u8 frm_fmt;
        /* hd or sd */
        u8 hd_sd;
        /* pix aspect of input */
        struct ccdc_pix_aspect pixaspect;
};

This is an example of declarations of this structure defaults in ccdc_common.c:
#define CCDC_SD_PARAMS \
        {"NTSC", 720, 480, 30, 0, 0, CCDC_PIXELASPECT_NTSC }, \
        {"PAL", 720, 576, 25, 0, 0, CCDC_PIXELASPECT_PAL}
#define CCDC_HD_PARAMS  \
        {"720P-60", 1280, 720, 60, 1, 1, CCDC_PIXELASPECT_DEFAULT}, \
        {"1080I-30", 1920, 1080, 30, 0, 1, CCDC_PIXELASPECT_DEFAULT}, \
        {"1080I-25", 1920, 1080, 25, 0, 1, CCDC_PIXELASPECT_DEFAULT}
Notice how "0" seems to mean INTERLACED, while "1" seems to mean "PROGRESSIVE". But in ccdc_common.h, an enumeration for this field is declared as:
enum ccdc_frmfmt {
        CCDC_FRMFMT_PROGRESSIVE,
        CCDC_FRMFMT_INTERLACED
};
So I think that (by default assignment in the compile) PROGRESSIVE has value "0", while INTERLACED has value "1". The exact opposite.