summaryrefslogtreecommitdiff
path: root/v4l2-mfc-example
diff options
context:
space:
mode:
Diffstat (limited to 'v4l2-mfc-example')
-rw-r--r--v4l2-mfc-example/common.h1
-rw-r--r--v4l2-mfc-example/fimc.c2
-rw-r--r--v4l2-mfc-example/mfc.c1
3 files changed, 3 insertions, 1 deletions
diff --git a/v4l2-mfc-example/common.h b/v4l2-mfc-example/common.h
index d338d5e..1fc3243 100644
--- a/v4l2-mfc-example/common.h
+++ b/v4l2-mfc-example/common.h
@@ -197,6 +197,7 @@ struct instance {
int cap_buf_flag[MFC_MAX_CAP_BUF];
int cap_buf_queued;
int dbuf[MFC_MAX_CAP_BUF][MFC_CAP_PLANES];
+ unsigned int cap_pixfmt;
} mfc;
/* Parser related parameters */
diff --git a/v4l2-mfc-example/fimc.c b/v4l2-mfc-example/fimc.c
index a168100..ba3a8de 100644
--- a/v4l2-mfc-example/fimc.c
+++ b/v4l2-mfc-example/fimc.c
@@ -141,7 +141,7 @@ int fimc_setup_output_from_mfc(struct instance *i)
}
ret = fimc_sfmt(i, i->mfc.cap_w, i->mfc.cap_h,
- V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_PIX_FMT_NV12MT,
+ V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, i->mfc.cap_pixfmt,
MFC_CAP_PLANES, planes);
if (ret)
diff --git a/v4l2-mfc-example/mfc.c b/v4l2-mfc-example/mfc.c
index 480e542..6095b99 100644
--- a/v4l2-mfc-example/mfc.c
+++ b/v4l2-mfc-example/mfc.c
@@ -261,6 +261,7 @@ int mfc_dec_setup_capture(struct instance *i, int extra_buf)
}
i->mfc.cap_w = fmt.fmt.pix_mp.width;
i->mfc.cap_h = fmt.fmt.pix_mp.height;
+ i->mfc.cap_pixfmt = fmt.fmt.pix_mp.pixelformat;
i->mfc.cap_buf_size[0] = fmt.fmt.pix_mp.plane_fmt[0].sizeimage;
i->mfc.cap_buf_size[1] = fmt.fmt.pix_mp.plane_fmt[1].sizeimage;