1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /* Copyright (C) 2016-2017 Dmitry Osipenko <digetx@gmail.com> */
3 #ifndef _UAPI_TEGRA_VDE_H_
4 #define _UAPI_TEGRA_VDE_H_
6 #include <linux/types.h>
9 #define FLAG_B_FRAME 0x1
10 #define FLAG_REFERENCE 0x2
12 struct tegra_vde_h264_frame {
28 struct tegra_vde_h264_decoder_ctx {
29 __s32 bitstream_data_fd;
30 __u32 bitstream_data_offset;
34 __u32 dpb_ref_frames_with_earlier_poc_nb;
37 __u32 baseline_profile;
39 __u32 log2_max_pic_order_cnt_lsb;
40 __u32 log2_max_frame_num;
41 __u32 pic_order_cnt_type;
42 __u32 direct_8x8_inference_flag;
43 __u32 pic_width_in_mbs;
44 __u32 pic_height_in_mbs;
48 __u32 deblocking_filter_control_present_flag;
49 __u32 constrained_intra_pred_flag;
50 __u32 chroma_qp_index_offset;
51 __u32 pic_order_present_flag;
54 __u32 num_ref_idx_l0_active_minus1;
55 __u32 num_ref_idx_l1_active_minus1;
61 #define VDE_IOCTL_BASE ('v' + 0x20)
63 #define VDE_IO(nr) _IO(VDE_IOCTL_BASE, nr)
64 #define VDE_IOR(nr, type) _IOR(VDE_IOCTL_BASE, nr, type)
65 #define VDE_IOW(nr, type) _IOW(VDE_IOCTL_BASE, nr, type)
66 #define VDE_IOWR(nr, type) _IOWR(VDE_IOCTL_BASE, nr, type)
68 #define TEGRA_VDE_DECODE_H264 0x00
70 #define TEGRA_VDE_IOCTL_DECODE_H264 \
71 VDE_IOW(TEGRA_VDE_DECODE_H264, struct tegra_vde_h264_decoder_ctx)
73 #endif // _UAPI_TEGRA_VDE_H_