v4l2-h264.h (2e2c3d6c0ef88ffac0d6b5079ee88cf8408f5f3b) | v4l2-h264.h (26e4520509ffa4bec3d679f7cb3de9adfabef4b3) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * Helper functions for H264 codecs. 4 * 5 * Copyright (c) 2019 Collabora, Ltd. 6 * 7 * Author: Boris Brezillon <boris.brezillon@collabora.com> 8 */ --- 23 unchanged lines hidden (view full) --- 32struct v4l2_h264_reflist_builder { 33 struct { 34 s32 pic_order_count; 35 int frame_num; 36 u32 pic_num; 37 u16 longterm : 1; 38 } refs[V4L2_H264_NUM_DPB_ENTRIES]; 39 s32 cur_pic_order_count; | 1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * Helper functions for H264 codecs. 4 * 5 * Copyright (c) 2019 Collabora, Ltd. 6 * 7 * Author: Boris Brezillon <boris.brezillon@collabora.com> 8 */ --- 23 unchanged lines hidden (view full) --- 32struct v4l2_h264_reflist_builder { 33 struct { 34 s32 pic_order_count; 35 int frame_num; 36 u32 pic_num; 37 u16 longterm : 1; 38 } refs[V4L2_H264_NUM_DPB_ENTRIES]; 39 s32 cur_pic_order_count; |
40 struct v4l2_h264_reference unordered_reflist[V4L2_H264_NUM_DPB_ENTRIES]; | 40 struct v4l2_h264_reference unordered_reflist[V4L2_H264_REF_LIST_LEN]; |
41 u8 num_valid; 42}; 43 44void 45v4l2_h264_init_reflist_builder(struct v4l2_h264_reflist_builder *b, 46 const struct v4l2_ctrl_h264_decode_params *dec_params, 47 const struct v4l2_ctrl_h264_sps *sps, 48 const struct v4l2_h264_dpb_entry dpb[V4L2_H264_NUM_DPB_ENTRIES]); 49 50/** 51 * v4l2_h264_build_b_ref_lists() - Build the B0/B1 reference lists 52 * 53 * @builder: reference list builder context | 41 u8 num_valid; 42}; 43 44void 45v4l2_h264_init_reflist_builder(struct v4l2_h264_reflist_builder *b, 46 const struct v4l2_ctrl_h264_decode_params *dec_params, 47 const struct v4l2_ctrl_h264_sps *sps, 48 const struct v4l2_h264_dpb_entry dpb[V4L2_H264_NUM_DPB_ENTRIES]); 49 50/** 51 * v4l2_h264_build_b_ref_lists() - Build the B0/B1 reference lists 52 * 53 * @builder: reference list builder context |
54 * @b0_reflist: 16 sized array used to store the B0 reference list. Each entry | 54 * @b0_reflist: 32 sized array used to store the B0 reference list. Each entry |
55 * is a v4l2_h264_reference structure | 55 * is a v4l2_h264_reference structure |
56 * @b1_reflist: 16 sized array used to store the B1 reference list. Each entry | 56 * @b1_reflist: 32 sized array used to store the B1 reference list. Each entry |
57 * is a v4l2_h264_reference structure 58 * 59 * This functions builds the B0/B1 reference lists. This procedure is described 60 * in section '8.2.4 Decoding process for reference picture lists construction' 61 * of the H264 spec. This function can be used by H264 decoder drivers that 62 * need to pass B0/B1 reference lists to the hardware. 63 */ 64void 65v4l2_h264_build_b_ref_lists(const struct v4l2_h264_reflist_builder *builder, 66 struct v4l2_h264_reference *b0_reflist, 67 struct v4l2_h264_reference *b1_reflist); 68 69/** 70 * v4l2_h264_build_p_ref_list() - Build the P reference list 71 * 72 * @builder: reference list builder context | 57 * is a v4l2_h264_reference structure 58 * 59 * This functions builds the B0/B1 reference lists. This procedure is described 60 * in section '8.2.4 Decoding process for reference picture lists construction' 61 * of the H264 spec. This function can be used by H264 decoder drivers that 62 * need to pass B0/B1 reference lists to the hardware. 63 */ 64void 65v4l2_h264_build_b_ref_lists(const struct v4l2_h264_reflist_builder *builder, 66 struct v4l2_h264_reference *b0_reflist, 67 struct v4l2_h264_reference *b1_reflist); 68 69/** 70 * v4l2_h264_build_p_ref_list() - Build the P reference list 71 * 72 * @builder: reference list builder context |
73 * @reflist: 16 sized array used to store the P reference list. Each entry | 73 * @reflist: 32 sized array used to store the P reference list. Each entry |
74 * is a v4l2_h264_reference structure 75 * 76 * This functions builds the P reference lists. This procedure is describe in 77 * section '8.2.4 Decoding process for reference picture lists construction' 78 * of the H264 spec. This function can be used by H264 decoder drivers that 79 * need to pass a P reference list to the hardware. 80 */ 81void 82v4l2_h264_build_p_ref_list(const struct v4l2_h264_reflist_builder *builder, 83 struct v4l2_h264_reference *reflist); 84 85#endif /* _MEDIA_V4L2_H264_H */ | 74 * is a v4l2_h264_reference structure 75 * 76 * This functions builds the P reference lists. This procedure is describe in 77 * section '8.2.4 Decoding process for reference picture lists construction' 78 * of the H264 spec. This function can be used by H264 decoder drivers that 79 * need to pass a P reference list to the hardware. 80 */ 81void 82v4l2_h264_build_p_ref_list(const struct v4l2_h264_reflist_builder *builder, 83 struct v4l2_h264_reference *reflist); 84 85#endif /* _MEDIA_V4L2_H264_H */ |