Lines Matching refs:vsh
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()
36 if (vsh->profile_id != 0x20 && vsh->profile_id != 0x48) { in get_sequence_header()
38 mpp_err_f("profile_id 0x%02x is not supported.\n", vsh->profile_id); in get_sequence_header()
41 READ_BITS(bitctx, 8, &vsh->level_id); in get_sequence_header()
42 if (vsh->level_id > 0x42) { in get_sequence_header()
44 mpp_err_f("level_id 0x%02x is not supported.\n", 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()
55 vsh->bit_rate = val_temp << 12; in get_sequence_header()
58 vsh->bit_rate += val_temp; in get_sequence_header()
59 READ_ONEBIT(bitctx, &vsh->low_delay); in get_sequence_header()
61 READ_BITS(bitctx, 18, &vsh->bbv_buffer_size); 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
134 if (vsh->profile_id == 0x48) { in get_extend_header()
213 static MPP_RET get_i_picture_header(BitReadCtx_t *bitctx, AvsdSeqHeader_t *vsh, AvsdPicHeader_t *ph) in get_i_picture_header() argument
220 if (vsh->profile_id == 0x48) { in get_i_picture_header()
230 if (!vsh->version_checked) { in get_i_picture_header()
231 vsh->version = 0; in get_i_picture_header()
233 if (vsh->low_delay) { in get_i_picture_header()
234 vsh->version = 1; in get_i_picture_header()
238 vsh->version = 1; in get_i_picture_header()
242 vsh->version = 1; in get_i_picture_header()
247 if (vsh->version > 0) in get_i_picture_header()
252 if (vsh->low_delay) in get_i_picture_header()
277 FUN_CHECK(ret = get_extend_header(bitctx, vsh, ph)); 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
292 if (vsh->profile_id == 0x48) { in get_pb_picture_header()
298 if (vsh->low_delay) { in get_pb_picture_header()
320 if (vsh->profile_id != 0x48) { in get_pb_picture_header()
333 FUN_CHECK(ret = get_extend_header(bitctx, vsh, ph)); in get_pb_picture_header()
420 p_dec->vsh.version_checked = 0; in avsd_reset_parameters()
454 p_cur->width = p_dec->vsh.horizontal_size; in avsd_set_dpb()
455 p_cur->height = p_dec->vsh.vertical_size; in avsd_set_dpb()
456 p_cur->hor_stride = MPP_ALIGN(p_dec->vsh.horizontal_size, 16); in avsd_set_dpb()
457 p_cur->ver_stride = MPP_ALIGN(p_dec->vsh.vertical_size, 16); in avsd_set_dpb()
591 pp->profileId = p_dec->vsh.profile_id; in avsd_fill_parameters()
592 pp->levelId = p_dec->vsh.level_id; in avsd_fill_parameters()
593 pp->progressiveSequence = p_dec->vsh.progressive_sequence; in avsd_fill_parameters()
594 pp->horizontalSize = p_dec->vsh.horizontal_size; in avsd_fill_parameters()
595 pp->verticalSize = p_dec->vsh.vertical_size; in avsd_fill_parameters()
596 pp->chromaFormat = p_dec->vsh.chroma_format; in avsd_fill_parameters()
597 pp->aspectRatio = p_dec->vsh.aspect_ratio; in avsd_fill_parameters()
598 pp->frameRateCode = p_dec->vsh.frame_rate_code; in avsd_fill_parameters()
599 pp->bitRateValue = p_dec->vsh.bit_rate; in avsd_fill_parameters()
600 pp->lowDelay = p_dec->vsh.low_delay; in avsd_fill_parameters()
601 pp->bbvBufferSize = p_dec->vsh.bbv_buffer_size; in avsd_fill_parameters()
770 ret = get_sequence_header(p_dec->bx, &p_dec->vsh); in avsd_parse_stream()
789 ret = get_i_picture_header(p_dec->bx, &p_dec->vsh, &p_dec->ph); in avsd_parse_stream()
806 ret = get_pb_picture_header(p_dec->bx, &p_dec->vsh, &p_dec->ph); in avsd_parse_stream()
831 (pic_type == B_PICTURE && !p_dec->dpb[1] && !p_dec->vsh.low_delay) || in avsd_parse_stream()