Lines Matching defs:sps
319 if (inited && !h1->ps.sps)
327 !h->ps.sps ||
328 h->ps.sps->bit_depth_luma != h1->ps.sps->bit_depth_luma ||
329 h->ps.sps->chroma_format_idc != h1->ps.sps->chroma_format_idc ||
330 h->ps.sps->colorspace != h1->ps.sps->colorspace)) {
353 h->ps.sps = NULL;
356 h->ps.sps = h->ps.pps->sps;
580 h->mb_aff_frame = h->ps.sps->mb_aff && (h->picture_structure == PICT_FRAME);
773 if (h->ps.sps->transform_bypass) { // FIXME same ugly
802 switch (h->ps.sps->bit_depth_luma) {
895 "Unsupported bit depth %d\n", h->ps.sps->bit_depth_luma);
910 const SPS *sps = (const SPS*)h->ps.sps;
911 int cr = sps->crop_right;
912 int cl = sps->crop_left;
913 int ct = sps->crop_top;
914 int cb = sps->crop_bottom;
917 av_assert0(sps->crop_right + sps->crop_left < (unsigned)h->width);
918 av_assert0(sps->crop_top + sps->crop_bottom < (unsigned)h->height);
922 !sps->crop_top && !sps->crop_left &&
950 const SPS *sps = h->ps.sps;
953 if (!sps) {
958 ff_set_sar(h->avctx, sps->sar);
962 if (sps->timing_info_present_flag) {
963 int64_t den = sps->time_scale;
967 sps->num_units_in_tick * h->avctx->ticks_per_frame, den, 1 << 30);
982 if (sps->bit_depth_luma < 8 || sps->bit_depth_luma > 14 ||
983 sps->bit_depth_luma == 11 || sps->bit_depth_luma == 13
986 sps->bit_depth_luma);
992 h->avctx->bits_per_raw_sample = sps->bit_depth_luma;
993 h->cur_chroma_format_idc = sps->chroma_format_idc;
994 h->pixel_shift = sps->bit_depth_luma > 8;
995 h->chroma_format_idc = sps->chroma_format_idc;
996 h->bit_depth_luma = sps->bit_depth_luma;
998 ff_h264dsp_init(&h->h264dsp, sps->bit_depth_luma,
999 sps->chroma_format_idc);
1000 ff_h264chroma_init(&h->h264chroma, sps->bit_depth_chroma);
1001 ff_h264qpel_init(&h->h264qpel, sps->bit_depth_luma);
1002 ff_h264_pred_init(&h->hpc, AV_CODEC_ID_H264, sps->bit_depth_luma,
1003 sps->chroma_format_idc);
1004 ff_videodsp_init(&h->vdsp, sps->bit_depth_luma);
1043 const SPS *sps;
1055 if (h->ps.sps != h->ps.pps->sps) {
1056 h->ps.sps = (const SPS*)h->ps.pps->sps;
1058 if (h->mb_width != h->ps.sps->mb_width ||
1059 h->mb_height != h->ps.sps->mb_height ||
1060 h->cur_bit_depth_luma != h->ps.sps->bit_depth_luma ||
1061 h->cur_chroma_format_idc != h->ps.sps->chroma_format_idc
1065 if (h->bit_depth_luma != h->ps.sps->bit_depth_luma ||
1066 h->chroma_format_idc != h->ps.sps->chroma_format_idc)
1069 sps = h->ps.sps;
1072 ( 16*sps->mb_width != h->avctx->coded_width
1073 || 16*sps->mb_height != h->avctx->coded_height
1074 || h->cur_bit_depth_luma != sps->bit_depth_luma
1075 || h->cur_chroma_format_idc != sps->chroma_format_idc
1076 || h->mb_width != sps->mb_width
1077 || h->mb_height != sps->mb_height
1083 if (first_slice && av_cmp_q(sps->sar, h->avctx->sample_aspect_ratio))
1087 h->avctx->profile = ff_h264_get_profile(sps);
1088 h->avctx->level = sps->level_idc;
1089 h->avctx->refs = sps->ref_frame_count;
1091 h->mb_width = sps->mb_width;
1092 h->mb_height = sps->mb_height;
1098 h->chroma_y_shift = sps->chroma_format_idc <= 1; // 400 uses yuv420p
1105 if (sps->video_signal_type_present_flag) {
1106 h->avctx->color_range = sps->full_range > 0 ? AVCOL_RANGE_JPEG
1108 if (sps->colour_description_present_flag) {
1109 if (h->avctx->colorspace != sps->colorspace)
1111 h->avctx->color_primaries = sps->color_primaries;
1112 h->avctx->color_trc = sps->color_trc;
1113 h->avctx->colorspace = sps->colorspace;
1123 h->avctx->chroma_sample_location = sps->chroma_location;
1162 const SPS *sps = h->ps.sps;
1173 int ret = ff_h264_sei_process_picture_timing(&h->sei.picture_timing, sps,
1183 if (sps->pic_struct_present_flag && h->sei.picture_timing.present) {
1228 if (sps->pic_struct_present_flag && h->sei.picture_timing.present) {
1370 fgp->codec.h274.bit_depth_luma = sps->bit_depth_luma;
1371 fgp->codec.h274.bit_depth_chroma = sps->bit_depth_chroma;
1372 if (sps->video_signal_type_present_flag)
1373 fgp->codec.h274.color_range = sps->full_range + 1;
1376 if (sps->colour_description_present_flag) {
1377 fgp->codec.h274.color_primaries = sps->color_primaries;
1378 fgp->codec.h274.color_trc = sps->color_trc;
1379 fgp->codec.h274.color_space = sps->colorspace;
1439 const SPS *sps = h->ps.sps;
1447 if (sps->bitstream_restriction_flag ||
1449 h->avctx->has_b_frames = FFMAX(h->avctx->has_b_frames, sps->num_reorder_frames);
1471 } else if(h->avctx->has_b_frames < out_of_order && !sps->bitstream_restriction_flag){
1544 const SPS *sps;
1552 sps = h->ps.sps;
1554 if (sps && sps->bitstream_restriction_flag &&
1555 h->avctx->has_b_frames < sps->num_reorder_frames) {
1556 h->avctx->has_b_frames = sps->num_reorder_frames;
1579 int max_frame_num = 1 << sps->log2_max_frame_num;
1584 if ((h->poc.frame_num - unwrap_prev_frame_num) > sps->ref_frame_count) {
1585 unwrap_prev_frame_num = (h->poc.frame_num - sps->ref_frame_count) - 1;
1651 h->poc.frame_num != (h->poc.prev_frame_num + 1) % (1 << sps->log2_max_frame_num)) {
1655 if (!sps->gaps_in_frame_num_allowed_flag)
1665 h->poc.prev_frame_num %= 1 << sps->log2_max_frame_num;
1667 h->cur_pic_ptr->invalid_gap = !sps->gaps_in_frame_num_allowed_flag;
1684 1<<(h->ps.sps->bit_depth_luma-1),
1685 1<<(h->ps.sps->bit_depth_chroma-1),
1686 1<<(h->ps.sps->bit_depth_chroma-1),
1774 h->ps.sps, &h->poc, h->picture_structure, nal->ref_idc);
1791 || av_mod_uintp2(h->recovery_frame - h->poc.frame_num, h->ps.sps->log2_max_frame_num) > sei_recovery_frame_cnt) {
1792 h->recovery_frame = av_mod_uintp2(h->poc.frame_num + sei_recovery_frame_cnt, h->ps.sps->log2_max_frame_num);
1835 const SPS *sps;
1883 sps = pps->sps;
1885 sl->frame_num = get_bits(&sl->gb, sps->log2_max_frame_num);
1896 if (sps->frame_mbs_only_flag) {
1899 if (!sps->direct_8x8_inference_flag && slice_type == AV_PICTURE_TYPE_B) {
1916 sl->max_pic_num = 1 << sps->log2_max_frame_num;
1919 sl->max_pic_num = 1 << (sps->log2_max_frame_num + 1);
1932 if (sps->poc_type == 0) {
1933 sl->poc_lsb = get_bits(&sl->gb, sps->log2_max_poc_lsb);
1940 if (sps->poc_type == 1 && !sps->delta_pic_order_always_zero_flag) {
1976 ret = ff_h264_pred_weight_table(&sl->gb, sps, sl->ref_count,
2001 if (tmp > 51 + 6 * (sps->bit_depth_luma - 8)) {
2117 6 * (h->ps.sps->bit_depth_luma - 8);
2277 if (h->ps.sps != pps->sps) {