Lines Matching refs:s

138 int mpp_hevc_decode_short_term_rps(HEVCContext *s, ShortTermRPS *rps,  in mpp_hevc_decode_short_term_rps()  argument
141 HEVCLocalContext *lc = s->HEVClc; in mpp_hevc_decode_short_term_rps()
267 s->rps_need_upate = 1; in mpp_hevc_decode_short_term_rps()
274 static RK_S32 decode_profile_tier_level(HEVCContext *s, PTLCommon *ptl) in decode_profile_tier_level() argument
277 HEVCLocalContext *lc = s->HEVClc; in decode_profile_tier_level()
315 static RK_S32 parse_ptl(HEVCContext *s, PTL *ptl, int max_num_sub_layers) in parse_ptl() argument
318 HEVCLocalContext *lc = s->HEVClc; in parse_ptl()
321 decode_profile_tier_level(s, &ptl->general_ptl); in parse_ptl()
333 decode_profile_tier_level(s, &ptl->sub_layer_ptl[i]); in parse_ptl()
343 static RK_S32 decode_sublayer_hrd(HEVCContext *s, unsigned int nb_cpb, in decode_sublayer_hrd() argument
346 BitReadCtx_t *gb = &s->HEVClc->gb; in decode_sublayer_hrd()
364 static RK_S32 decode_hrd(HEVCContext *s, int common_inf_present, in decode_hrd() argument
367 BitReadCtx_t *gb = &s->HEVClc->gb; in decode_hrd()
420 decode_sublayer_hrd(s, nb_cpb, subpic_params_present); in decode_hrd()
422 decode_sublayer_hrd(s, nb_cpb, subpic_params_present); in decode_hrd()
431 static RK_S32 parse_vps_extension (HEVCContext *s, HEVCVPS *vps) in parse_vps_extension() argument
435 BitReadCtx_t *gb = &s->HEVClc->gb; in parse_vps_extension()
528 parse_ptl(s, vps->PTLExt[i], vps->vps_max_sub_layers); in parse_vps_extension()
1040 int mpp_hevc_decode_nal_vps(HEVCContext *s) in mpp_hevc_decode_nal_vps() argument
1043 BitReadCtx_t *gb = &s->HEVClc->gb; in mpp_hevc_decode_nal_vps()
1046 RK_U8 *vps_buf = mpp_mem_pool_get_f(s->vps_pool); in mpp_hevc_decode_nal_vps()
1089 parse_ptl(s, &vps->ptl, vps->vps_max_sub_layers); in mpp_hevc_decode_nal_vps()
1137 decode_hrd(s, common_inf_present, vps->vps_max_sub_layers); in mpp_hevc_decode_nal_vps()
1145 parse_vps_extension(s, vps); in mpp_hevc_decode_nal_vps()
1148 if (s->h265dctx->compare_info != NULL) { in mpp_hevc_decode_nal_vps()
1149 CurrentFameInf_t *info = (CurrentFameInf_t *)s->h265dctx->compare_info; in mpp_hevc_decode_nal_vps()
1160 if (s->vps_list[vps_id] && in mpp_hevc_decode_nal_vps()
1161 !memcmp(s->vps_list[vps_id], vps_buf, sizeof(HEVCVPS))) { in mpp_hevc_decode_nal_vps()
1162 mpp_mem_pool_put_f(s->vps_pool, vps_buf); in mpp_hevc_decode_nal_vps()
1164 if (s->vps_list[vps_id] != NULL) { in mpp_hevc_decode_nal_vps()
1165 mpp_mem_pool_put_f(s->vps_pool, s->vps_list[vps_id]); in mpp_hevc_decode_nal_vps()
1167 s->vps_list[vps_id] = vps_buf; in mpp_hevc_decode_nal_vps()
1168 s->ps_need_upate = 1; in mpp_hevc_decode_nal_vps()
1174 mpp_mem_pool_put_f(s->vps_pool, vps_buf); in mpp_hevc_decode_nal_vps()
1179 static RK_S32 decode_vui(HEVCContext *s, HEVCSPS *sps) in decode_vui() argument
1182 BitReadCtx_t *gb = &s->HEVClc->gb; in decode_vui()
1226 s->is_hdr = 1; in decode_vui()
1261 if (s->apply_defdispwin && in decode_vui()
1262 s->h265dctx->flags2 & CODEC_FLAG2_IGNORE_CROP) { in decode_vui()
1289 decode_hrd(s, 1, sps->max_sub_layers); in decode_vui()
1339 static int scaling_list_data(HEVCContext *s, ScalingList *sl, HEVCSPS *sps) in scaling_list_data() argument
1341 BitReadCtx_t *gb = &s->HEVClc->gb; in scaling_list_data()
1413 RK_S32 mpp_hevc_decode_nal_sps(HEVCContext *s) in mpp_hevc_decode_nal_sps() argument
1416 BitReadCtx_t *gb = &s->HEVClc->gb; in mpp_hevc_decode_nal_sps()
1425 RK_U8 *sps_buf = mpp_mem_pool_get_f(s->sps_pool); in mpp_hevc_decode_nal_sps()
1442 if (!s->vps_list[sps->vps_id]) { in mpp_hevc_decode_nal_sps()
1459 parse_ptl(s, &sps->ptl, sps->max_sub_layers); in mpp_hevc_decode_nal_sps()
1536 mpp_slots_set_prop(s->slots, SLOTS_LEN_ALIGN, rkv_len_align_422); in mpp_hevc_decode_nal_sps()
1548 mpp_slots_set_prop(s->slots, SLOTS_LEN_ALIGN, rkv_len_align_444); in mpp_hevc_decode_nal_sps()
1670 ret = scaling_list_data(s, &sps->scaling_list, sps); in mpp_hevc_decode_nal_sps()
1675 s->scaling_list_listen[sps_id] = 1; in mpp_hevc_decode_nal_sps()
1714 if ((ret = mpp_hevc_decode_short_term_rps(s, &sps->st_rps[i], in mpp_hevc_decode_nal_sps()
1731 if (s->nuh_layer_id > 0) in mpp_hevc_decode_nal_sps()
1740 decode_vui(s, sps); in mpp_hevc_decode_nal_sps()
1742 if ( s->nuh_layer_id > 0 ) { in mpp_hevc_decode_nal_sps()
1781 if (s->apply_defdispwin) { in mpp_hevc_decode_nal_sps()
1803 if (s->h265dctx->err_recognition & AV_EF_EXPLODE) { in mpp_hevc_decode_nal_sps()
1819 if (s->h265dctx->width == 0 && s->h265dctx->height == 0) { in mpp_hevc_decode_nal_sps()
1820 s->h265dctx->width = sps->output_width; in mpp_hevc_decode_nal_sps()
1821 s->h265dctx->height = sps->output_height; in mpp_hevc_decode_nal_sps()
1872 if (s->h265dctx->compare_info != NULL) { in mpp_hevc_decode_nal_sps()
1873 CurrentFameInf_t *info = (CurrentFameInf_t *)s->h265dctx->compare_info; in mpp_hevc_decode_nal_sps()
1888 if (s->sps_list[sps_id] && in mpp_hevc_decode_nal_sps()
1889 !memcmp(s->sps_list[sps_id], sps_buf, sizeof(HEVCSPS))) { in mpp_hevc_decode_nal_sps()
1890 mpp_mem_pool_put_f(s->sps_pool, sps_buf); in mpp_hevc_decode_nal_sps()
1892 for (i = 0; (RK_U32)i < MPP_ARRAY_ELEMS(s->pps_list); i++) { in mpp_hevc_decode_nal_sps()
1893 if (s->pps_list[i] && ((HEVCPPS*)s->pps_list[i])->sps_id == sps_id) { in mpp_hevc_decode_nal_sps()
1894 mpp_hevc_pps_free(s->pps_list[i]); in mpp_hevc_decode_nal_sps()
1895 s->pps_list[i] = NULL; in mpp_hevc_decode_nal_sps()
1898 if (s->sps_list[sps_id] != NULL) in mpp_hevc_decode_nal_sps()
1899 mpp_mem_pool_put_f(s->sps_pool, s->sps_list[sps_id]); in mpp_hevc_decode_nal_sps()
1900 s->sps_list[sps_id] = sps_buf; in mpp_hevc_decode_nal_sps()
1901 s->sps_need_upate = 1; in mpp_hevc_decode_nal_sps()
1904 if (s->sps_list[sps_id]) in mpp_hevc_decode_nal_sps()
1905 s->sps_list_of_updated[sps_id] = 1; in mpp_hevc_decode_nal_sps()
1911 mpp_mem_pool_put_f(s->sps_pool, sps_buf); in mpp_hevc_decode_nal_sps()
1926 int mpp_hevc_decode_nal_pps(HEVCContext *s) in mpp_hevc_decode_nal_pps() argument
1928 BitReadCtx_t *gb = &s->HEVClc->gb; in mpp_hevc_decode_nal_pps()
1950 if (s->pps_list[pps_id]) { in mpp_hevc_decode_nal_pps()
1951 bufs = &(((HEVCPPS *)s->pps_list[pps_id])->bufs); in mpp_hevc_decode_nal_pps()
1972 if (!s->sps_list[pps->sps_id]) { in mpp_hevc_decode_nal_pps()
1977 sps = (HEVCSPS *)s->sps_list[pps->sps_id]; in mpp_hevc_decode_nal_pps()
2028 if (s->h265dctx->hw_info) { in mpp_hevc_decode_nal_pps()
2029 const MppDecHwCap *hw_info = s->h265dctx->hw_info; in mpp_hevc_decode_nal_pps()
2154 ret = scaling_list_data(s, &pps->scaling_list, sps); in mpp_hevc_decode_nal_pps()
2158 s->scaling_list_listen[pps_id + 16] = 1; in mpp_hevc_decode_nal_pps()
2184 if (s->h265dctx->compare_info != NULL) { in mpp_hevc_decode_nal_pps()
2185 CurrentFameInf_t *info = (CurrentFameInf_t *)s->h265dctx->compare_info; in mpp_hevc_decode_nal_pps()
2225 if (s->pps_list[pps_id]) { in mpp_hevc_decode_nal_pps()
2226 memcpy(s->pps_list[pps_id], pps, sizeof(*pps) - sizeof(pps->bufs)); in mpp_hevc_decode_nal_pps()
2229 s->pps_list[pps_id] = (RK_U8 *)pps; in mpp_hevc_decode_nal_pps()
2231 s->ps_need_upate = 1; in mpp_hevc_decode_nal_pps()
2233 if (s->pps_list[pps_id]) in mpp_hevc_decode_nal_pps()
2234 s->pps_list_of_updated[pps_id] = 1; in mpp_hevc_decode_nal_pps()