Lines Matching refs:sps
88 static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps) in pic_arrays_init() argument
90 int log2_min_cb_size = sps->log2_min_cb_size; in pic_arrays_init()
91 int width = sps->width; in pic_arrays_init()
92 int height = sps->height; in pic_arrays_init()
95 int ctb_count = sps->ctb_width * sps->ctb_height; in pic_arrays_init()
96 int min_pu_size = sps->min_pu_width * sps->min_pu_height; in pic_arrays_init()
106 s->skip_flag = av_malloc_array(sps->min_cb_height, sps->min_cb_width); in pic_arrays_init()
107 s->tab_ct_depth = av_malloc_array(sps->min_cb_height, sps->min_cb_width); in pic_arrays_init()
111 s->cbf_luma = av_malloc_array(sps->min_tb_width, sps->min_tb_height); in pic_arrays_init()
113 s->is_pcm = av_malloc_array(sps->min_pu_width + 1, sps->min_pu_height + 1); in pic_arrays_init()
160 if (s->ps.sps->chroma_format_idc != 0) { in pred_weight_table()
176 if (s->ps.sps->chroma_format_idc != 0) { in pred_weight_table()
220 if (s->ps.sps->chroma_format_idc != 0) { in pred_weight_table()
262 const HEVCSPS *sps = s->ps.sps; in decode_lt_rps() local
263 int max_poc_lsb = 1 << sps->log2_max_poc_lsb; in decode_lt_rps()
269 if (!sps->long_term_ref_pics_present_flag) in decode_lt_rps()
272 if (sps->num_long_term_ref_pics_sps > 0) in decode_lt_rps()
276 if (nb_sps > sps->num_long_term_ref_pics_sps) in decode_lt_rps()
288 if (sps->num_long_term_ref_pics_sps > 1) in decode_lt_rps()
289 lt_idx_sps = get_bits(gb, av_ceil_log2(sps->num_long_term_ref_pics_sps)); in decode_lt_rps()
291 rps->poc[i] = sps->lt_ref_pic_poc_lsb_sps[lt_idx_sps]; in decode_lt_rps()
292 rps->used[i] = sps->used_by_curr_pic_lt_sps_flag[lt_idx_sps]; in decode_lt_rps()
294 rps->poc[i] = get_bits(gb, sps->log2_max_poc_lsb); in decode_lt_rps()
317 static void export_stream_params(HEVCContext *s, const HEVCSPS *sps) in export_stream_params() argument
321 const HEVCVPS *vps = (const HEVCVPS*)ps->vps_list[sps->vps_id]->data; in export_stream_params()
322 const HEVCWindow *ow = &sps->output_window; in export_stream_params()
325 avctx->pix_fmt = sps->pix_fmt; in export_stream_params()
326 avctx->coded_width = sps->width; in export_stream_params()
327 avctx->coded_height = sps->height; in export_stream_params()
328 avctx->width = sps->width - ow->left_offset - ow->right_offset; in export_stream_params()
329 avctx->height = sps->height - ow->top_offset - ow->bottom_offset; in export_stream_params()
330 avctx->has_b_frames = sps->temporal_layer[sps->max_sub_layers - 1].num_reorder_pics; in export_stream_params()
331 avctx->profile = sps->ptl.general_ptl.profile_idc; in export_stream_params()
332 avctx->level = sps->ptl.general_ptl.level_idc; in export_stream_params()
334 ff_set_sar(avctx, sps->vui.sar); in export_stream_params()
336 if (sps->vui.video_signal_type_present_flag) in export_stream_params()
337 avctx->color_range = sps->vui.video_full_range_flag ? AVCOL_RANGE_JPEG in export_stream_params()
342 if (sps->vui.colour_description_present_flag) { in export_stream_params()
343 avctx->color_primaries = sps->vui.colour_primaries; in export_stream_params()
344 avctx->color_trc = sps->vui.transfer_characteristic; in export_stream_params()
345 avctx->colorspace = sps->vui.matrix_coeffs; in export_stream_params()
353 if (sps->chroma_format_idc == 1) { in export_stream_params()
354 if (sps->vui.chroma_loc_info_present_flag) { in export_stream_params()
355 if (sps->vui.chroma_sample_loc_type_top_field <= 5) in export_stream_params()
356 avctx->chroma_sample_location = sps->vui.chroma_sample_loc_type_top_field + 1; in export_stream_params()
364 } else if (sps->vui.vui_timing_info_present_flag) { in export_stream_params()
365 num = sps->vui.vui_num_units_in_tick; in export_stream_params()
366 den = sps->vui.vui_time_scale; in export_stream_params()
390 static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps) in get_format() argument
400 switch (sps->pix_fmt) { in get_format()
470 *fmt++ = sps->pix_fmt; in get_format()
476 static int set_sps(HEVCContext *s, const HEVCSPS *sps, in set_sps() argument
482 s->ps.sps = NULL; in set_sps()
485 if (!sps) in set_sps()
488 ret = pic_arrays_init(s, sps); in set_sps()
492 export_stream_params(s, sps); in set_sps()
496 ff_hevc_pred_init(&s->hpc, sps->bit_depth); in set_sps()
497 ff_hevc_dsp_init (&s->hevcdsp, sps->bit_depth); in set_sps()
498 ff_videodsp_init (&s->vdsp, sps->bit_depth); in set_sps()
505 if (sps->sao_enabled && !s->avctx->hwaccel) { in set_sps()
506 int c_count = (sps->chroma_format_idc != 0) ? 3 : 1; in set_sps()
510 int w = sps->width >> sps->hshift[c_idx]; in set_sps()
511 int h = sps->height >> sps->vshift[c_idx]; in set_sps()
513 av_malloc((w * 2 * sps->ctb_height) << in set_sps()
514 sps->pixel_shift); in set_sps()
516 av_malloc((h * 2 * sps->ctb_width) << in set_sps()
517 sps->pixel_shift); in set_sps()
524 s->ps.sps = sps; in set_sps()
525 s->ps.vps = (HEVCVPS*) s->ps.vps_list[s->ps.sps->vps_id]->data; in set_sps()
535 s->ps.sps = NULL; in set_sps()
576 if (s->ps.sps != (HEVCSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data) { in hls_slice_header()
577 const HEVCSPS *sps = (HEVCSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data; in hls_slice_header() local
578 const HEVCSPS *last_sps = s->ps.sps; in hls_slice_header()
582 if (sps->width != last_sps->width || sps->height != last_sps->height || in hls_slice_header()
583 sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering != in hls_slice_header()
589 ret = set_sps(s, sps, sps->pix_fmt); in hls_slice_header()
593 pix_fmt = get_format(s, sps); in hls_slice_header()
613 slice_address_length = av_ceil_log2(s->ps.sps->ctb_width * in hls_slice_header()
614 s->ps.sps->ctb_height); in hls_slice_header()
616 if (sh->slice_segment_addr >= s->ps.sps->ctb_width * s->ps.sps->ctb_height) { in hls_slice_header()
657 if (s->ps.sps->separate_colour_plane_flag) in hls_slice_header()
663 sh->pic_order_cnt_lsb = get_bits(gb, s->ps.sps->log2_max_poc_lsb); in hls_slice_header()
664 … poc = ff_hevc_compute_poc(s->ps.sps, s->pocTid0, sh->pic_order_cnt_lsb, s->nal_unit_type); in hls_slice_header()
677 ret = ff_hevc_decode_short_term_rps(gb, s->avctx, &sh->slice_rps, s->ps.sps, 1); in hls_slice_header()
685 if (!s->ps.sps->nb_st_rps) { in hls_slice_header()
690 numbits = av_ceil_log2(s->ps.sps->nb_st_rps); in hls_slice_header()
692 sh->short_term_rps = &s->ps.sps->st_rps[rps_idx]; in hls_slice_header()
705 if (s->ps.sps->sps_temporal_mvp_enabled_flag) in hls_slice_header()
725 if (s->ps.sps->sao_enabled) { in hls_slice_header()
727 if (s->ps.sps->chroma_format_idc) { in hls_slice_header()
941 sh->slice_qp < -s->ps.sps->qp_bd_offset) { in hls_slice_header()
946 -s->ps.sps->qp_bd_offset); in hls_slice_header()
975 #define CTB(tab, x, y) ((tab)[(y) * s->ps.sps->ctb_width + (x)])
1009 for (c_idx = 0; c_idx < (s->ps.sps->chroma_format_idc ? 3 : 1); c_idx++) { in hls_sao_param()
1085 const int log2_trafo_size_c = log2_trafo_size - s->ps.sps->hshift[1]; in hls_transform_unit()
1096 (s->ps.sps->chroma_format_idc == 2 && (cbf_cb[1] || cbf_cr[1]))) { in hls_transform_unit()
1100 (s->ps.sps->chroma_format_idc == 2 && in hls_transform_unit()
1110 if (lc->tu.cu_qp_delta < -(26 + s->ps.sps->qp_bd_offset / 2) || in hls_transform_unit()
1111 lc->tu.cu_qp_delta > (25 + s->ps.sps->qp_bd_offset / 2)) { in hls_transform_unit()
1116 -(26 + s->ps.sps->qp_bd_offset / 2), in hls_transform_unit()
1117 (25 + s->ps.sps->qp_bd_offset / 2)); in hls_transform_unit()
1165 … if (s->ps.sps->chroma_format_idc && (log2_trafo_size > 2 || s->ps.sps->chroma_format_idc == 3)) { in hls_transform_unit()
1166 int trafo_size_h = 1 << (log2_trafo_size_c + s->ps.sps->hshift[1]); in hls_transform_unit()
1167 int trafo_size_v = 1 << (log2_trafo_size_c + s->ps.sps->vshift[1]); in hls_transform_unit()
1175 for (i = 0; i < (s->ps.sps->chroma_format_idc == 2 ? 2 : 1); i++) { in hls_transform_unit()
1186 int hshift = s->ps.sps->hshift[1]; in hls_transform_unit()
1187 int vshift = s->ps.sps->vshift[1]; in hls_transform_unit()
1193 … ((x0 >> hshift) << s->ps.sps->pixel_shift)]; in hls_transform_unit()
1204 for (i = 0; i < (s->ps.sps->chroma_format_idc == 2 ? 2 : 1); i++) { in hls_transform_unit()
1215 int hshift = s->ps.sps->hshift[2]; in hls_transform_unit()
1216 int vshift = s->ps.sps->vshift[2]; in hls_transform_unit()
1222 … ((x0 >> hshift) << s->ps.sps->pixel_shift)]; in hls_transform_unit()
1229 } else if (s->ps.sps->chroma_format_idc && blk_idx == 3) { in hls_transform_unit()
1231 int trafo_size_v = 1 << (log2_trafo_size + s->ps.sps->vshift[1]); in hls_transform_unit()
1232 for (i = 0; i < (s->ps.sps->chroma_format_idc == 2 ? 2 : 1); i++) { in hls_transform_unit()
1242 for (i = 0; i < (s->ps.sps->chroma_format_idc == 2 ? 2 : 1); i++) { in hls_transform_unit()
1253 } else if (s->ps.sps->chroma_format_idc && lc->cu.pred_mode == MODE_INTRA) { in hls_transform_unit()
1254 if (log2_trafo_size > 2 || s->ps.sps->chroma_format_idc == 3) { in hls_transform_unit()
1255 int trafo_size_h = 1 << (log2_trafo_size_c + s->ps.sps->hshift[1]); in hls_transform_unit()
1256 int trafo_size_v = 1 << (log2_trafo_size_c + s->ps.sps->vshift[1]); in hls_transform_unit()
1260 if (s->ps.sps->chroma_format_idc == 2) { in hls_transform_unit()
1268 int trafo_size_v = 1 << (log2_trafo_size + s->ps.sps->vshift[1]); in hls_transform_unit()
1273 if (s->ps.sps->chroma_format_idc == 2) { in hls_transform_unit()
1288 int log2_min_pu_size = s->ps.sps->log2_min_pu_size; in set_deblocking_bypass()
1290 int min_pu_width = s->ps.sps->min_pu_width; in set_deblocking_bypass()
1291 int x_end = FFMIN(x0 + cb_size, s->ps.sps->width); in set_deblocking_bypass()
1292 int y_end = FFMIN(y0 + cb_size, s->ps.sps->height); in set_deblocking_bypass()
1320 if (s->ps.sps->chroma_format_idc == 3) { in hls_transform_tree()
1334 if (log2_trafo_size <= s->ps.sps->log2_max_trafo_size && in hls_transform_tree()
1335 log2_trafo_size > s->ps.sps->log2_min_tb_size && in hls_transform_tree()
1340 int inter_split = s->ps.sps->max_transform_hierarchy_depth_inter == 0 && in hls_transform_tree()
1345 split_transform_flag = log2_trafo_size > s->ps.sps->log2_max_trafo_size || in hls_transform_tree()
1350 … if (s->ps.sps->chroma_format_idc && (log2_trafo_size > 2 || s->ps.sps->chroma_format_idc == 3)) { in hls_transform_tree()
1353 … if (s->ps.sps->chroma_format_idc == 2 && (!split_transform_flag || log2_trafo_size == 3)) { in hls_transform_tree()
1360 … if (s->ps.sps->chroma_format_idc == 2 && (!split_transform_flag || log2_trafo_size == 3)) { in hls_transform_tree()
1387 int min_tu_size = 1 << s->ps.sps->log2_min_tb_size; in hls_transform_tree()
1388 int log2_min_tu_size = s->ps.sps->log2_min_tb_size; in hls_transform_tree()
1389 int min_tu_width = s->ps.sps->min_tb_width; in hls_transform_tree()
1394 (s->ps.sps->chroma_format_idc == 2 && (cbf_cb[1] || cbf_cr[1]))) { in hls_transform_tree()
1431 uint8_t *dst0 = &s->frame->data[0][y0 * stride0 + (x0 << s->ps.sps->pixel_shift)]; in hls_pcm_sample()
1432 … *dst1 = &s->frame->data[1][(y0 >> s->ps.sps->vshift[1]) * stride1 + ((x0 >> s->ps.sps->hshift[1])… in hls_pcm_sample()
1433 … *dst2 = &s->frame->data[2][(y0 >> s->ps.sps->vshift[2]) * stride2 + ((x0 >> s->ps.sps->hshift[2])… in hls_pcm_sample()
1435 int length = cb_size * cb_size * s->ps.sps->pcm.bit_depth + in hls_pcm_sample()
1436 (((cb_size >> s->ps.sps->hshift[1]) * (cb_size >> s->ps.sps->vshift[1])) + in hls_pcm_sample()
1437 ((cb_size >> s->ps.sps->hshift[2]) * (cb_size >> s->ps.sps->vshift[2]))) * in hls_pcm_sample()
1438 s->ps.sps->pcm.bit_depth_chroma; in hls_pcm_sample()
1449 s->hevcdsp.put_pcm(dst0, stride0, cb_size, cb_size, &gb, s->ps.sps->pcm.bit_depth); in hls_pcm_sample()
1450 if (s->ps.sps->chroma_format_idc) { in hls_pcm_sample()
1452 cb_size >> s->ps.sps->hshift[1], in hls_pcm_sample()
1453 cb_size >> s->ps.sps->vshift[1], in hls_pcm_sample()
1454 &gb, s->ps.sps->pcm.bit_depth_chroma); in hls_pcm_sample()
1456 cb_size >> s->ps.sps->hshift[2], in hls_pcm_sample()
1457 cb_size >> s->ps.sps->vshift[2], in hls_pcm_sample()
1458 &gb, s->ps.sps->pcm.bit_depth_chroma); in hls_pcm_sample()
1487 int pic_width = s->ps.sps->width; in luma_mc_uni()
1488 int pic_height = s->ps.sps->height; in luma_mc_uni()
1497 src += y_off * srcstride + (x_off * (1 << s->ps.sps->pixel_shift)); in luma_mc_uni()
1502 const ptrdiff_t edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << s->ps.sps->pixel_shift; in luma_mc_uni()
1503 …int offset = QPEL_EXTRA_BEFORE * srcstride + (QPEL_EXTRA_BEFORE << s->ps.sps->pixel_shif… in luma_mc_uni()
1504 …int buf_offset = QPEL_EXTRA_BEFORE * edge_emu_stride + (QPEL_EXTRA_BEFORE << s->ps.sps->pixel_shif… in luma_mc_uni()
1548 int pic_width = s->ps.sps->width; in luma_mc_bi()
1549 int pic_height = s->ps.sps->height; in luma_mc_bi()
1562 …uint8_t *src0 = ref0->data[0] + y_off0 * src0stride + (int)((unsigned)x_off0 << s->ps.sps->pixel_… in luma_mc_bi()
1563 …uint8_t *src1 = ref1->data[0] + y_off1 * src1stride + (int)((unsigned)x_off1 << s->ps.sps->pixel_… in luma_mc_bi()
1568 const ptrdiff_t edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << s->ps.sps->pixel_shift; in luma_mc_bi()
1569 …int offset = QPEL_EXTRA_BEFORE * src0stride + (QPEL_EXTRA_BEFORE << s->ps.sps->pixel_shi… in luma_mc_bi()
1570 …int buf_offset = QPEL_EXTRA_BEFORE * edge_emu_stride + (QPEL_EXTRA_BEFORE << s->ps.sps->pixel_shif… in luma_mc_bi()
1585 const ptrdiff_t edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << s->ps.sps->pixel_shift; in luma_mc_bi()
1586 …int offset = QPEL_EXTRA_BEFORE * src1stride + (QPEL_EXTRA_BEFORE << s->ps.sps->pixel_shi… in luma_mc_bi()
1587 …int buf_offset = QPEL_EXTRA_BEFORE * edge_emu_stride + (QPEL_EXTRA_BEFORE << s->ps.sps->pixel_shif… in luma_mc_bi()
1637 int pic_width = s->ps.sps->width >> s->ps.sps->hshift[1]; in chroma_mc_uni()
1638 int pic_height = s->ps.sps->height >> s->ps.sps->vshift[1]; in chroma_mc_uni()
1643 int hshift = s->ps.sps->hshift[1]; in chroma_mc_uni()
1644 int vshift = s->ps.sps->vshift[1]; in chroma_mc_uni()
1652 src0 += y_off * srcstride + (x_off * (1 << s->ps.sps->pixel_shift)); in chroma_mc_uni()
1657 const int edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << s->ps.sps->pixel_shift; in chroma_mc_uni()
1658 int offset0 = EPEL_EXTRA_BEFORE * (srcstride + (1 << s->ps.sps->pixel_shift)); in chroma_mc_uni()
1660 (edge_emu_stride + (1 << s->ps.sps->pixel_shift)); in chroma_mc_uni()
1707 int pic_width = s->ps.sps->width >> s->ps.sps->hshift[1]; in chroma_mc_bi()
1708 int pic_height = s->ps.sps->height >> s->ps.sps->vshift[1]; in chroma_mc_bi()
1711 int hshift = s->ps.sps->hshift[1]; in chroma_mc_bi()
1712 int vshift = s->ps.sps->vshift[1]; in chroma_mc_bi()
1728 src1 += y_off0 * src1stride + (int)((unsigned)x_off0 << s->ps.sps->pixel_shift); in chroma_mc_bi()
1729 src2 += y_off1 * src2stride + (int)((unsigned)x_off1 << s->ps.sps->pixel_shift); in chroma_mc_bi()
1734 const int edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << s->ps.sps->pixel_shift; in chroma_mc_bi()
1735 int offset1 = EPEL_EXTRA_BEFORE * (src1stride + (1 << s->ps.sps->pixel_shift)); in chroma_mc_bi()
1737 (edge_emu_stride + (1 << s->ps.sps->pixel_shift)); in chroma_mc_bi()
1753 const int edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << s->ps.sps->pixel_shift; in chroma_mc_bi()
1754 int offset1 = EPEL_EXTRA_BEFORE * (src2stride + (1 << s->ps.sps->pixel_shift)); in chroma_mc_bi()
1756 (edge_emu_stride + (1 << s->ps.sps->pixel_shift)); in chroma_mc_bi()
1847 &s->frame->data[c_idx][((y) >> s->ps.sps->vshift[c_idx]) * s->frame->linesize[c_idx] + \ in hls_prediction_unit()
1848 (((x) >> s->ps.sps->hshift[c_idx]) << s->ps.sps->pixel_shift)] in hls_prediction_unit()
1853 int min_pu_width = s->ps.sps->min_pu_width; in hls_prediction_unit()
1861 int log2_min_cb_size = s->ps.sps->log2_min_cb_size; in hls_prediction_unit()
1862 int min_cb_width = s->ps.sps->min_cb_width; in hls_prediction_unit()
1886 x_pu = x0 >> s->ps.sps->log2_min_pu_size; in hls_prediction_unit()
1887 y_pu = y0 >> s->ps.sps->log2_min_pu_size; in hls_prediction_unit()
1889 for (j = 0; j < nPbH >> s->ps.sps->log2_min_pu_size; j++) in hls_prediction_unit()
1890 for (i = 0; i < nPbW >> s->ps.sps->log2_min_pu_size; i++) in hls_prediction_unit()
1907 int x0_c = x0 >> s->ps.sps->hshift[1]; in hls_prediction_unit()
1908 int y0_c = y0 >> s->ps.sps->vshift[1]; in hls_prediction_unit()
1909 int nPbW_c = nPbW >> s->ps.sps->hshift[1]; in hls_prediction_unit()
1910 int nPbH_c = nPbH >> s->ps.sps->vshift[1]; in hls_prediction_unit()
1917 if (s->ps.sps->chroma_format_idc) { in hls_prediction_unit()
1926 int x0_c = x0 >> s->ps.sps->hshift[1]; in hls_prediction_unit()
1927 int y0_c = y0 >> s->ps.sps->vshift[1]; in hls_prediction_unit()
1928 int nPbW_c = nPbW >> s->ps.sps->hshift[1]; in hls_prediction_unit()
1929 int nPbH_c = nPbH >> s->ps.sps->vshift[1]; in hls_prediction_unit()
1936 if (s->ps.sps->chroma_format_idc) { in hls_prediction_unit()
1946 int x0_c = x0 >> s->ps.sps->hshift[1]; in hls_prediction_unit()
1947 int y0_c = y0 >> s->ps.sps->vshift[1]; in hls_prediction_unit()
1948 int nPbW_c = nPbW >> s->ps.sps->hshift[1]; in hls_prediction_unit()
1949 int nPbH_c = nPbH >> s->ps.sps->vshift[1]; in hls_prediction_unit()
1955 if (s->ps.sps->chroma_format_idc) { in hls_prediction_unit()
1972 int x_pu = x0 >> s->ps.sps->log2_min_pu_size; in luma_intra_pred_mode()
1973 int y_pu = y0 >> s->ps.sps->log2_min_pu_size; in luma_intra_pred_mode()
1974 int min_pu_width = s->ps.sps->min_pu_width; in luma_intra_pred_mode()
1975 int size_in_pus = pu_size >> s->ps.sps->log2_min_pu_size; in luma_intra_pred_mode()
1976 int x0b = av_mod_uintp2(x0, s->ps.sps->log2_ctb_size); in luma_intra_pred_mode()
1977 int y0b = av_mod_uintp2(y0, s->ps.sps->log2_ctb_size); in luma_intra_pred_mode()
1984 int y_ctb = (y0 >> (s->ps.sps->log2_ctb_size)) << (s->ps.sps->log2_ctb_size); in luma_intra_pred_mode()
2051 int length = (1 << log2_cb_size) >> s->ps.sps->log2_min_cb_size; in set_ct_depth()
2052 int x_cb = x0 >> s->ps.sps->log2_min_cb_size; in set_ct_depth()
2053 int y_cb = y0 >> s->ps.sps->log2_min_cb_size; in set_ct_depth()
2057 memset(&s->tab_ct_depth[(y_cb + y) * s->ps.sps->min_cb_width + x_cb], in set_ct_depth()
2094 if (s->ps.sps->chroma_format_idc == 3) { in intra_prediction_unit()
2108 } else if (s->ps.sps->chroma_format_idc == 2) { in intra_prediction_unit()
2120 } else if (s->ps.sps->chroma_format_idc != 0) { in intra_prediction_unit()
2139 int size_in_pus = pb_size >> s->ps.sps->log2_min_pu_size; in intra_prediction_unit_default_value()
2140 int min_pu_width = s->ps.sps->min_pu_width; in intra_prediction_unit_default_value()
2142 int x_pu = x0 >> s->ps.sps->log2_min_pu_size; in intra_prediction_unit_default_value()
2143 int y_pu = y0 >> s->ps.sps->log2_min_pu_size; in intra_prediction_unit_default_value()
2160 int log2_min_cb_size = s->ps.sps->log2_min_cb_size; in hls_coding_unit()
2162 int min_cb_width = s->ps.sps->min_cb_width; in hls_coding_unit()
2166 int qp_block_mask = (1<<(s->ps.sps->log2_ctb_size - s->ps.pps->diff_cu_qp_delta_depth)) - 1; in hls_coding_unit()
2214 log2_cb_size == s->ps.sps->log2_min_cb_size) { in hls_coding_unit()
2221 if (lc->cu.part_mode == PART_2Nx2N && s->ps.sps->pcm_enabled_flag && in hls_coding_unit()
2222 log2_cb_size >= s->ps.sps->pcm.log2_min_pcm_cb_size && in hls_coding_unit()
2223 log2_cb_size <= s->ps.sps->pcm.log2_max_pcm_cb_size) { in hls_coding_unit()
2229 if (s->ps.sps->pcm.loop_filter_disable_flag) in hls_coding_unit()
2286 … s->ps.sps->max_transform_hierarchy_depth_intra + lc->cu.intra_split_flag : in hls_coding_unit()
2287 s->ps.sps->max_transform_hierarchy_depth_inter; in hls_coding_unit()
2328 if (x0 + cb_size <= s->ps.sps->width && in hls_coding_quadtree()
2329 y0 + cb_size <= s->ps.sps->height && in hls_coding_quadtree()
2330 log2_cb_size > s->ps.sps->log2_min_cb_size) { in hls_coding_quadtree()
2333 split_cu = (log2_cb_size > s->ps.sps->log2_min_cb_size); in hls_coding_quadtree()
2336 log2_cb_size >= s->ps.sps->log2_ctb_size - s->ps.pps->diff_cu_qp_delta_depth) { in hls_coding_quadtree()
2342 log2_cb_size >= s->ps.sps->log2_ctb_size - s->ps.pps->diff_cu_chroma_qp_offset_depth) { in hls_coding_quadtree()
2347 int qp_block_mask = (1<<(s->ps.sps->log2_ctb_size - s->ps.pps->diff_cu_qp_delta_depth)) - 1; in hls_coding_quadtree()
2358 if (more_data && x1 < s->ps.sps->width) { in hls_coding_quadtree()
2363 if (more_data && y1 < s->ps.sps->height) { in hls_coding_quadtree()
2368 if (more_data && x1 < s->ps.sps->width && in hls_coding_quadtree()
2369 y1 < s->ps.sps->height) { in hls_coding_quadtree()
2380 return ((x1 + cb_size_split) < s->ps.sps->width || in hls_coding_quadtree()
2381 (y1 + cb_size_split) < s->ps.sps->height); in hls_coding_quadtree()
2389 (1 << (s->ps.sps->log2_ctb_size))) || in hls_coding_quadtree()
2390 (x0 + cb_size >= s->ps.sps->width)) && in hls_coding_quadtree()
2392 (1 << (s->ps.sps->log2_ctb_size))) || in hls_coding_quadtree()
2393 (y0 + cb_size >= s->ps.sps->height))) { in hls_coding_quadtree()
2408 int ctb_size = 1 << s->ps.sps->log2_ctb_size; in hls_decode_neighbour()
2417 lc->end_of_tiles_x = s->ps.sps->width; in hls_decode_neighbour()
2420 int idxX = s->ps.pps->col_idxX[x_ctb >> s->ps.sps->log2_ctb_size]; in hls_decode_neighbour()
2421 … lc->end_of_tiles_x = x_ctb + (s->ps.pps->column_width[idxX] << s->ps.sps->log2_ctb_size); in hls_decode_neighbour()
2425 lc->end_of_tiles_x = s->ps.sps->width; in hls_decode_neighbour()
2428 lc->end_of_tiles_y = FFMIN(y_ctb + ctb_size, s->ps.sps->height); in hls_decode_neighbour()
2436 …b_addr_ts] != s->ps.pps->tile_id[s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs - s->ps.sps->ctb_width]]) in hls_decode_neighbour()
2438 …0 && s->tab_slice_address[ctb_addr_rs] != s->tab_slice_address[ctb_addr_rs - s->ps.sps->ctb_width]) in hls_decode_neighbour()
2443 if (ctb_addr_in_slice < s->ps.sps->ctb_width) in hls_decode_neighbour()
2448 …lc->ctb_up_flag = ((y_ctb > 0) && (ctb_addr_in_slice >= s->ps.sps->ctb_width) && !(lc->boundary_… in hls_decode_neighbour()
2449 …+1 >= s->ps.sps->ctb_width) && (s->ps.pps->tile_id[ctb_addr_ts] == s->ps.pps->tile_id[s->ps.pps->c… in hls_decode_neighbour()
2450 …-1 >= s->ps.sps->ctb_width) && (s->ps.pps->tile_id[ctb_addr_ts] == s->ps.pps->tile_id[s->ps.pps->c… in hls_decode_neighbour()
2456 int ctb_size = 1 << s->ps.sps->log2_ctb_size; in hls_decode_entry()
2476 while (more_data && ctb_addr_ts < s->ps.sps->ctb_size) { in hls_decode_entry()
2479 …x_ctb = (ctb_addr_rs % ((s->ps.sps->width + ctb_size - 1) >> s->ps.sps->log2_ctb_size)) << s->ps.s… in hls_decode_entry()
2480 …y_ctb = (ctb_addr_rs / ((s->ps.sps->width + ctb_size - 1) >> s->ps.sps->log2_ctb_size)) << s->ps.s… in hls_decode_entry()
2489 hls_sao_param(s, x_ctb >> s->ps.sps->log2_ctb_size, y_ctb >> s->ps.sps->log2_ctb_size); in hls_decode_entry()
2495 more_data = hls_coding_quadtree(s, x_ctb, y_ctb, s->ps.sps->log2_ctb_size, 0); in hls_decode_entry()
2507 if (x_ctb + ctb_size >= s->ps.sps->width && in hls_decode_entry()
2508 y_ctb + ctb_size >= s->ps.sps->height) in hls_decode_entry()
2529 int ctb_size = 1<< s1->ps.sps->log2_ctb_size; in hls_decode_entry_wpp()
2533 …addr_rs = s1->sh.slice_ctb_addr_rs + ctb_row * ((s1->ps.sps->width + ctb_size - 1) >> s1->ps.sps->… in hls_decode_entry_wpp()
2548 while(more_data && ctb_addr_ts < s->ps.sps->ctb_size) { in hls_decode_entry_wpp()
2549 int x_ctb = (ctb_addr_rs % s->ps.sps->ctb_width) << s->ps.sps->log2_ctb_size; in hls_decode_entry_wpp()
2550 int y_ctb = (ctb_addr_rs / s->ps.sps->ctb_width) << s->ps.sps->log2_ctb_size; in hls_decode_entry_wpp()
2564 hls_sao_param(s, x_ctb >> s->ps.sps->log2_ctb_size, y_ctb >> s->ps.sps->log2_ctb_size); in hls_decode_entry_wpp()
2565 more_data = hls_coding_quadtree(s, x_ctb, y_ctb, s->ps.sps->log2_ctb_size, 0); in hls_decode_entry_wpp()
2578 …if (!more_data && (x_ctb+ctb_size) < s->ps.sps->width && ctb_row != s->sh.num_entry_point_offsets)… in hls_decode_entry_wpp()
2584 if ((x_ctb+ctb_size) >= s->ps.sps->width && (y_ctb+ctb_size) >= s->ps.sps->height ) { in hls_decode_entry_wpp()
2592 if(x_ctb >= s->ps.sps->width) { in hls_decode_entry_wpp()
2623 …tb_addr_rs + s->sh.num_entry_point_offsets * s->ps.sps->ctb_width >= s->ps.sps->ctb_width * s->ps.… in hls_slice_data_wpp()
2626 s->ps.sps->ctb_width, s->ps.sps->ctb_height in hls_slice_data_wpp()
2900 int pic_size_in_ctb = ((s->ps.sps->width >> s->ps.sps->log2_min_cb_size) + 1) * in hevc_frame_start()
2901 ((s->ps.sps->height >> s->ps.sps->log2_min_cb_size) + 1); in hevc_frame_start()
2906 memset(s->cbf_luma, 0, s->ps.sps->min_tb_width * s->ps.sps->min_tb_height); in hevc_frame_start()
2907 memset(s->is_pcm, 0, (s->ps.sps->min_pu_width + 1) * (s->ps.sps->min_pu_height + 1)); in hevc_frame_start()
2916 lc->end_of_tiles_x = s->ps.pps->column_width[0] << s->ps.sps->log2_ctb_size; in hevc_frame_start()
3113 if (ctb_addr_ts >= (s->ps.sps->ctb_width * s->ps.sps->ctb_height)) { in decode_nal_unit()
3288 const HEVCSPS *sps = (const HEVCSPS*)s->ps.sps_list[i]->data; in hevc_decode_extradata() local
3289 export_stream_params(s, sps); in hevc_decode_extradata()
3523 if (s->ps.sps != s0->ps.sps) in hevc_update_thread_context()
3524 s->ps.sps = NULL; in hevc_update_thread_context()
3543 if (s->ps.sps != s0->ps.sps) in hevc_update_thread_context()
3544 if ((ret = set_sps(s, s0->ps.sps, src->pix_fmt)) < 0) in hevc_update_thread_context()