ffa331d9bf
amphion vpu support a low latency mode,
when V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE is enabled,
decoder can display frame immediately after it's decoded.
Only h264 is support yet.
Fixes: 6de8d628df
("media: amphion: add v4l2 m2m vpu decoder stateful driver")
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
70 lines
974 B
C
70 lines
974 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright 2020-2021 NXP
|
|
*/
|
|
|
|
#ifndef _AMPHION_VPU_CODEC_H
|
|
#define _AMPHION_VPU_CODEC_H
|
|
|
|
struct vpu_encode_params {
|
|
u32 input_format;
|
|
u32 codec_format;
|
|
u32 profile;
|
|
u32 tier;
|
|
u32 level;
|
|
struct v4l2_fract frame_rate;
|
|
u32 src_stride;
|
|
u32 src_width;
|
|
u32 src_height;
|
|
struct v4l2_rect crop;
|
|
u32 out_width;
|
|
u32 out_height;
|
|
|
|
u32 gop_length;
|
|
u32 bframes;
|
|
|
|
u32 rc_enable;
|
|
u32 rc_mode;
|
|
u32 bitrate;
|
|
u32 bitrate_min;
|
|
u32 bitrate_max;
|
|
|
|
u32 i_frame_qp;
|
|
u32 p_frame_qp;
|
|
u32 b_frame_qp;
|
|
u32 qp_min;
|
|
u32 qp_max;
|
|
u32 qp_min_i;
|
|
u32 qp_max_i;
|
|
|
|
struct {
|
|
u32 enable;
|
|
u32 idc;
|
|
u32 width;
|
|
u32 height;
|
|
} sar;
|
|
|
|
struct {
|
|
u32 primaries;
|
|
u32 transfer;
|
|
u32 matrix;
|
|
u32 full_range;
|
|
} color;
|
|
};
|
|
|
|
struct vpu_decode_params {
|
|
u32 codec_format;
|
|
u32 output_format;
|
|
u32 display_delay_enable;
|
|
u32 display_delay;
|
|
u32 b_non_frame;
|
|
u32 frame_count;
|
|
u32 end_flag;
|
|
struct {
|
|
u32 base;
|
|
u32 size;
|
|
} udata;
|
|
};
|
|
|
|
#endif
|