-rw-r--r-- | drivers/amvdec_ports/aml_vcodec_adapt.c | 2 | ||||
-rw-r--r-- | drivers/amvdec_ports/aml_vcodec_dec.c | 27 | ||||
-rw-r--r-- | drivers/amvdec_ports/aml_vcodec_dec.h | 2 | ||||
-rw-r--r-- | drivers/amvdec_ports/aml_vcodec_dec_drv.c | 30 | ||||
-rw-r--r-- | drivers/amvdec_ports/aml_vcodec_drv.h | 19 | ||||
-rw-r--r-- | drivers/amvdec_ports/decoder/vdec_h264_if.c | 1 | ||||
-rw-r--r-- | drivers/amvdec_ports/decoder/vdec_hevc_if.c | 1 | ||||
-rw-r--r-- | drivers/amvdec_ports/decoder/vdec_vp9_if.c | 1 | ||||
-rw-r--r-- | drivers/frame_provider/decoder/h264_multi/vmh264.c | 12 | ||||
-rw-r--r-- | drivers/frame_provider/decoder/h265/vh265.c | 183 | ||||
-rw-r--r-- | drivers/frame_provider/decoder/utils/vdec.c | 2 | ||||
-rw-r--r-- | drivers/frame_provider/decoder/vp9/vvp9.c | 94 |
12 files changed, 288 insertions, 86 deletions
diff --git a/drivers/amvdec_ports/aml_vcodec_dec_drv.c b/drivers/amvdec_ports/aml_vcodec_dec_drv.c index d35d738..43ff0c5 100644 --- a/drivers/amvdec_ports/aml_vcodec_dec_drv.c +++ b/drivers/amvdec_ports/aml_vcodec_dec_drv.c @@ -269,6 +269,36 @@ int dmabuf_fd_install_data(int fd, void* data, u32 size) return 0; } +void* v4l_get_vf_handle(int fd) +{ + struct file *file; + struct file_private_data *data = NULL; + void *vf_handle = 0; + + file = fget(fd); + + if (!file) { + pr_err("%s: fget fd %d fail!, comm %s, pid %d\n", + __func__, fd, current->comm, current->pid); + return NULL; + } + + if (!is_v4l2_buf_file(file)) { + fput(file); + pr_err("%s the buf file checked fail!\n", __func__); + return NULL; + } + + data = (struct file_private_data*) file->private_data; + if (data) + vf_handle = &data->vf; + + fput(file); + + return vf_handle; +} + + static long v4l2_vcodec_ioctl(struct file *file, unsigned int cmd, ulong arg) |