Lines Matching refs:vsh
182 Avs2dSeqHeader_t *vsh = &p_dec->vsh; in wq_update_frame_matrix() local
196 frm_wqm = vsh->seq_wq_matrix; in wq_update_frame_matrix()
212 static MPP_RET parse_sequence_wqm(BitReadCtx_t *bitctx, Avs2dSeqHeader_t *vsh) in parse_sequence_wqm() argument
226 READ_UE(bitctx, &vsh->seq_wq_matrix[size_id][j * wqm_size + i]); in parse_sequence_wqm()
232 vsh->seq_wq_matrix[size_id][i] = seq_wqm[i]; in parse_sequence_wqm()
286 Avs2dSeqHeader_t *vsh = &p_dec->vsh; in avs2d_parse_sequence_header() local
289 memset(vsh, 0, sizeof(Avs2dSeqHeader_t)); in avs2d_parse_sequence_header()
290 READ_BITS(bitctx, 8, &vsh->profile_id); in avs2d_parse_sequence_header()
292 if (vsh->profile_id != 0x12 && vsh->profile_id != 0x20 && vsh->profile_id != 0x22) { in avs2d_parse_sequence_header()
294 mpp_err_f("profile_id 0x%02x is not supported.\n", vsh->profile_id); in avs2d_parse_sequence_header()
297 READ_BITS(bitctx, 8, &vsh->level_id); in avs2d_parse_sequence_header()
298 if (vsh->level_id > 0x6A) { in avs2d_parse_sequence_header()
300 mpp_err_f("level_id 0x%02x is not supported.\n", vsh->level_id); in avs2d_parse_sequence_header()
303 READ_ONEBIT(bitctx, &vsh->progressive_sequence); in avs2d_parse_sequence_header()
304 READ_ONEBIT(bitctx, &vsh->field_coded_sequence); in avs2d_parse_sequence_header()
305 READ_BITS(bitctx, 14, &vsh->horizontal_size); in avs2d_parse_sequence_header()
306 READ_BITS(bitctx, 14, &vsh->vertical_size); in avs2d_parse_sequence_header()
307 if (vsh->horizontal_size < 16 || vsh->vertical_size < 16) { in avs2d_parse_sequence_header()
310 vsh->horizontal_size, vsh->vertical_size); in avs2d_parse_sequence_header()
314 READ_BITS(bitctx, 2, &vsh->chroma_format); in avs2d_parse_sequence_header()
315 if (vsh->chroma_format != CHROMA_420) { in avs2d_parse_sequence_header()
317 mpp_err_f("chroma_format 0x%02x is not supported.\n", vsh->chroma_format); in avs2d_parse_sequence_header()
320 READ_BITS(bitctx, 3, &vsh->sample_precision); in avs2d_parse_sequence_header()
321 if (vsh->profile_id == MAIN10_PROFILE) { in avs2d_parse_sequence_header()
322 READ_BITS(bitctx, 3, &vsh->encoding_precision); in avs2d_parse_sequence_header()
324 vsh->encoding_precision = 1; in avs2d_parse_sequence_header()
326 vsh->bit_depth = 6 + (vsh->encoding_precision << 1); in avs2d_parse_sequence_header()
328 if (vsh->sample_precision < 1 || vsh->sample_precision > 2) { in avs2d_parse_sequence_header()
330 mpp_err_f("sample_precision 0x%02x is not supported.\n", vsh->sample_precision); in avs2d_parse_sequence_header()
333 if (vsh->encoding_precision < 1 || vsh->encoding_precision > 2) { in avs2d_parse_sequence_header()
335 mpp_err_f("encoding_precision 0x%02x is not supported.\n", vsh->encoding_precision); in avs2d_parse_sequence_header()
339 READ_BITS(bitctx, 4, &vsh->aspect_ratio); in avs2d_parse_sequence_header()
340 READ_BITS(bitctx, 4, &vsh->frame_rate_code); in avs2d_parse_sequence_header()
342 vsh->bit_rate = val_temp << 12; in avs2d_parse_sequence_header()
345 vsh->bit_rate += val_temp; in avs2d_parse_sequence_header()
346 READ_ONEBIT(bitctx, &vsh->low_delay); in avs2d_parse_sequence_header()
348 READ_ONEBIT(bitctx, &vsh->enable_temporal_id); in avs2d_parse_sequence_header()
349 READ_BITS(bitctx, 18, &vsh->bbv_buffer_size); in avs2d_parse_sequence_header()
350 READ_BITS(bitctx, 3, &vsh->lcu_size); in avs2d_parse_sequence_header()
351 if (vsh->lcu_size < 4 || vsh->lcu_size > 6) { in avs2d_parse_sequence_header()
353 mpp_err_f("invalid lcu size: %d\n", vsh->lcu_size); in avs2d_parse_sequence_header()
357 READ_ONEBIT(bitctx, &vsh->enable_weighted_quant); in avs2d_parse_sequence_header()
358 if (vsh->enable_weighted_quant) { in avs2d_parse_sequence_header()
359 parse_sequence_wqm(bitctx, vsh); in avs2d_parse_sequence_header()
363 vsh->enable_background_picture = val_temp ^ 0x01; in avs2d_parse_sequence_header()
364 READ_ONEBIT(bitctx, &vsh->enable_mhp_skip); in avs2d_parse_sequence_header()
365 READ_ONEBIT(bitctx, &vsh->enable_dhp); in avs2d_parse_sequence_header()
366 READ_ONEBIT(bitctx, &vsh->enable_wsm); in avs2d_parse_sequence_header()
367 READ_ONEBIT(bitctx, &vsh->enable_amp); in avs2d_parse_sequence_header()
368 READ_ONEBIT(bitctx, &vsh->enable_nsqt); in avs2d_parse_sequence_header()
369 READ_ONEBIT(bitctx, &vsh->enable_nsip); in avs2d_parse_sequence_header()
370 READ_ONEBIT(bitctx, &vsh->enable_2nd_transform); in avs2d_parse_sequence_header()
371 READ_ONEBIT(bitctx, &vsh->enable_sao); in avs2d_parse_sequence_header()
372 READ_ONEBIT(bitctx, &vsh->enable_alf); in avs2d_parse_sequence_header()
373 READ_ONEBIT(bitctx, &vsh->enable_pmvr); in avs2d_parse_sequence_header()
377 READ_BITS(bitctx, 6, &vsh->num_of_rps); in avs2d_parse_sequence_header()
378 for (i = 0; i < vsh->num_of_rps; i++) { in avs2d_parse_sequence_header()
379 rps = &vsh->seq_rps[i]; in avs2d_parse_sequence_header()
384 if (vsh->low_delay == 0) { in avs2d_parse_sequence_header()
385 READ_BITS(bitctx, 5, &vsh->picture_reorder_delay); in avs2d_parse_sequence_header()
387 vsh->picture_reorder_delay = 0; in avs2d_parse_sequence_header()
389 READ_ONEBIT(bitctx, &vsh->enable_clf); in avs2d_parse_sequence_header()
498 Avs2dSeqHeader_t *vsh = &p_dec->vsh; in parse_picture_header_comm() local
538 if (vsh->enable_weighted_quant) { in parse_picture_header_comm()
571 if (vsh->enable_alf) { in parse_picture_header_comm()
591 Avs2dSeqHeader_t *vsh = &p_dec->vsh; in parse_picture_header_intra() local
609 if (vsh->enable_background_picture) { in parse_picture_header_intra()
625 if (vsh->enable_temporal_id) { in parse_picture_header_intra()
630 …if (vsh->low_delay == 0 && !(ph->background_picture_flag && !ph->background_picture_output_flag)) { in parse_picture_header_intra()
648 p_dec->frm_mgr.cur_rps = vsh->seq_rps[rcs_index]; in parse_picture_header_intra()
654 if (vsh->low_delay) { in parse_picture_header_intra()
671 if (vsh->field_coded_sequence == 1) { //!< field picture in parse_picture_header_intra()
681 if (ph->picture_qp > (63 + 8 * (vsh->bit_depth - 8))) { in parse_picture_header_intra()
705 Avs2dSeqHeader_t *vsh = &p_dec->vsh; in parse_picture_header_inter() local
711 if (vsh->enable_background_picture) { in parse_picture_header_inter()
735 if (vsh->enable_temporal_id) { in parse_picture_header_inter()
739 if (vsh->low_delay == 0) { in parse_picture_header_inter()
756 p_dec->frm_mgr.cur_rps = vsh->seq_rps[rcs_index]; in parse_picture_header_inter()
762 if (vsh->low_delay) { in parse_picture_header_inter()
774 if (vsh->field_coded_sequence == 1) { //!< field picture in parse_picture_header_inter()
780 if (ph->picture_qp > (63 + 8 * (vsh->bit_depth - 8))) { in parse_picture_header_inter()