/** * enum mtk_jpeg_ctx_state - states of the context state machine * @MTK_JPEG_INIT: current state is initialized * @MTK_JPEG_RUNNING: current state is running * @MTK_JPEG_SOURCE_CHANGE: current state is source resolution change
*/ enum mtk_jpeg_ctx_state {
MTK_JPEG_INIT = 0,
MTK_JPEG_RUNNING,
MTK_JPEG_SOURCE_CHANGE,
};
/** * struct mtk_jpeg_variant - mtk jpeg driver variant * @clks: clock names * @num_clks: numbers of clock * @formats: jpeg driver's internal color format * @num_formats: number of formats * @qops: the callback of jpeg vb2_ops * @irq_handler: jpeg irq handler callback * @hw_reset: jpeg hardware reset callback * @m2m_ops: the callback of jpeg v4l2_m2m_ops * @dev_name: jpeg device name * @ioctl_ops: the callback of jpeg v4l2_ioctl_ops * @out_q_default_fourcc: output queue default fourcc * @cap_q_default_fourcc: capture queue default fourcc * @multi_core: mark jpeg hw is multi_core or not * @jpeg_worker: jpeg dec or enc worker * @support_34bit: flag to check support for 34-bit DMA address
*/ struct mtk_jpeg_variant { struct clk_bulk_data *clks; int num_clks; struct mtk_jpeg_fmt *formats; int num_formats; conststruct vb2_ops *qops;
irqreturn_t (*irq_handler)(int irq, void *priv); void (*hw_reset)(void __iomem *base); conststruct v4l2_m2m_ops *m2m_ops; constchar *dev_name; conststruct v4l2_ioctl_ops *ioctl_ops;
u32 out_q_default_fourcc;
u32 cap_q_default_fourcc; bool multi_core; void (*jpeg_worker)(struct work_struct *work); bool support_34bit;
};
/** * struct mtk_jpeg_fmt - driver's internal color format data * @fourcc: the fourcc code, 0 if not applicable * @hw_format: hardware format value * @h_sample: horizontal sample count of plane in 4 * 4 pixel image * @v_sample: vertical sample count of plane in 4 * 4 pixel image * @colplanes: number of color planes (1 for packed formats) * @h_align: horizontal alignment order (align to 2^h_align) * @v_align: vertical alignment order (align to 2^v_align) * @flags: flags describing format applicability
*/ struct mtk_jpeg_fmt {
u32 fourcc;
u32 hw_format; int h_sample[VIDEO_MAX_PLANES]; int v_sample[VIDEO_MAX_PLANES]; int colplanes; int h_align; int v_align;
u32 flags;
};
/** * struct mtk_jpeg_q_data - parameters of one queue * @fmt: driver-specific format of this queue * @pix_mp: multiplanar format * @enc_crop_rect: jpeg encoder crop information
*/ struct mtk_jpeg_q_data { struct mtk_jpeg_fmt *fmt; struct v4l2_pix_format_mplane pix_mp; struct v4l2_rect enc_crop_rect;
};
/** * struct mtk_jpeg_ctx - the device context data * @jpeg: JPEG IP device for this context * @out_q: source (output) queue information * @cap_q: destination queue information * @fh: V4L2 file handle * @state: state of the context * @enable_exif: enable exif mode of jpeg encoder * @enc_quality: jpeg encoder quality * @restart_interval: jpeg encoder restart interval * @ctrl_hdl: controls handler * @jpeg_work: jpeg encoder workqueue * @total_frame_num: encoded frame number * @dst_done_queue: encoded frame buffer queue * @done_queue_lock: encoded frame operation spinlock * @last_done_frame_num: the last encoded frame number
*/ struct mtk_jpeg_ctx { struct mtk_jpeg_dev *jpeg; struct mtk_jpeg_q_data out_q; struct mtk_jpeg_q_data cap_q; struct v4l2_fh fh; enum mtk_jpeg_ctx_state state; bool enable_exif;
u8 enc_quality;
u8 restart_interval; struct v4l2_ctrl_handler ctrl_hdl;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.