Lines Matching refs:sps
92 if (s->sps == (const HEVCSPS*)s->sps_list[id]->data) in remove_sps()
93 s->sps = NULL; in remove_sps()
100 av_assert0(!(s->sps_list[id] && s->sps == (HEVCSPS*)s->sps_list[id]->data)); in remove_sps()
120 ShortTermRPS *rps, const HEVCSPS *sps, int is_slice_header) in ff_hevc_decode_short_term_rps() argument
129 if (rps != sps->st_rps && sps->nb_st_rps) in ff_hevc_decode_short_term_rps()
141 if (delta_idx > sps->nb_st_rps) { in ff_hevc_decode_short_term_rps()
144 delta_idx, sps->nb_st_rps); in ff_hevc_decode_short_term_rps()
147 rps_ridx = &sps->st_rps[sps->nb_st_rps - delta_idx]; in ff_hevc_decode_short_term_rps()
150 rps_ridx = &sps->st_rps[rps - sps->st_rps - 1]; in ff_hevc_decode_short_term_rps()
589 int apply_defdispwin, HEVCSPS *sps) in decode_vui() argument
591 VUI backup_vui, *vui = &sps->vui; in decode_vui()
619 if (vui->video_full_range_flag && sps->pix_fmt == AV_PIX_FMT_YUV420P) in decode_vui()
620 sps->pix_fmt = AV_PIX_FMT_YUVJ420P; in decode_vui()
634 switch (sps->pix_fmt) { in decode_vui()
636 sps->pix_fmt = AV_PIX_FMT_GBRP; in decode_vui()
639 sps->pix_fmt = AV_PIX_FMT_GBRP10; in decode_vui()
642 sps->pix_fmt = AV_PIX_FMT_GBRP12; in decode_vui()
669 int vert_mult = hevc_sub_height_c[sps->chroma_format_idc]; in decode_vui()
670 int horiz_mult = hevc_sub_width_c[sps->chroma_format_idc]; in decode_vui()
718 decode_hrd(gb, 1, sps->max_sub_layers); in decode_vui()
783 …atic int scaling_list_data(GetBitContext *gb, AVCodecContext *avctx, ScalingList *sl, HEVCSPS *sps) in scaling_list_data() argument
842 if (sps->chroma_format_idc == 3) { in scaling_list_data()
859 static int map_pixel_format(AVCodecContext *avctx, HEVCSPS *sps) in map_pixel_format() argument
862 switch (sps->bit_depth) { in map_pixel_format()
864 if (sps->chroma_format_idc == 0) sps->pix_fmt = AV_PIX_FMT_GRAY8; in map_pixel_format()
865 if (sps->chroma_format_idc == 1) sps->pix_fmt = AV_PIX_FMT_YUV420P; in map_pixel_format()
866 if (sps->chroma_format_idc == 2) sps->pix_fmt = AV_PIX_FMT_YUV422P; in map_pixel_format()
867 if (sps->chroma_format_idc == 3) sps->pix_fmt = AV_PIX_FMT_YUV444P; in map_pixel_format()
870 if (sps->chroma_format_idc == 0) sps->pix_fmt = AV_PIX_FMT_GRAY9; in map_pixel_format()
871 if (sps->chroma_format_idc == 1) sps->pix_fmt = AV_PIX_FMT_YUV420P9; in map_pixel_format()
872 if (sps->chroma_format_idc == 2) sps->pix_fmt = AV_PIX_FMT_YUV422P9; in map_pixel_format()
873 if (sps->chroma_format_idc == 3) sps->pix_fmt = AV_PIX_FMT_YUV444P9; in map_pixel_format()
876 if (sps->chroma_format_idc == 0) sps->pix_fmt = AV_PIX_FMT_GRAY10; in map_pixel_format()
877 if (sps->chroma_format_idc == 1) sps->pix_fmt = AV_PIX_FMT_YUV420P10; in map_pixel_format()
878 if (sps->chroma_format_idc == 2) sps->pix_fmt = AV_PIX_FMT_YUV422P10; in map_pixel_format()
879 if (sps->chroma_format_idc == 3) sps->pix_fmt = AV_PIX_FMT_YUV444P10; in map_pixel_format()
882 if (sps->chroma_format_idc == 0) sps->pix_fmt = AV_PIX_FMT_GRAY12; in map_pixel_format()
883 if (sps->chroma_format_idc == 1) sps->pix_fmt = AV_PIX_FMT_YUV420P12; in map_pixel_format()
884 if (sps->chroma_format_idc == 2) sps->pix_fmt = AV_PIX_FMT_YUV422P12; in map_pixel_format()
885 if (sps->chroma_format_idc == 3) sps->pix_fmt = AV_PIX_FMT_YUV444P12; in map_pixel_format()
891 sps->chroma_format_idc, sps->bit_depth); in map_pixel_format()
895 desc = av_pix_fmt_desc_get(sps->pix_fmt); in map_pixel_format()
899 sps->hshift[0] = sps->vshift[0] = 0; in map_pixel_format()
900 sps->hshift[2] = sps->hshift[1] = desc->log2_chroma_w; in map_pixel_format()
901 sps->vshift[2] = sps->vshift[1] = desc->log2_chroma_h; in map_pixel_format()
903 sps->pixel_shift = sps->bit_depth > 8; in map_pixel_format()
908 int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, in ff_hevc_parse_sps() argument
919 sps->vps_id = get_bits(gb, 4); in ff_hevc_parse_sps()
921 if (vps_list && !vps_list[sps->vps_id]) { in ff_hevc_parse_sps()
923 sps->vps_id); in ff_hevc_parse_sps()
927 sps->max_sub_layers = get_bits(gb, 3) + 1; in ff_hevc_parse_sps()
928 if (sps->max_sub_layers > HEVC_MAX_SUB_LAYERS) { in ff_hevc_parse_sps()
930 sps->max_sub_layers); in ff_hevc_parse_sps()
934 sps->temporal_id_nesting_flag = get_bits(gb, 1); in ff_hevc_parse_sps()
936 if ((ret = parse_ptl(gb, avctx, &sps->ptl, sps->max_sub_layers)) < 0) in ff_hevc_parse_sps()
945 sps->chroma_format_idc = get_ue_golomb_long(gb); in ff_hevc_parse_sps()
946 if (sps->chroma_format_idc > 3U) { in ff_hevc_parse_sps()
947 av_log(avctx, AV_LOG_ERROR, "chroma_format_idc %d is invalid\n", sps->chroma_format_idc); in ff_hevc_parse_sps()
951 if (sps->chroma_format_idc == 3) in ff_hevc_parse_sps()
952 sps->separate_colour_plane_flag = get_bits1(gb); in ff_hevc_parse_sps()
954 if (sps->separate_colour_plane_flag) in ff_hevc_parse_sps()
955 sps->chroma_format_idc = 0; in ff_hevc_parse_sps()
957 sps->width = get_ue_golomb_long(gb); in ff_hevc_parse_sps()
958 sps->height = get_ue_golomb_long(gb); in ff_hevc_parse_sps()
959 if ((ret = av_image_check_size(sps->width, in ff_hevc_parse_sps()
960 sps->height, 0, avctx)) < 0) in ff_hevc_parse_sps()
964 int vert_mult = hevc_sub_height_c[sps->chroma_format_idc]; in ff_hevc_parse_sps()
965 int horiz_mult = hevc_sub_width_c[sps->chroma_format_idc]; in ff_hevc_parse_sps()
966 sps->pic_conf_win.left_offset = get_ue_golomb_long(gb) * horiz_mult; in ff_hevc_parse_sps()
967 sps->pic_conf_win.right_offset = get_ue_golomb_long(gb) * horiz_mult; in ff_hevc_parse_sps()
968 sps->pic_conf_win.top_offset = get_ue_golomb_long(gb) * vert_mult; in ff_hevc_parse_sps()
969 sps->pic_conf_win.bottom_offset = get_ue_golomb_long(gb) * vert_mult; in ff_hevc_parse_sps()
975 sps->pic_conf_win.left_offset, in ff_hevc_parse_sps()
976 sps->pic_conf_win.right_offset, in ff_hevc_parse_sps()
977 sps->pic_conf_win.top_offset, in ff_hevc_parse_sps()
978 sps->pic_conf_win.bottom_offset); in ff_hevc_parse_sps()
980 sps->pic_conf_win.left_offset = in ff_hevc_parse_sps()
981 sps->pic_conf_win.right_offset = in ff_hevc_parse_sps()
982 sps->pic_conf_win.top_offset = in ff_hevc_parse_sps()
983 sps->pic_conf_win.bottom_offset = 0; in ff_hevc_parse_sps()
985 sps->output_window = sps->pic_conf_win; in ff_hevc_parse_sps()
988 sps->bit_depth = get_ue_golomb_long(gb) + 8; in ff_hevc_parse_sps()
990 if (sps->chroma_format_idc && bit_depth_chroma != sps->bit_depth) { in ff_hevc_parse_sps()
994 sps->bit_depth, bit_depth_chroma); in ff_hevc_parse_sps()
997 sps->bit_depth_chroma = bit_depth_chroma; in ff_hevc_parse_sps()
999 ret = map_pixel_format(avctx, sps); in ff_hevc_parse_sps()
1003 sps->log2_max_poc_lsb = get_ue_golomb_long(gb) + 4; in ff_hevc_parse_sps()
1004 if (sps->log2_max_poc_lsb > 16) { in ff_hevc_parse_sps()
1006 sps->log2_max_poc_lsb - 4); in ff_hevc_parse_sps()
1011 start = sublayer_ordering_info ? 0 : sps->max_sub_layers - 1; in ff_hevc_parse_sps()
1012 for (i = start; i < sps->max_sub_layers; i++) { in ff_hevc_parse_sps()
1013 sps->temporal_layer[i].max_dec_pic_buffering = get_ue_golomb_long(gb) + 1; in ff_hevc_parse_sps()
1014 sps->temporal_layer[i].num_reorder_pics = get_ue_golomb_long(gb); in ff_hevc_parse_sps()
1015 sps->temporal_layer[i].max_latency_increase = get_ue_golomb_long(gb) - 1; in ff_hevc_parse_sps()
1016 if (sps->temporal_layer[i].max_dec_pic_buffering > (unsigned)HEVC_MAX_DPB_SIZE) { in ff_hevc_parse_sps()
1018 sps->temporal_layer[i].max_dec_pic_buffering - 1U); in ff_hevc_parse_sps()
1021 … if (sps->temporal_layer[i].num_reorder_pics > sps->temporal_layer[i].max_dec_pic_buffering - 1) { in ff_hevc_parse_sps()
1023 sps->temporal_layer[i].num_reorder_pics); in ff_hevc_parse_sps()
1025 sps->temporal_layer[i].num_reorder_pics > HEVC_MAX_DPB_SIZE - 1) { in ff_hevc_parse_sps()
1028 … sps->temporal_layer[i].max_dec_pic_buffering = sps->temporal_layer[i].num_reorder_pics + 1; in ff_hevc_parse_sps()
1034 … sps->temporal_layer[i].max_dec_pic_buffering = sps->temporal_layer[start].max_dec_pic_buffering; in ff_hevc_parse_sps()
1035 … sps->temporal_layer[i].num_reorder_pics = sps->temporal_layer[start].num_reorder_pics; in ff_hevc_parse_sps()
1036 … sps->temporal_layer[i].max_latency_increase = sps->temporal_layer[start].max_latency_increase; in ff_hevc_parse_sps()
1040 sps->log2_min_cb_size = get_ue_golomb_long(gb) + 3; in ff_hevc_parse_sps()
1041 sps->log2_diff_max_min_coding_block_size = get_ue_golomb_long(gb); in ff_hevc_parse_sps()
1042 sps->log2_min_tb_size = get_ue_golomb_long(gb) + 2; in ff_hevc_parse_sps()
1044 sps->log2_max_trafo_size = log2_diff_max_min_transform_block_size + in ff_hevc_parse_sps()
1045 sps->log2_min_tb_size; in ff_hevc_parse_sps()
1047 if (sps->log2_min_cb_size < 3 || sps->log2_min_cb_size > 30) { in ff_hevc_parse_sps()
1048 av_log(avctx, AV_LOG_ERROR, "Invalid value %d for log2_min_cb_size", sps->log2_min_cb_size); in ff_hevc_parse_sps()
1052 if (sps->log2_diff_max_min_coding_block_size > 30) { in ff_hevc_parse_sps()
1053 …av_log(avctx, AV_LOG_ERROR, "Invalid value %d for log2_diff_max_min_coding_block_size", sps->log2_… in ff_hevc_parse_sps()
1057 if (sps->log2_min_tb_size >= sps->log2_min_cb_size || sps->log2_min_tb_size < 2) { in ff_hevc_parse_sps()
1067 sps->max_transform_hierarchy_depth_inter = get_ue_golomb_long(gb); in ff_hevc_parse_sps()
1068 sps->max_transform_hierarchy_depth_intra = get_ue_golomb_long(gb); in ff_hevc_parse_sps()
1070 sps->scaling_list_enable_flag = get_bits1(gb); in ff_hevc_parse_sps()
1071 if (sps->scaling_list_enable_flag) { in ff_hevc_parse_sps()
1072 set_default_scaling_list_data(&sps->scaling_list); in ff_hevc_parse_sps()
1075 ret = scaling_list_data(gb, avctx, &sps->scaling_list, sps); in ff_hevc_parse_sps()
1081 sps->amp_enabled_flag = get_bits1(gb); in ff_hevc_parse_sps()
1082 sps->sao_enabled = get_bits1(gb); in ff_hevc_parse_sps()
1084 sps->pcm_enabled_flag = get_bits1(gb); in ff_hevc_parse_sps()
1085 if (sps->pcm_enabled_flag) { in ff_hevc_parse_sps()
1086 sps->pcm.bit_depth = get_bits(gb, 4) + 1; in ff_hevc_parse_sps()
1087 sps->pcm.bit_depth_chroma = get_bits(gb, 4) + 1; in ff_hevc_parse_sps()
1088 sps->pcm.log2_min_pcm_cb_size = get_ue_golomb_long(gb) + 3; in ff_hevc_parse_sps()
1089 sps->pcm.log2_max_pcm_cb_size = sps->pcm.log2_min_pcm_cb_size + in ff_hevc_parse_sps()
1091 if (FFMAX(sps->pcm.bit_depth, sps->pcm.bit_depth_chroma) > sps->bit_depth) { in ff_hevc_parse_sps()
1094 sps->pcm.bit_depth, sps->pcm.bit_depth_chroma, sps->bit_depth); in ff_hevc_parse_sps()
1098 sps->pcm.loop_filter_disable_flag = get_bits1(gb); in ff_hevc_parse_sps()
1101 sps->nb_st_rps = get_ue_golomb_long(gb); in ff_hevc_parse_sps()
1102 if (sps->nb_st_rps > HEVC_MAX_SHORT_TERM_REF_PIC_SETS) { in ff_hevc_parse_sps()
1104 sps->nb_st_rps); in ff_hevc_parse_sps()
1107 for (i = 0; i < sps->nb_st_rps; i++) { in ff_hevc_parse_sps()
1108 if ((ret = ff_hevc_decode_short_term_rps(gb, avctx, &sps->st_rps[i], in ff_hevc_parse_sps()
1109 sps, 0)) < 0) in ff_hevc_parse_sps()
1113 sps->long_term_ref_pics_present_flag = get_bits1(gb); in ff_hevc_parse_sps()
1114 if (sps->long_term_ref_pics_present_flag) { in ff_hevc_parse_sps()
1115 sps->num_long_term_ref_pics_sps = get_ue_golomb_long(gb); in ff_hevc_parse_sps()
1116 if (sps->num_long_term_ref_pics_sps > HEVC_MAX_LONG_TERM_REF_PICS) { in ff_hevc_parse_sps()
1118 sps->num_long_term_ref_pics_sps); in ff_hevc_parse_sps()
1121 for (i = 0; i < sps->num_long_term_ref_pics_sps; i++) { in ff_hevc_parse_sps()
1122 sps->lt_ref_pic_poc_lsb_sps[i] = get_bits(gb, sps->log2_max_poc_lsb); in ff_hevc_parse_sps()
1123 sps->used_by_curr_pic_lt_sps_flag[i] = get_bits1(gb); in ff_hevc_parse_sps()
1127 sps->sps_temporal_mvp_enabled_flag = get_bits1(gb); in ff_hevc_parse_sps()
1128 sps->sps_strong_intra_smoothing_enable_flag = get_bits1(gb); in ff_hevc_parse_sps()
1129 sps->vui.sar = (AVRational){0, 1}; in ff_hevc_parse_sps()
1132 decode_vui(gb, avctx, apply_defdispwin, sps); in ff_hevc_parse_sps()
1135 sps->sps_range_extension_flag = get_bits1(gb); in ff_hevc_parse_sps()
1137 if (sps->sps_range_extension_flag) { in ff_hevc_parse_sps()
1138 sps->transform_skip_rotation_enabled_flag = get_bits1(gb); in ff_hevc_parse_sps()
1139 sps->transform_skip_context_enabled_flag = get_bits1(gb); in ff_hevc_parse_sps()
1140 sps->implicit_rdpcm_enabled_flag = get_bits1(gb); in ff_hevc_parse_sps()
1142 sps->explicit_rdpcm_enabled_flag = get_bits1(gb); in ff_hevc_parse_sps()
1144 sps->extended_precision_processing_flag = get_bits1(gb); in ff_hevc_parse_sps()
1145 if (sps->extended_precision_processing_flag) in ff_hevc_parse_sps()
1149 sps->intra_smoothing_disabled_flag = get_bits1(gb); in ff_hevc_parse_sps()
1150 sps->high_precision_offsets_enabled_flag = get_bits1(gb); in ff_hevc_parse_sps()
1151 if (sps->high_precision_offsets_enabled_flag) in ff_hevc_parse_sps()
1155 sps->persistent_rice_adaptation_enabled_flag = get_bits1(gb); in ff_hevc_parse_sps()
1157 sps->cabac_bypass_alignment_enabled_flag = get_bits1(gb); in ff_hevc_parse_sps()
1158 if (sps->cabac_bypass_alignment_enabled_flag) in ff_hevc_parse_sps()
1164 sps->output_window.left_offset += sps->vui.def_disp_win.left_offset; in ff_hevc_parse_sps()
1165 sps->output_window.right_offset += sps->vui.def_disp_win.right_offset; in ff_hevc_parse_sps()
1166 sps->output_window.top_offset += sps->vui.def_disp_win.top_offset; in ff_hevc_parse_sps()
1167 sps->output_window.bottom_offset += sps->vui.def_disp_win.bottom_offset; in ff_hevc_parse_sps()
1170 ow = &sps->output_window; in ff_hevc_parse_sps()
1173 ow->left_offset + ow->right_offset >= sps->width || in ff_hevc_parse_sps()
1174 ow->top_offset + ow->bottom_offset >= sps->height) { in ff_hevc_parse_sps()
1183 memset(&sps->pic_conf_win, 0, sizeof(sps->pic_conf_win)); in ff_hevc_parse_sps()
1187 sps->log2_ctb_size = sps->log2_min_cb_size + in ff_hevc_parse_sps()
1188 sps->log2_diff_max_min_coding_block_size; in ff_hevc_parse_sps()
1189 sps->log2_min_pu_size = sps->log2_min_cb_size - 1; in ff_hevc_parse_sps()
1191 if (sps->log2_ctb_size > HEVC_MAX_LOG2_CTB_SIZE) { in ff_hevc_parse_sps()
1192 av_log(avctx, AV_LOG_ERROR, "CTB size out of range: 2^%d\n", sps->log2_ctb_size); in ff_hevc_parse_sps()
1195 if (sps->log2_ctb_size < 4) { in ff_hevc_parse_sps()
1199 sps->log2_ctb_size); in ff_hevc_parse_sps()
1200 avpriv_request_sample(avctx, "log2_ctb_size %d", sps->log2_ctb_size); in ff_hevc_parse_sps()
1204 sps->ctb_width = (sps->width + (1 << sps->log2_ctb_size) - 1) >> sps->log2_ctb_size; in ff_hevc_parse_sps()
1205 sps->ctb_height = (sps->height + (1 << sps->log2_ctb_size) - 1) >> sps->log2_ctb_size; in ff_hevc_parse_sps()
1206 sps->ctb_size = sps->ctb_width * sps->ctb_height; in ff_hevc_parse_sps()
1208 sps->min_cb_width = sps->width >> sps->log2_min_cb_size; in ff_hevc_parse_sps()
1209 sps->min_cb_height = sps->height >> sps->log2_min_cb_size; in ff_hevc_parse_sps()
1210 sps->min_tb_width = sps->width >> sps->log2_min_tb_size; in ff_hevc_parse_sps()
1211 sps->min_tb_height = sps->height >> sps->log2_min_tb_size; in ff_hevc_parse_sps()
1212 sps->min_pu_width = sps->width >> sps->log2_min_pu_size; in ff_hevc_parse_sps()
1213 sps->min_pu_height = sps->height >> sps->log2_min_pu_size; in ff_hevc_parse_sps()
1214 sps->tb_mask = (1 << (sps->log2_ctb_size - sps->log2_min_tb_size)) - 1; in ff_hevc_parse_sps()
1216 sps->qp_bd_offset = 6 * (sps->bit_depth - 8); in ff_hevc_parse_sps()
1218 if (av_mod_uintp2(sps->width, sps->log2_min_cb_size) || in ff_hevc_parse_sps()
1219 av_mod_uintp2(sps->height, sps->log2_min_cb_size)) { in ff_hevc_parse_sps()
1224 if (sps->max_transform_hierarchy_depth_inter > sps->log2_ctb_size - sps->log2_min_tb_size) { in ff_hevc_parse_sps()
1226 sps->max_transform_hierarchy_depth_inter); in ff_hevc_parse_sps()
1229 if (sps->max_transform_hierarchy_depth_intra > sps->log2_ctb_size - sps->log2_min_tb_size) { in ff_hevc_parse_sps()
1231 sps->max_transform_hierarchy_depth_intra); in ff_hevc_parse_sps()
1234 if (sps->log2_max_trafo_size > FFMIN(sps->log2_ctb_size, 5)) { in ff_hevc_parse_sps()
1237 sps->log2_max_trafo_size); in ff_hevc_parse_sps()
1253 HEVCSPS *sps; in ff_hevc_decode_nal_sps() local
1254 AVBufferRef *sps_buf = av_buffer_allocz(sizeof(*sps)); in ff_hevc_decode_nal_sps()
1261 sps = (HEVCSPS*)sps_buf->data; in ff_hevc_decode_nal_sps()
1266 if (nal_size > sizeof(sps->data)) { in ff_hevc_decode_nal_sps()
1269 nal_size, sizeof(sps->data)); in ff_hevc_decode_nal_sps()
1270 sps->data_size = sizeof(sps->data); in ff_hevc_decode_nal_sps()
1272 sps->data_size = nal_size; in ff_hevc_decode_nal_sps()
1274 memcpy(sps->data, gb->buffer, sps->data_size); in ff_hevc_decode_nal_sps()
1276 ret = ff_hevc_parse_sps(sps, gb, &sps_id, in ff_hevc_decode_nal_sps()
1288 sps_id, sps->width, sps->height, in ff_hevc_decode_nal_sps()
1289 sps->width - (sps->output_window.left_offset + sps->output_window.right_offset), in ff_hevc_decode_nal_sps()
1290 sps->height - (sps->output_window.top_offset + sps->output_window.bottom_offset), in ff_hevc_decode_nal_sps()
1291 av_get_pix_fmt_name(sps->pix_fmt)); in ff_hevc_decode_nal_sps()
1327 HEVCPPS *pps, HEVCSPS *sps) { in pps_range_extensions() argument
1359 if ( pps->log2_sao_offset_scale_luma > FFMAX(sps->bit_depth - 10, 0) in pps_range_extensions()
1360 || pps->log2_sao_offset_scale_chroma > FFMAX(sps->bit_depth_chroma - 10, 0) in pps_range_extensions()
1368 HEVCPPS *pps, HEVCSPS *sps) in setup_pps() argument
1377 pps->col_idxX = av_malloc_array(sps->ctb_width, sizeof(*pps->col_idxX)); in setup_pps()
1390 pps->column_width[i] = ((i + 1) * sps->ctb_width) / pps->num_tile_columns - in setup_pps()
1391 (i * sps->ctb_width) / pps->num_tile_columns; in setup_pps()
1395 pps->row_height[i] = ((i + 1) * sps->ctb_height) / pps->num_tile_rows - in setup_pps()
1396 (i * sps->ctb_height) / pps->num_tile_rows; in setup_pps()
1408 for (i = 0, j = 0; i < sps->ctb_width; i++) { in setup_pps()
1417 pic_area_in_ctbs = sps->ctb_width * sps->ctb_height; in setup_pps()
1422 …pps->min_tb_addr_zs_tab = av_malloc_array((sps->tb_mask+2) * (sps->tb_mask+2), sizeof(*pps->min_tb… in setup_pps()
1429 int tb_x = ctb_addr_rs % sps->ctb_width; in setup_pps()
1430 int tb_y = ctb_addr_rs / sps->ctb_width; in setup_pps()
1452 val += sps->ctb_width * pps->row_height[i]; in setup_pps()
1465 pps->tile_id[pps->ctb_addr_rs_to_ts[y * sps->ctb_width + x]] = tile_id; in setup_pps()
1474 pps->row_bd[j] * sps->ctb_width + pps->col_bd[i]; in setup_pps()
1476 log2_diff = sps->log2_ctb_size - sps->log2_min_tb_size; in setup_pps()
1477 pps->min_tb_addr_zs = &pps->min_tb_addr_zs_tab[1*(sps->tb_mask+2)+1]; in setup_pps()
1478 for (y = 0; y < sps->tb_mask+2; y++) { in setup_pps()
1479 pps->min_tb_addr_zs_tab[y*(sps->tb_mask+2)] = -1; in setup_pps()
1482 for (y = 0; y < sps->tb_mask+1; y++) { in setup_pps()
1483 for (x = 0; x < sps->tb_mask+1; x++) { in setup_pps()
1486 int rs = sps->ctb_width * tb_y + tb_x; in setup_pps()
1492 pps->min_tb_addr_zs[y * (sps->tb_mask+2) + x] = val; in setup_pps()
1502 HEVCSPS *sps = NULL; in ff_hevc_decode_nal_pps() local
1562 sps = (HEVCSPS *)ps->sps_list[pps->sps_id]->data; in ff_hevc_decode_nal_pps()
1586 pps->diff_cu_qp_delta_depth > sps->log2_diff_max_min_coding_block_size) { in ff_hevc_decode_nal_pps()
1621 num_tile_columns_minus1 >= sps->ctb_width) { in ff_hevc_decode_nal_pps()
1628 num_tile_rows_minus1 >= sps->ctb_height) { in ff_hevc_decode_nal_pps()
1651 if (sum >= sps->ctb_width) { in ff_hevc_decode_nal_pps()
1656 pps->column_width[pps->num_tile_columns - 1] = sps->ctb_width - sum; in ff_hevc_decode_nal_pps()
1663 if (sum >= sps->ctb_height) { in ff_hevc_decode_nal_pps()
1668 pps->row_height[pps->num_tile_rows - 1] = sps->ctb_height - sum; in ff_hevc_decode_nal_pps()
1702 ret = scaling_list_data(gb, avctx, &pps->scaling_list, sps); in ff_hevc_decode_nal_pps()
1708 if (log2_parallel_merge_level_minus2 > sps->log2_ctb_size) { in ff_hevc_decode_nal_pps()
1721 … if (sps->ptl.general_ptl.profile_idc == FF_PROFILE_HEVC_REXT && pps->pps_range_extensions_flag) { in ff_hevc_decode_nal_pps()
1722 if ((ret = pps_range_extensions(gb, avctx, pps, sps)) < 0) in ff_hevc_decode_nal_pps()
1727 ret = setup_pps(avctx, gb, pps, sps); in ff_hevc_decode_nal_pps()
1758 ps->sps = NULL; in ff_hevc_ps_uninit()
1763 int ff_hevc_compute_poc(const HEVCSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type) in ff_hevc_compute_poc() argument
1765 int max_poc_lsb = 1 << sps->log2_max_poc_lsb; in ff_hevc_compute_poc()