Lines Matching refs:bitctx
29 static MPP_RET get_sequence_header(BitReadCtx_t *bitctx, AvsdSeqHeader_t *vsh) in get_sequence_header() argument
34 READ_BITS(bitctx, 8, &vsh->profile_id); in get_sequence_header()
41 READ_BITS(bitctx, 8, &vsh->level_id); in get_sequence_header()
47 READ_ONEBIT(bitctx, &vsh->progressive_sequence); in get_sequence_header()
48 READ_BITS(bitctx, 14, &vsh->horizontal_size); in get_sequence_header()
49 READ_BITS(bitctx, 14, &vsh->vertical_size); in get_sequence_header()
50 READ_BITS(bitctx, 2, &vsh->chroma_format); in get_sequence_header()
51 READ_BITS(bitctx, 3, &vsh->sample_precision); in get_sequence_header()
52 READ_BITS(bitctx, 4, &vsh->aspect_ratio); in get_sequence_header()
53 READ_BITS(bitctx, 4, &vsh->frame_rate_code); in get_sequence_header()
54 READ_BITS(bitctx, 18, &val_temp); //!< bit_rate_high_18 in get_sequence_header()
56 SKIP_BITS(bitctx, 1); in get_sequence_header()
57 READ_BITS(bitctx, 12, &val_temp); //!< bit_rate_low_12 in get_sequence_header()
59 READ_ONEBIT(bitctx, &vsh->low_delay); in get_sequence_header()
60 SKIP_BITS(bitctx, 1); in get_sequence_header()
61 READ_BITS(bitctx, 18, &vsh->bbv_buffer_size); in get_sequence_header()
62 READ_BITS(bitctx, 3, &val_temp); //!< reserve 3bits 000 in get_sequence_header()
68 return ret = bitctx->ret; in get_sequence_header()
115 static MPP_RET get_extend_header(BitReadCtx_t *bitctx, AvsdSeqHeader_t *vsh, AvsdPicHeader_t *ph) in get_extend_header() argument
120 READ_ONEBIT(bitctx, &ph->loop_filter_disable); in get_extend_header()
122 READ_ONEBIT(bitctx, &ph->loop_filter_parameter_flag); in get_extend_header()
124 READ_SE(bitctx, &ph->alpha_c_offset); in get_extend_header()
125 READ_SE(bitctx, &ph->beta_offset); in get_extend_header()
135 READ_ONEBIT(bitctx, &ph->weighting_quant_flag); in get_extend_header()
137 SKIP_BITS(bitctx, 1); in get_extend_header()
138 READ_ONEBIT(bitctx, &ph->chroma_quant_param_disable); in get_extend_header()
140 READ_SE(bitctx, &ph->chroma_quant_param_delta_cb); in get_extend_header()
141 READ_SE(bitctx, &ph->chroma_quant_param_delta_cr); in get_extend_header()
143 READ_BITS(bitctx, 2, &ph->weighting_quant_param_index); in get_extend_header()
144 READ_BITS(bitctx, 2, &ph->weighting_quant_model); in get_extend_header()
147 READ_SE(bitctx, &ph->weighting_quant_param_delta1[i]); in get_extend_header()
151 READ_SE(bitctx, &ph->weighting_quant_param_delta2[i]); in get_extend_header()
157 READ_ONEBIT(bitctx, &ph->aec_enable); in get_extend_header()
162 return ret = bitctx->ret; in get_extend_header()
165 static MPP_RET get_seq_dispay_ext_header(BitReadCtx_t *bitctx, AvsdSeqExtHeader_t *ext) in get_seq_dispay_ext_header() argument
170 READ_BITS(bitctx, 3, &ext->video_format); in get_seq_dispay_ext_header()
171 READ_ONEBIT(bitctx, &ext->sample_range); in get_seq_dispay_ext_header()
172 READ_ONEBIT(bitctx, &ext->color_description); in get_seq_dispay_ext_header()
175 READ_BITS(bitctx, 8, &ext->color_primaries); in get_seq_dispay_ext_header()
176 READ_BITS(bitctx, 8, &ext->transfer_characteristics); in get_seq_dispay_ext_header()
177 READ_BITS(bitctx, 8, &ext->matrix_coefficients); in get_seq_dispay_ext_header()
179 READ_BITS(bitctx, 14, &ext->display_horizontalSize); in get_seq_dispay_ext_header()
180 SKIP_BITS(bitctx, 1); //!< marker bit in get_seq_dispay_ext_header()
181 READ_BITS(bitctx, 14, &ext->display_verticalSize); in get_seq_dispay_ext_header()
183 READ_BITS(bitctx, 2, &val_temp); //!< reserve 2 bits in get_seq_dispay_ext_header()
189 return ret = bitctx->ret; in get_seq_dispay_ext_header()
191 static MPP_RET get_extension_header(BitReadCtx_t *bitctx, AvsdSeqExtHeader_t *ext) in get_extension_header() argument
196 READ_BITS(bitctx, 4, &val_temp); //!< extension_start_code in get_extension_header()
199 FUN_CHECK(ret = get_seq_dispay_ext_header(bitctx, ext)); in get_extension_header()
208 return ret = bitctx->ret; in get_extension_header()
213 static MPP_RET get_i_picture_header(BitReadCtx_t *bitctx, AvsdSeqHeader_t *vsh, AvsdPicHeader_t *ph) in get_i_picture_header() argument
219 READ_BITS(bitctx, 16, &ph->bbv_delay); in get_i_picture_header()
221 SKIP_BITS(bitctx, 1); in get_i_picture_header()
222 READ_BITS(bitctx, 7, &ph->bbv_delay_extension); in get_i_picture_header()
224 READ_ONEBIT(bitctx, &ph->time_code_flag); in get_i_picture_header()
226 READ_BITS(bitctx, 24, &ph->time_code); in get_i_picture_header()
236 SHOW_BITS(bitctx, 9, &val_temp); in get_i_picture_header()
240 SHOW_BITS(bitctx, 11, &val_temp); in get_i_picture_header()
248 SKIP_BITS(bitctx, 1); // marker bit in get_i_picture_header()
250 READ_BITS(bitctx, 8, &ph->picture_distance); in get_i_picture_header()
253 READ_UE(bitctx, &ph->bbv_check_times); in get_i_picture_header()
255 READ_ONEBIT(bitctx, &ph->progressive_frame); in get_i_picture_header()
259 READ_ONEBIT(bitctx, &ph->picture_structure); in get_i_picture_header()
261 READ_ONEBIT(bitctx, &ph->top_field_first); in get_i_picture_header()
262 READ_ONEBIT(bitctx, &ph->repeat_first_field); in get_i_picture_header()
263 READ_ONEBIT(bitctx, &ph->fixed_picture_qp); in get_i_picture_header()
264 READ_BITS(bitctx, 6, &ph->picture_qp); in get_i_picture_header()
267 READ_ONEBIT(bitctx, &ph->skip_mode_flag); in get_i_picture_header()
268 READ_BITS(bitctx, 4, &val_temp); //!< reserve 4 bits in get_i_picture_header()
277 FUN_CHECK(ret = get_extend_header(bitctx, vsh, ph)); in get_i_picture_header()
281 return ret = bitctx->ret; in get_i_picture_header()
286 static MPP_RET get_pb_picture_header(BitReadCtx_t *bitctx, AvsdSeqHeader_t *vsh, AvsdPicHeader_t *p… in get_pb_picture_header() argument
291 READ_BITS(bitctx, 16, &ph->bbv_delay); in get_pb_picture_header()
293 SKIP_BITS(bitctx, 1); in get_pb_picture_header()
294 READ_BITS(bitctx, 7, &ph->bbv_delay_extension); in get_pb_picture_header()
296 READ_BITS(bitctx, 2, &ph->picture_coding_type); in get_pb_picture_header()
297 READ_BITS(bitctx, 8, &ph->picture_distance); in get_pb_picture_header()
299 READ_UE(bitctx, &ph->bbv_check_times); in get_pb_picture_header()
301 READ_ONEBIT(bitctx, &ph->progressive_frame); in get_pb_picture_header()
304 READ_ONEBIT(bitctx, &ph->picture_structure); in get_pb_picture_header()
306 READ_ONEBIT(bitctx, &ph->advanced_pred_mode_disable); in get_pb_picture_header()
311 READ_ONEBIT(bitctx, &ph->top_field_first); in get_pb_picture_header()
312 READ_ONEBIT(bitctx, &ph->repeat_first_field); in get_pb_picture_header()
313 READ_ONEBIT(bitctx, &ph->fixed_picture_qp); in get_pb_picture_header()
314 READ_BITS(bitctx, 6, &ph->picture_qp); in get_pb_picture_header()
316 READ_ONEBIT(bitctx, &ph->picture_reference_flag); in get_pb_picture_header()
318 READ_ONEBIT(bitctx, &ph->no_forward_reference_flag); in get_pb_picture_header()
319 READ_ONEBIT(bitctx, &ph->pb_field_enhanced_flag); in get_pb_picture_header()
327 READ_BITS(bitctx, 2, &val_temp); //!< reserve bits in get_pb_picture_header()
331 READ_ONEBIT(bitctx, &ph->skip_mode_flag); in get_pb_picture_header()
333 FUN_CHECK(ret = get_extend_header(bitctx, vsh, ph)); in get_pb_picture_header()
337 return ret = bitctx->ret; in get_pb_picture_header()