summaryrefslogtreecommitdiff
Diffstat
-rw-r--r--drivers/amvdec_ports/aml_vcodec_adapt.c2
-rw-r--r--drivers/amvdec_ports/aml_vcodec_dec.c27
-rw-r--r--drivers/amvdec_ports/aml_vcodec_dec.h2
-rw-r--r--drivers/amvdec_ports/aml_vcodec_dec_drv.c30
-rw-r--r--drivers/amvdec_ports/aml_vcodec_drv.h19
-rw-r--r--drivers/amvdec_ports/decoder/vdec_h264_if.c1
-rw-r--r--drivers/amvdec_ports/decoder/vdec_hevc_if.c1
-rw-r--r--drivers/amvdec_ports/decoder/vdec_vp9_if.c1
-rw-r--r--drivers/frame_provider/decoder/h264_multi/vmh264.c12
-rw-r--r--drivers/frame_provider/decoder/h265/vh265.c183
-rw-r--r--drivers/frame_provider/decoder/utils/vdec.c2
-rw-r--r--drivers/frame_provider/decoder/vp9/vvp9.c94
12 files changed, 288 insertions, 86 deletions
diff --git a/drivers/amvdec_ports/aml_vcodec_drv.h b/drivers/amvdec_ports/aml_vcodec_drv.h
index eff017f..1baec44 100644
--- a/drivers/amvdec_ports/aml_vcodec_drv.h
+++ b/drivers/amvdec_ports/aml_vcodec_drv.h
@@ -58,7 +58,15 @@
#define V4L2_EVENT_REQUEST_RESET (1 << 8)
#define V4L2_EVENT_REQUEST_EXIT (1 << 9)
+/* v4l buffer pool */
+#define V4L_CAP_BUFF_MAX (32)
+#define V4L_CAP_BUFF_INVALID (0)
+#define V4L_CAP_BUFF_IN_M2M (1)
+#define V4L_CAP_BUFF_IN_DEC (2)
+/* v4l reset mode */
+#define V4L_RESET_MODE_NORMAL (1 << 0) /* reset vdec_input and decoder. */
+#define V4L_RESET_MODE_LIGHT (1 << 1) /* just only reset decoder. */
/**
* enum aml_hw_reg_idx - AML hw register base index
@@ -330,6 +338,15 @@ struct v4l2_config_parm {
u8 buf[4096];
};
+struct v4l_buff_pool {
+ /*
+ * bit 31-16: buffer state
+ * bit 15- 0: buffer index
+ */
+ u32 seq[V4L_CAP_BUFF_MAX];
+ u32 in, out;
+};
+
enum aml_thread_type {
AML_THREAD_OUTPUT,
AML_THREAD_CAPTURE,
@@ -445,6 +462,8 @@ struct aml_vcodec_ctx {
bool is_stream_off;
int reset_flag;
int stop_cmd;
+ u32 display_count;
+ struct v4l_buff_pool cap_pool;
};
/**