[COMMON] media: smfc: initialize all formats with chroma subsampling factor 1
authorCho KyongHo <pullip.cho@samsung.com>
Mon, 18 May 2015 15:01:02 +0000 (00:01 +0900)
committerSeungchul Kim <sc377.kim@samsung.com>
Mon, 28 May 2018 05:31:03 +0000 (14:31 +0900)
Otherwise, size check will fail due to zero factor.

Change-Id: I56baa4a36b1fc9f5b7e22f8237aa506358a68bb2
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
drivers/media/platform/exynos/smfc/smfc.c

index 3fd3e8360347a394bb7e208616ce41061f434148..c9fe8396060198903cfc890e1eb15cab36325668 100644 (file)
@@ -173,6 +173,8 @@ const struct smfc_image_format smfc_image_formats[] = {
                .bpp_pix        = {16},
                .num_planes     = 1,
                .num_buffers    = 1,
+               .chroma_hfactor = 1,
+               .chroma_vfactor = 1,
        }, {
                .description    = "RGB565 BE 16BPP",
                .v4l2_pixfmt    = V4L2_PIX_FMT_RGB565X,
@@ -181,6 +183,8 @@ const struct smfc_image_format smfc_image_formats[] = {
                .bpp_pix        = {16},
                .num_planes     = 1,
                .num_buffers    = 1,
+               .chroma_hfactor = 1,
+               .chroma_vfactor = 1,
        }, {
                .description    = "RGB888 LE 24BPP",
                .v4l2_pixfmt    = V4L2_PIX_FMT_RGB24,
@@ -189,6 +193,8 @@ const struct smfc_image_format smfc_image_formats[] = {
                .bpp_pix        = {24},
                .num_planes     = 1,
                .num_buffers    = 1,
+               .chroma_hfactor = 1,
+               .chroma_vfactor = 1,
        }, {
                .description    = "RGB888 BE 24BPP",
                .v4l2_pixfmt    = V4L2_PIX_FMT_BGR24,
@@ -197,6 +203,8 @@ const struct smfc_image_format smfc_image_formats[] = {
                .bpp_pix        = {24},
                .num_planes     = 1,
                .num_buffers    = 1,
+               .chroma_hfactor = 1,
+               .chroma_vfactor = 1,
        }, {
                .description    = "ABGR8888 LE 32BPP",
                .v4l2_pixfmt    = V4L2_PIX_FMT_RGB32,
@@ -204,6 +212,8 @@ const struct smfc_image_format smfc_image_formats[] = {
                .bpp_pix        = {32},
                .num_planes     = 1,
                .num_buffers    = 1,
+               .chroma_hfactor = 1,
+               .chroma_vfactor = 1,
        }, {
                .description    = "ARGB8888 BE 32BPP",
                .v4l2_pixfmt    = V4L2_PIX_FMT_BGR32,
@@ -211,6 +221,8 @@ const struct smfc_image_format smfc_image_formats[] = {
                .bpp_pix        = {32},
                .num_planes     = 1,
                .num_buffers    = 1,
+               .chroma_hfactor = 1,
+               .chroma_vfactor = 1,
        },
        /* multi-planar formats must be at the last becuse of VIDOC_ENUM_FMT */
        {