../../../ffmpeg/
Coverage:
low: ≥ 0%
medium: ≥ 75.0%
high: ≥ 90.0%
Lines:
3315 / 4386
75.6%
Branches:
3092 / 6064
51.0%
Functions:
61 / 64
95.3%

libavcodec/cbs_h266_syntax_template.c
Line Branch Exec Source
1 /*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 10203 static int FUNC(rbsp_trailing_bits) (CodedBitstreamContext *ctx,
20 RWContext *rw)
21 {
22 int err;
23
24
2/4
cbs_h266_read_rbsp_trailing_bits:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 7014 times.
cbs_h266_write_rbsp_trailing_bits:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 3189 times.
10203 fixed(1, rbsp_stop_one_bit, 1);
25
4/4
cbs_h266_read_rbsp_trailing_bits:
✓ Branch 11 → 6 taken 35205 times.
✓ Branch 11 → 12 taken 7014 times.
cbs_h266_write_rbsp_trailing_bits:
✓ Branch 11 → 6 taken 18486 times.
✓ Branch 11 → 12 taken 3189 times.
63894 while (byte_alignment(rw) != 0)
26
2/4
cbs_h266_read_rbsp_trailing_bits:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 35205 times.
cbs_h266_write_rbsp_trailing_bits:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 18486 times.
53691 fixed(1, rbsp_alignment_zero_bit, 0);
27 10203 return 0;
28 }
29
30 21901 static int FUNC(nal_unit_header) (CodedBitstreamContext *ctx, RWContext *rw,
31 H266RawNALUnitHeader *current,
32 int expected_nal_unit_type)
33 {
34 int err;
35
36
2/4
cbs_h266_read_nal_unit_header:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 16124 times.
cbs_h266_write_nal_unit_header:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 5777 times.
21901 fixed(1, forbidden_zero_bit, 0);
37
2/4
cbs_h266_read_nal_unit_header:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 16124 times.
cbs_h266_write_nal_unit_header:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 5777 times.
21901 flag(nuh_reserved_zero_bit);
38
39
2/4
cbs_h266_read_nal_unit_header:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 16124 times.
cbs_h266_write_nal_unit_header:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 5777 times.
21901 u(6, nuh_layer_id, 0, 55);
40
41
4/4
cbs_h266_read_nal_unit_header:
✓ Branch 11 → 12 taken 7014 times.
✓ Branch 11 → 16 taken 9110 times.
cbs_h266_write_nal_unit_header:
✓ Branch 11 → 12 taken 3189 times.
✓ Branch 11 → 16 taken 2588 times.
21901 if (expected_nal_unit_type >= 0)
42
2/4
cbs_h266_read_nal_unit_header:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 7014 times.
cbs_h266_write_nal_unit_header:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 3189 times.
10203 u(5, nal_unit_type, expected_nal_unit_type, expected_nal_unit_type);
43 else
44
2/4
cbs_h266_read_nal_unit_header:
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 19 taken 9110 times.
cbs_h266_write_nal_unit_header:
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 19 taken 2588 times.
11698 ub(5, nal_unit_type);
45
46
2/4
cbs_h266_read_nal_unit_header:
✗ Branch 21 → 22 not taken.
✓ Branch 21 → 23 taken 16124 times.
cbs_h266_write_nal_unit_header:
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 22 taken 5777 times.
21901 u(3, nuh_temporal_id_plus1, 1, 7);
47 21901 return 0;
48 }
49
50 11698 static int FUNC(byte_alignment) (CodedBitstreamContext *ctx, RWContext *rw)
51 {
52 int err;
53
54
2/4
cbs_h266_read_byte_alignment:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 9110 times.
cbs_h266_write_byte_alignment:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 2588 times.
11698 fixed(1, byte_alignment_bit_equal_to_one, 1);
55
4/4
cbs_h266_read_byte_alignment:
✓ Branch 11 → 6 taken 26699 times.
✓ Branch 11 → 12 taken 9110 times.
cbs_h266_write_byte_alignment:
✓ Branch 11 → 6 taken 6990 times.
✓ Branch 11 → 12 taken 2588 times.
45387 while (byte_alignment(rw) != 0)
56
2/4
cbs_h266_read_byte_alignment:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 26699 times.
cbs_h266_write_byte_alignment:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 6990 times.
33689 fixed(1, byte_alignment_bit_equal_to_zero, 0);
57 11698 return 0;
58 }
59
60 1339 static int FUNC(general_constraints_info) (CodedBitstreamContext *ctx,
61 RWContext *rw,
62 H266GeneralConstraintsInfo *current)
63 {
64 int err, i, num_additional_bits_used;
65
66
2/4
cbs_h266_read_general_constraints_info:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 999 times.
cbs_h266_write_general_constraints_info:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 340 times.
1339 flag(gci_present_flag);
67
2/4
cbs_h266_read_general_constraints_info:
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 234 taken 999 times.
cbs_h266_write_general_constraints_info:
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 252 taken 340 times.
1339 if (current->gci_present_flag) {
68 /* general */
69
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
✗ flag(gci_intra_only_constraint_flag);
70
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 10 → 11 not taken.
✗ Branch 10 → 12 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 10 → 11 not taken.
✗ Branch 10 → 12 not taken.
✗ flag(gci_all_layers_independent_constraint_flag);
71
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 13 → 14 not taken.
✗ Branch 13 → 15 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 13 → 14 not taken.
✗ Branch 13 → 15 not taken.
✗ flag(gci_one_au_only_constraint_flag);
72
73 /* picture format */
74
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 16 → 17 not taken.
✗ Branch 16 → 18 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 16 → 17 not taken.
✗ Branch 16 → 18 not taken.
✗ u(4, gci_sixteen_minus_max_bitdepth_constraint_idc, 0, 8);
75
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 19 → 20 not taken.
✗ Branch 19 → 21 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 19 → 20 not taken.
✗ Branch 19 → 21 not taken.
✗ ub(2, gci_three_minus_max_chroma_format_constraint_idc);
76
77 /* NAL unit type related */
78
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 22 → 23 not taken.
✗ Branch 22 → 24 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 22 → 23 not taken.
✗ Branch 22 → 24 not taken.
✗ flag(gci_no_mixed_nalu_types_in_pic_constraint_flag);
79
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 27 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 27 not taken.
✗ flag(gci_no_trail_constraint_flag);
80
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 28 → 29 not taken.
✗ Branch 28 → 30 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 28 → 29 not taken.
✗ Branch 28 → 30 not taken.
✗ flag(gci_no_stsa_constraint_flag);
81
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 31 → 32 not taken.
✗ Branch 31 → 33 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 31 → 32 not taken.
✗ Branch 31 → 33 not taken.
✗ flag(gci_no_rasl_constraint_flag);
82
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 34 → 35 not taken.
✗ Branch 34 → 36 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 34 → 35 not taken.
✗ Branch 34 → 36 not taken.
✗ flag(gci_no_radl_constraint_flag);
83
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 37 → 38 not taken.
✗ Branch 37 → 39 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 37 → 38 not taken.
✗ Branch 37 → 39 not taken.
✗ flag(gci_no_idr_constraint_flag);
84
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 40 → 41 not taken.
✗ Branch 40 → 42 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 40 → 41 not taken.
✗ Branch 40 → 42 not taken.
✗ flag(gci_no_cra_constraint_flag);
85
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 43 → 44 not taken.
✗ Branch 43 → 45 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 43 → 44 not taken.
✗ Branch 43 → 45 not taken.
✗ flag(gci_no_gdr_constraint_flag);
86
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 46 → 47 not taken.
✗ Branch 46 → 48 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 46 → 47 not taken.
✗ Branch 46 → 48 not taken.
✗ flag(gci_no_aps_constraint_flag);
87
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 49 → 50 not taken.
✗ Branch 49 → 51 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 49 → 50 not taken.
✗ Branch 49 → 51 not taken.
✗ flag(gci_no_idr_rpl_constraint_flag);
88
89 /* tile, slice, subpicture partitioning */
90
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 52 → 53 not taken.
✗ Branch 52 → 54 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 52 → 53 not taken.
✗ Branch 52 → 54 not taken.
✗ flag(gci_one_tile_per_pic_constraint_flag);
91
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 55 → 56 not taken.
✗ Branch 55 → 57 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 55 → 56 not taken.
✗ Branch 55 → 57 not taken.
✗ flag(gci_pic_header_in_slice_header_constraint_flag);
92
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 58 → 59 not taken.
✗ Branch 58 → 60 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 58 → 59 not taken.
✗ Branch 58 → 60 not taken.
✗ flag(gci_one_slice_per_pic_constraint_flag);
93
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 61 → 62 not taken.
✗ Branch 61 → 63 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 61 → 62 not taken.
✗ Branch 61 → 63 not taken.
✗ flag(gci_no_rectangular_slice_constraint_flag);
94
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 64 → 65 not taken.
✗ Branch 64 → 66 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 64 → 65 not taken.
✗ Branch 64 → 66 not taken.
✗ flag(gci_one_slice_per_subpic_constraint_flag);
95
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 67 → 68 not taken.
✗ Branch 67 → 69 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 67 → 68 not taken.
✗ Branch 67 → 69 not taken.
✗ flag(gci_no_subpic_info_constraint_flag);
96
97 /* CTU and block partitioning */
98
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 70 → 71 not taken.
✗ Branch 70 → 72 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 70 → 71 not taken.
✗ Branch 70 → 72 not taken.
✗ ub(2, gci_three_minus_max_log2_ctu_size_constraint_idc);
99
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 73 → 74 not taken.
✗ Branch 73 → 75 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 73 → 74 not taken.
✗ Branch 73 → 75 not taken.
✗ flag(gci_no_partition_constraints_override_constraint_flag);
100
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 76 → 77 not taken.
✗ Branch 76 → 78 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 76 → 77 not taken.
✗ Branch 76 → 78 not taken.
✗ flag(gci_no_mtt_constraint_flag);
101
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 79 → 80 not taken.
✗ Branch 79 → 81 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 79 → 80 not taken.
✗ Branch 79 → 81 not taken.
✗ flag(gci_no_qtbtt_dual_tree_intra_constraint_flag);
102
103 /* intra */
104
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 82 → 83 not taken.
✗ Branch 82 → 84 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 82 → 83 not taken.
✗ Branch 82 → 84 not taken.
✗ flag(gci_no_palette_constraint_flag);
105
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 85 → 86 not taken.
✗ Branch 85 → 87 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 85 → 86 not taken.
✗ Branch 85 → 87 not taken.
✗ flag(gci_no_ibc_constraint_flag);
106
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 88 → 89 not taken.
✗ Branch 88 → 90 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 88 → 89 not taken.
✗ Branch 88 → 90 not taken.
✗ flag(gci_no_isp_constraint_flag);
107
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 91 → 92 not taken.
✗ Branch 91 → 93 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 91 → 92 not taken.
✗ Branch 91 → 93 not taken.
✗ flag(gci_no_mrl_constraint_flag);
108
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 94 → 95 not taken.
✗ Branch 94 → 96 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 94 → 95 not taken.
✗ Branch 94 → 96 not taken.
✗ flag(gci_no_mip_constraint_flag);
109
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 97 → 98 not taken.
✗ Branch 97 → 99 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 97 → 98 not taken.
✗ Branch 97 → 99 not taken.
✗ flag(gci_no_cclm_constraint_flag);
110
111 /* inter */
112
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 100 → 101 not taken.
✗ Branch 100 → 102 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 100 → 101 not taken.
✗ Branch 100 → 102 not taken.
✗ flag(gci_no_ref_pic_resampling_constraint_flag);
113
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 103 → 104 not taken.
✗ Branch 103 → 105 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 103 → 104 not taken.
✗ Branch 103 → 105 not taken.
✗ flag(gci_no_res_change_in_clvs_constraint_flag);
114
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 106 → 107 not taken.
✗ Branch 106 → 108 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 106 → 107 not taken.
✗ Branch 106 → 108 not taken.
✗ flag(gci_no_weighted_prediction_constraint_flag);
115
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 109 → 110 not taken.
✗ Branch 109 → 111 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 109 → 110 not taken.
✗ Branch 109 → 111 not taken.
✗ flag(gci_no_ref_wraparound_constraint_flag);
116
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 112 → 113 not taken.
✗ Branch 112 → 114 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 112 → 113 not taken.
✗ Branch 112 → 114 not taken.
✗ flag(gci_no_temporal_mvp_constraint_flag);
117
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 115 → 116 not taken.
✗ Branch 115 → 117 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 115 → 116 not taken.
✗ Branch 115 → 117 not taken.
✗ flag(gci_no_sbtmvp_constraint_flag);
118
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 118 → 119 not taken.
✗ Branch 118 → 120 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 118 → 119 not taken.
✗ Branch 118 → 120 not taken.
✗ flag(gci_no_amvr_constraint_flag);
119
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 121 → 122 not taken.
✗ Branch 121 → 123 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 121 → 122 not taken.
✗ Branch 121 → 123 not taken.
✗ flag(gci_no_bdof_constraint_flag);
120
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 124 → 125 not taken.
✗ Branch 124 → 126 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 124 → 125 not taken.
✗ Branch 124 → 126 not taken.
✗ flag(gci_no_smvd_constraint_flag);
121
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 127 → 128 not taken.
✗ Branch 127 → 129 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 127 → 128 not taken.
✗ Branch 127 → 129 not taken.
✗ flag(gci_no_dmvr_constraint_flag);
122
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 130 → 131 not taken.
✗ Branch 130 → 132 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 130 → 131 not taken.
✗ Branch 130 → 132 not taken.
✗ flag(gci_no_mmvd_constraint_flag);
123
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 133 → 134 not taken.
✗ Branch 133 → 135 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 133 → 134 not taken.
✗ Branch 133 → 135 not taken.
✗ flag(gci_no_affine_motion_constraint_flag);
124
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 136 → 137 not taken.
✗ Branch 136 → 138 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 136 → 137 not taken.
✗ Branch 136 → 138 not taken.
✗ flag(gci_no_prof_constraint_flag);
125
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 139 → 140 not taken.
✗ Branch 139 → 141 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 139 → 140 not taken.
✗ Branch 139 → 141 not taken.
✗ flag(gci_no_bcw_constraint_flag);
126
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 142 → 143 not taken.
✗ Branch 142 → 144 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 142 → 143 not taken.
✗ Branch 142 → 144 not taken.
✗ flag(gci_no_ciip_constraint_flag);
127
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 145 → 146 not taken.
✗ Branch 145 → 147 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 145 → 146 not taken.
✗ Branch 145 → 147 not taken.
✗ flag(gci_no_gpm_constraint_flag);
128
129 /* transform, quantization, residual */
130
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 148 → 149 not taken.
✗ Branch 148 → 150 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 148 → 149 not taken.
✗ Branch 148 → 150 not taken.
✗ flag(gci_no_luma_transform_size_64_constraint_flag);
131
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 151 → 152 not taken.
✗ Branch 151 → 153 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 151 → 152 not taken.
✗ Branch 151 → 153 not taken.
✗ flag(gci_no_transform_skip_constraint_flag);
132
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 154 → 155 not taken.
✗ Branch 154 → 156 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 154 → 155 not taken.
✗ Branch 154 → 156 not taken.
✗ flag(gci_no_bdpcm_constraint_flag);
133
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 157 → 158 not taken.
✗ Branch 157 → 159 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 157 → 158 not taken.
✗ Branch 157 → 159 not taken.
✗ flag(gci_no_mts_constraint_flag);
134
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 160 → 161 not taken.
✗ Branch 160 → 162 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 160 → 161 not taken.
✗ Branch 160 → 162 not taken.
✗ flag(gci_no_lfnst_constraint_flag);
135
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 163 → 164 not taken.
✗ Branch 163 → 165 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 163 → 164 not taken.
✗ Branch 163 → 165 not taken.
✗ flag(gci_no_joint_cbcr_constraint_flag);
136
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 166 → 167 not taken.
✗ Branch 166 → 168 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 166 → 167 not taken.
✗ Branch 166 → 168 not taken.
✗ flag(gci_no_sbt_constraint_flag);
137
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 169 → 170 not taken.
✗ Branch 169 → 171 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 169 → 170 not taken.
✗ Branch 169 → 171 not taken.
✗ flag(gci_no_act_constraint_flag);
138
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 172 → 173 not taken.
✗ Branch 172 → 174 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 172 → 173 not taken.
✗ Branch 172 → 174 not taken.
✗ flag(gci_no_explicit_scaling_list_constraint_flag);
139
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 175 → 176 not taken.
✗ Branch 175 → 177 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 175 → 176 not taken.
✗ Branch 175 → 177 not taken.
✗ flag(gci_no_dep_quant_constraint_flag);
140
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 178 → 179 not taken.
✗ Branch 178 → 180 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 178 → 179 not taken.
✗ Branch 178 → 180 not taken.
✗ flag(gci_no_sign_data_hiding_constraint_flag);
141
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 181 → 182 not taken.
✗ Branch 181 → 183 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 181 → 182 not taken.
✗ Branch 181 → 183 not taken.
✗ flag(gci_no_cu_qp_delta_constraint_flag);
142
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 184 → 185 not taken.
✗ Branch 184 → 186 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 184 → 185 not taken.
✗ Branch 184 → 186 not taken.
✗ flag(gci_no_chroma_qp_offset_constraint_flag);
143
144 /* loop filter */
145
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 187 → 188 not taken.
✗ Branch 187 → 189 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 187 → 188 not taken.
✗ Branch 187 → 189 not taken.
✗ flag(gci_no_sao_constraint_flag);
146
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 190 → 191 not taken.
✗ Branch 190 → 192 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 190 → 191 not taken.
✗ Branch 190 → 192 not taken.
✗ flag(gci_no_alf_constraint_flag);
147
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 193 → 194 not taken.
✗ Branch 193 → 195 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 193 → 194 not taken.
✗ Branch 193 → 195 not taken.
✗ flag(gci_no_ccalf_constraint_flag);
148
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 196 → 197 not taken.
✗ Branch 196 → 198 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 196 → 197 not taken.
✗ Branch 196 → 198 not taken.
✗ flag(gci_no_lmcs_constraint_flag);
149
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 199 → 200 not taken.
✗ Branch 199 → 201 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 199 → 200 not taken.
✗ Branch 199 → 201 not taken.
✗ flag(gci_no_ladf_constraint_flag);
150
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 202 → 203 not taken.
✗ Branch 202 → 204 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 202 → 203 not taken.
✗ Branch 202 → 204 not taken.
✗ flag(gci_no_virtual_boundaries_constraint_flag);
151
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 205 → 206 not taken.
✗ Branch 205 → 207 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 205 → 206 not taken.
✗ Branch 205 → 207 not taken.
✗ ub(8, gci_num_additional_bits);
152
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 207 → 208 not taken.
✗ Branch 207 → 227 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 207 → 208 not taken.
✗ Branch 207 → 227 not taken.
✗ if (current->gci_num_additional_bits > 5) {
153
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 209 → 210 not taken.
✗ Branch 209 → 211 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 209 → 210 not taken.
✗ Branch 209 → 211 not taken.
✗ flag(gci_all_rap_pictures_constraint_flag);
154
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 212 → 213 not taken.
✗ Branch 212 → 214 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 212 → 213 not taken.
✗ Branch 212 → 214 not taken.
✗ flag(gci_no_extended_precision_processing_constraint_flag);
155
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 215 → 216 not taken.
✗ Branch 215 → 217 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 215 → 216 not taken.
✗ Branch 215 → 217 not taken.
✗ flag(gci_no_ts_residual_coding_rice_constraint_flag);
156
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 218 → 219 not taken.
✗ Branch 218 → 220 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 218 → 219 not taken.
✗ Branch 218 → 220 not taken.
✗ flag(gci_no_rrc_rice_extension_constraint_flag);
157
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 221 → 222 not taken.
✗ Branch 221 → 223 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 221 → 222 not taken.
✗ Branch 221 → 223 not taken.
✗ flag(gci_no_persistent_rice_adaptation_constraint_flag);
158
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 224 → 225 not taken.
✗ Branch 224 → 226 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 224 → 225 not taken.
✗ Branch 224 → 226 not taken.
✗ flag(gci_no_reverse_last_sig_coeff_constraint_flag);
159 ✗ num_additional_bits_used = 6;
160 } else {
161
0/2
✗ Branch 227 → 228 not taken.
✗ Branch 227 → 230 not taken.
✗ infer(gci_all_rap_pictures_constraint_flag, 0);
162
0/2
✗ Branch 230 → 231 not taken.
✗ Branch 230 → 233 not taken.
✗ infer(gci_no_extended_precision_processing_constraint_flag, 0);
163
0/2
✗ Branch 233 → 234 not taken.
✗ Branch 233 → 236 not taken.
✗ infer(gci_no_ts_residual_coding_rice_constraint_flag, 0);
164
0/2
✗ Branch 236 → 237 not taken.
✗ Branch 236 → 239 not taken.
✗ infer(gci_no_rrc_rice_extension_constraint_flag, 0);
165
0/2
✗ Branch 239 → 240 not taken.
✗ Branch 239 → 242 not taken.
✗ infer(gci_no_persistent_rice_adaptation_constraint_flag, 0);
166
0/2
✗ Branch 242 → 243 not taken.
✗ Branch 242 → 245 not taken.
✗ infer(gci_no_reverse_last_sig_coeff_constraint_flag, 0);
167 ✗ num_additional_bits_used = 0;
168 }
169
170
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 233 → 229 not taken.
✗ Branch 233 → 234 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 251 → 247 not taken.
✗ Branch 251 → 252 not taken.
✗ for (i = 0; i < current->gci_num_additional_bits - num_additional_bits_used; i++)
171
0/4
cbs_h266_read_general_constraints_info:
✗ Branch 230 → 231 not taken.
✗ Branch 230 → 232 not taken.
cbs_h266_write_general_constraints_info:
✗ Branch 248 → 249 not taken.
✗ Branch 248 → 250 not taken.
✗ flags(gci_reserved_bit[i], 1, i);
172 }
173
4/4
cbs_h266_read_general_constraints_info:
✓ Branch 240 → 235 taken 4995 times.
✓ Branch 240 → 241 taken 999 times.
cbs_h266_write_general_constraints_info:
✓ Branch 258 → 253 taken 1700 times.
✓ Branch 258 → 259 taken 340 times.
8034 while (byte_alignment(rw) != 0)
174
2/4
cbs_h266_read_general_constraints_info:
✗ Branch 236 → 237 not taken.
✓ Branch 236 → 238 taken 4995 times.
cbs_h266_write_general_constraints_info:
✗ Branch 254 → 255 not taken.
✓ Branch 254 → 256 taken 1700 times.
6695 fixed(1, gci_alignment_zero_bit, 0);
175 1339 return 0;
176 }
177
178 1365 static int FUNC(profile_tier_level) (CodedBitstreamContext *ctx,
179 RWContext *rw,
180 H266RawProfileTierLevel *current,
181 int profile_tier_present_flag,
182 int max_num_sub_layers_minus1)
183 {
184 int err, i;
185
186
4/4
cbs_h266_read_profile_tier_level:
✓ Branch 2 → 3 taken 999 times.
✓ Branch 2 → 10 taken 22 times.
cbs_h266_write_profile_tier_level:
✓ Branch 2 → 3 taken 340 times.
✓ Branch 2 → 9 taken 4 times.
1365 if (profile_tier_present_flag) {
187
2/4
cbs_h266_read_profile_tier_level:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 999 times.
cbs_h266_write_profile_tier_level:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 340 times.
1339 ub(7, general_profile_idc);
188
2/4
cbs_h266_read_profile_tier_level:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 999 times.
cbs_h266_write_profile_tier_level:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 340 times.
1339 flag(general_tier_flag);
189 }
190
2/4
cbs_h266_read_profile_tier_level:
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 13 taken 1021 times.
cbs_h266_write_profile_tier_level:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 344 times.
1365 ub(8, general_level_idc);
191
2/4
cbs_h266_read_profile_tier_level:
✗ Branch 14 → 15 not taken.
✓ Branch 14 → 16 taken 1021 times.
cbs_h266_write_profile_tier_level:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 344 times.
1365 flag(ptl_frame_only_constraint_flag);
192
2/4
cbs_h266_read_profile_tier_level:
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 19 taken 1021 times.
cbs_h266_write_profile_tier_level:
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 18 taken 344 times.
1365 flag(ptl_multilayer_enabled_flag);
193
4/4
cbs_h266_read_profile_tier_level:
✓ Branch 19 → 20 taken 999 times.
✓ Branch 19 → 23 taken 22 times.
cbs_h266_write_profile_tier_level:
✓ Branch 18 → 19 taken 340 times.
✓ Branch 18 → 22 taken 4 times.
1365 if (profile_tier_present_flag) {
194
2/4
cbs_h266_read_profile_tier_level:
✗ Branch 21 → 22 not taken.
✓ Branch 21 → 23 taken 999 times.
cbs_h266_write_profile_tier_level:
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 22 taken 340 times.
1339 CHECK(FUNC(general_constraints_info) (ctx, rw,
195 &current->
196 general_constraints_info));
197 }
198
4/4
cbs_h266_read_profile_tier_level:
✓ Branch 28 → 24 taken 1376 times.
✓ Branch 28 → 29 taken 1021 times.
cbs_h266_write_profile_tier_level:
✓ Branch 27 → 23 taken 275 times.
✓ Branch 27 → 28 taken 344 times.
3016 for (i = max_num_sub_layers_minus1 - 1; i >= 0; i--)
199
2/4
cbs_h266_read_profile_tier_level:
✗ Branch 25 → 26 not taken.
✓ Branch 25 → 27 taken 1376 times.
cbs_h266_write_profile_tier_level:
✗ Branch 24 → 25 not taken.
✓ Branch 24 → 26 taken 275 times.
1651 flags(ptl_sublayer_level_present_flag[i], 1, i);
200
4/4
cbs_h266_read_profile_tier_level:
✓ Branch 35 → 30 taken 1308 times.
✓ Branch 35 → 36 taken 1021 times.
cbs_h266_write_profile_tier_level:
✓ Branch 34 → 29 taken 245 times.
✓ Branch 34 → 35 taken 344 times.
2918 while (byte_alignment(rw) != 0)
201
2/4
cbs_h266_read_profile_tier_level:
✗ Branch 31 → 32 not taken.
✓ Branch 31 → 33 taken 1308 times.
cbs_h266_write_profile_tier_level:
✗ Branch 30 → 31 not taken.
✓ Branch 30 → 32 taken 245 times.
1553 flag(ptl_reserved_zero_bit);
202
4/4
cbs_h266_read_profile_tier_level:
✓ Branch 43 → 37 taken 1376 times.
✓ Branch 43 → 44 taken 1021 times.
cbs_h266_write_profile_tier_level:
✓ Branch 42 → 36 taken 275 times.
✓ Branch 42 → 43 taken 344 times.
3016 for (i = max_num_sub_layers_minus1 - 1; i >= 0; i--)
203
2/4
cbs_h266_read_profile_tier_level:
✗ Branch 37 → 38 not taken.
✓ Branch 37 → 42 taken 1376 times.
cbs_h266_write_profile_tier_level:
✗ Branch 36 → 37 not taken.
✓ Branch 36 → 41 taken 275 times.
1651 if (current->ptl_sublayer_level_present_flag[i])
204
0/4
cbs_h266_read_profile_tier_level:
✗ Branch 39 → 40 not taken.
✗ Branch 39 → 41 not taken.
cbs_h266_write_profile_tier_level:
✗ Branch 38 → 39 not taken.
✗ Branch 38 → 40 not taken.
✗ ubs(8, sublayer_level_idc[i], 1, i);
205
4/4
cbs_h266_read_profile_tier_level:
✓ Branch 44 → 45 taken 999 times.
✓ Branch 44 → 54 taken 22 times.
cbs_h266_write_profile_tier_level:
✓ Branch 43 → 44 taken 340 times.
✓ Branch 43 → 53 taken 4 times.
1365 if (profile_tier_present_flag) {
206
2/4
cbs_h266_read_profile_tier_level:
✗ Branch 46 → 47 not taken.
✓ Branch 46 → 48 taken 999 times.
cbs_h266_write_profile_tier_level:
✗ Branch 45 → 46 not taken.
✓ Branch 45 → 47 taken 340 times.
1339 ub(8, ptl_num_sub_profiles);
207
2/4
cbs_h266_read_profile_tier_level:
✗ Branch 53 → 49 not taken.
✓ Branch 53 → 54 taken 999 times.
cbs_h266_write_profile_tier_level:
✗ Branch 52 → 48 not taken.
✓ Branch 52 → 53 taken 340 times.
1339 for (i = 0; i < current->ptl_num_sub_profiles; i++)
208
0/4
cbs_h266_read_profile_tier_level:
✗ Branch 50 → 51 not taken.
✗ Branch 50 → 52 not taken.
cbs_h266_write_profile_tier_level:
✗ Branch 49 → 50 not taken.
✗ Branch 49 → 51 not taken.
✗ ubs(32, general_sub_profile_idc[i], 1, i);
209 }
210 1365 return 0;
211 }
212
213 1277 static int FUNC(vui_parameters_default) (CodedBitstreamContext *ctx,
214 RWContext *rw, H266RawVUI *current)
215 {
216 //defined in D.8
217
1/2
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 5 taken 332 times.
1277 infer(vui_progressive_source_flag, 0);
218
1/2
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 8 taken 332 times.
1277 infer(vui_interlaced_source_flag, 0);
219
220
1/2
✗ Branch 8 → 9 not taken.
✓ Branch 8 → 11 taken 332 times.
1277 infer(vui_non_packed_constraint_flag, 0);
221
1/2
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 14 taken 332 times.
1277 infer(vui_non_projected_constraint_flag, 0);
222
223
1/2
✗ Branch 14 → 15 not taken.
✓ Branch 14 → 17 taken 332 times.
1277 infer(vui_aspect_ratio_constant_flag, 0);
224
1/2
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 20 taken 332 times.
1277 infer(vui_aspect_ratio_idc, 0);
225
226
1/2
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 23 taken 332 times.
1277 infer(vui_overscan_info_present_flag, 0);
227
228
1/2
✗ Branch 23 → 24 not taken.
✓ Branch 23 → 26 taken 332 times.
1277 infer(vui_colour_primaries, 2);
229
1/2
✗ Branch 26 → 27 not taken.
✓ Branch 26 → 29 taken 332 times.
1277 infer(vui_transfer_characteristics, 2);
230
1/2
✗ Branch 29 → 30 not taken.
✓ Branch 29 → 32 taken 332 times.
1277 infer(vui_matrix_coeffs, 2);
231
1/2
✗ Branch 32 → 33 not taken.
✓ Branch 32 → 35 taken 332 times.
1277 infer(vui_full_range_flag, 0);
232
233
1/2
✗ Branch 35 → 36 not taken.
✓ Branch 35 → 38 taken 332 times.
1277 infer(vui_chroma_sample_loc_type_frame, 6);
234
1/2
✗ Branch 38 → 39 not taken.
✓ Branch 38 → 41 taken 332 times.
1277 infer(vui_chroma_sample_loc_type_top_field, 6);
235
1/2
✗ Branch 41 → 42 not taken.
✓ Branch 41 → 44 taken 332 times.
1277 infer(vui_chroma_sample_loc_type_bottom_field, 6);
236 1277 return 0;
237 }
238
239 31 static int FUNC(vui_parameters) (CodedBitstreamContext *ctx, RWContext *rw,
240 H266RawVUI *current,
241 uint8_t chroma_format_idc)
242 {
243 int err;
244
245
2/4
cbs_h266_read_vui_parameters:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 28 times.
cbs_h266_write_vui_parameters:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 3 times.
31 flag(vui_progressive_source_flag);
246
2/4
cbs_h266_read_vui_parameters:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 28 times.
cbs_h266_write_vui_parameters:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 3 times.
31 flag(vui_interlaced_source_flag);
247
2/4
cbs_h266_read_vui_parameters:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 28 times.
cbs_h266_write_vui_parameters:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 3 times.
31 flag(vui_non_packed_constraint_flag);
248
2/4
cbs_h266_read_vui_parameters:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 14 taken 28 times.
cbs_h266_write_vui_parameters:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 14 taken 3 times.
31 flag(vui_non_projected_constraint_flag);
249
2/4
cbs_h266_read_vui_parameters:
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 17 taken 28 times.
cbs_h266_write_vui_parameters:
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 17 taken 3 times.
31 flag(vui_aspect_ratio_info_present_flag);
250
3/4
cbs_h266_read_vui_parameters:
✓ Branch 17 → 18 taken 5 times.
✓ Branch 17 → 32 taken 23 times.
cbs_h266_write_vui_parameters:
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 31 taken 3 times.
31 if (current->vui_aspect_ratio_info_present_flag) {
251
1/4
cbs_h266_read_vui_parameters:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 5 times.
cbs_h266_write_vui_parameters:
✗ Branch 19 → 20 not taken.
✗ Branch 19 → 21 not taken.
5 flag(vui_aspect_ratio_constant_flag);
252
1/4
cbs_h266_read_vui_parameters:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 24 taken 5 times.
cbs_h266_write_vui_parameters:
✗ Branch 22 → 23 not taken.
✗ Branch 22 → 24 not taken.
5 ub(8, vui_aspect_ratio_idc);
253
1/4
cbs_h266_read_vui_parameters:
✗ Branch 24 → 25 not taken.
✓ Branch 24 → 33 taken 5 times.
cbs_h266_write_vui_parameters:
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 37 not taken.
5 if (current->vui_aspect_ratio_idc == 255) {
254
0/4
cbs_h266_read_vui_parameters:
✗ Branch 26 → 27 not taken.
✗ Branch 26 → 28 not taken.
cbs_h266_write_vui_parameters:
✗ Branch 26 → 27 not taken.
✗ Branch 26 → 28 not taken.
✗ ub(16, vui_sar_width);
255
0/4
cbs_h266_read_vui_parameters:
✗ Branch 29 → 30 not taken.
✗ Branch 29 → 31 not taken.
cbs_h266_write_vui_parameters:
✗ Branch 29 → 30 not taken.
✗ Branch 29 → 37 not taken.
✗ ub(16, vui_sar_height);
256 }
257 } else {
258
1/2
✗ Branch 31 → 32 not taken.
✓ Branch 31 → 34 taken 3 times.
26 infer(vui_aspect_ratio_constant_flag, 0);
259
1/2
✗ Branch 34 → 35 not taken.
✓ Branch 34 → 37 taken 3 times.
26 infer(vui_aspect_ratio_idc, 0);
260 }
261
2/4
cbs_h266_read_vui_parameters:
✗ Branch 34 → 35 not taken.
✓ Branch 34 → 36 taken 28 times.
cbs_h266_write_vui_parameters:
✗ Branch 38 → 39 not taken.
✓ Branch 38 → 40 taken 3 times.
31 flag(vui_overscan_info_present_flag);
262
3/4
cbs_h266_read_vui_parameters:
✓ Branch 36 → 37 taken 5 times.
✓ Branch 36 → 41 taken 23 times.
cbs_h266_write_vui_parameters:
✗ Branch 40 → 41 not taken.
✓ Branch 40 → 44 taken 3 times.
31 if (current->vui_overscan_info_present_flag)
263
1/4
cbs_h266_read_vui_parameters:
✗ Branch 38 → 39 not taken.
✓ Branch 38 → 40 taken 5 times.
cbs_h266_write_vui_parameters:
✗ Branch 42 → 43 not taken.
✗ Branch 42 → 44 not taken.
5 flag(vui_overscan_appropriate_flag);
264
2/4
cbs_h266_read_vui_parameters:
✗ Branch 42 → 43 not taken.
✓ Branch 42 → 44 taken 28 times.
cbs_h266_write_vui_parameters:
✗ Branch 45 → 46 not taken.
✓ Branch 45 → 47 taken 3 times.
31 flag(vui_colour_description_present_flag);
265
3/4
cbs_h266_read_vui_parameters:
✓ Branch 44 → 45 taken 5 times.
✓ Branch 44 → 61 taken 23 times.
cbs_h266_write_vui_parameters:
✗ Branch 47 → 48 not taken.
✓ Branch 47 → 63 taken 3 times.
31 if (current->vui_colour_description_present_flag) {
266
1/4
cbs_h266_read_vui_parameters:
✗ Branch 46 → 47 not taken.
✓ Branch 46 → 48 taken 5 times.
cbs_h266_write_vui_parameters:
✗ Branch 49 → 50 not taken.
✗ Branch 49 → 51 not taken.
5 ub(8, vui_colour_primaries);
267 5 av_log(ctx->log_ctx, AV_LOG_DEBUG, "vui_colour_primaries == %d \n",
268 5 current->vui_colour_primaries);
269
1/4
cbs_h266_read_vui_parameters:
✗ Branch 50 → 51 not taken.
✓ Branch 50 → 52 taken 5 times.
cbs_h266_write_vui_parameters:
✗ Branch 53 → 54 not taken.
✗ Branch 53 → 55 not taken.
5 ub(8, vui_transfer_characteristics);
270 5 av_log(ctx->log_ctx, AV_LOG_DEBUG,
271 "vui_transfer_characteristics == %d \n",
272 5 current->vui_transfer_characteristics);
273
1/4
cbs_h266_read_vui_parameters:
✗ Branch 54 → 55 not taken.
✓ Branch 54 → 56 taken 5 times.
cbs_h266_write_vui_parameters:
✗ Branch 57 → 58 not taken.
✗ Branch 57 → 59 not taken.
5 ub(8, vui_matrix_coeffs);
274 5 av_log(ctx->log_ctx, AV_LOG_DEBUG, "vui_matrix_coeffs == %d \n",
275 5 current->vui_matrix_coeffs);
276
1/4
cbs_h266_read_vui_parameters:
✗ Branch 58 → 59 not taken.
✓ Branch 58 → 60 taken 5 times.
cbs_h266_write_vui_parameters:
✗ Branch 61 → 62 not taken.
✗ Branch 61 → 75 not taken.
5 flag(vui_full_range_flag);
277 } else {
278
1/2
✗ Branch 63 → 64 not taken.
✓ Branch 63 → 66 taken 3 times.
26 infer(vui_colour_primaries, 2);
279
1/2
✗ Branch 66 → 67 not taken.
✓ Branch 66 → 69 taken 3 times.
26 infer(vui_transfer_characteristics, 2);
280
1/2
✗ Branch 69 → 70 not taken.
✓ Branch 69 → 72 taken 3 times.
26 infer(vui_matrix_coeffs, 2);
281
1/2
✗ Branch 72 → 73 not taken.
✓ Branch 72 → 75 taken 3 times.
26 infer(vui_full_range_flag, 0);
282 }
283
2/4
cbs_h266_read_vui_parameters:
✗ Branch 63 → 64 not taken.
✓ Branch 63 → 65 taken 28 times.
cbs_h266_write_vui_parameters:
✗ Branch 76 → 77 not taken.
✓ Branch 76 → 78 taken 3 times.
31 flag(vui_chroma_loc_info_present_flag);
284
2/8
cbs_h266_read_vui_parameters:
✗ Branch 65 → 66 not taken.
✓ Branch 65 → 69 taken 28 times.
✗ Branch 66 → 67 not taken.
✗ Branch 66 → 69 not taken.
cbs_h266_write_vui_parameters:
✗ Branch 78 → 79 not taken.
✓ Branch 78 → 82 taken 3 times.
✗ Branch 79 → 80 not taken.
✗ Branch 79 → 82 not taken.
31 if (chroma_format_idc != 1 && current->vui_chroma_loc_info_present_flag) {
285 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR, "chroma_format_idc == %d,"
286 "vui_chroma_loc_info_present_flag can't not be true",
287 chroma_format_idc);
288 ✗ return AVERROR_INVALIDDATA;
289 }
290
3/4
cbs_h266_read_vui_parameters:
✓ Branch 69 → 70 taken 5 times.
✓ Branch 69 → 84 taken 23 times.
cbs_h266_write_vui_parameters:
✗ Branch 82 → 83 not taken.
✓ Branch 82 → 97 taken 3 times.
31 if (current->vui_chroma_loc_info_present_flag) {
291
1/4
cbs_h266_read_vui_parameters:
✗ Branch 70 → 71 not taken.
✓ Branch 70 → 76 taken 5 times.
cbs_h266_write_vui_parameters:
✗ Branch 83 → 84 not taken.
✗ Branch 83 → 89 not taken.
5 if (current->vui_progressive_source_flag &&
292
0/4
cbs_h266_read_vui_parameters:
✗ Branch 71 → 72 not taken.
✗ Branch 71 → 76 not taken.
cbs_h266_write_vui_parameters:
✗ Branch 84 → 85 not taken.
✗ Branch 84 → 89 not taken.
✗ !current->vui_interlaced_source_flag) {
293
0/4
cbs_h266_read_vui_parameters:
✗ Branch 73 → 74 not taken.
✗ Branch 73 → 75 not taken.
cbs_h266_write_vui_parameters:
✗ Branch 86 → 87 not taken.
✗ Branch 86 → 88 not taken.
✗ ue(vui_chroma_sample_loc_type_frame, 0, 6);
294 } else {
295
1/4
cbs_h266_read_vui_parameters:
✗ Branch 77 → 78 not taken.
✓ Branch 77 → 79 taken 5 times.
cbs_h266_write_vui_parameters:
✗ Branch 90 → 91 not taken.
✗ Branch 90 → 92 not taken.
5 ue(vui_chroma_sample_loc_type_top_field, 0, 6);
296
1/4
cbs_h266_read_vui_parameters:
✗ Branch 80 → 81 not taken.
✓ Branch 80 → 82 taken 5 times.
cbs_h266_write_vui_parameters:
✗ Branch 93 → 94 not taken.
✗ Branch 93 → 95 not taken.
5 ue(vui_chroma_sample_loc_type_bottom_field, 0, 6);
297 }
298 } else {
299
2/4
cbs_h266_read_vui_parameters:
✓ Branch 84 → 85 taken 23 times.
✗ Branch 84 → 86 not taken.
cbs_h266_write_vui_parameters:
✓ Branch 97 → 98 taken 3 times.
✗ Branch 97 → 107 not taken.
26 if (chroma_format_idc == 1) {
300
1/2
✗ Branch 98 → 99 not taken.
✓ Branch 98 → 101 taken 3 times.
26 infer(vui_chroma_sample_loc_type_frame, 6);
301
1/2
✗ Branch 101 → 102 not taken.
✓ Branch 101 → 104 taken 3 times.
26 infer(vui_chroma_sample_loc_type_top_field,
302 current->vui_chroma_sample_loc_type_frame);
303
1/2
✗ Branch 104 → 105 not taken.
✓ Branch 104 → 107 taken 3 times.
26 infer(vui_chroma_sample_loc_type_bottom_field,
304 current->vui_chroma_sample_loc_type_frame);
305 }
306 }
307 31 return 0;
308 }
309
310 14 static int FUNC(payload_extension) (CodedBitstreamContext *ctx, RWContext *rw,
311 H266RawExtensionData *current,
312 uint32_t payload_size, int cur_pos)
313 {
314 int err;
315 size_t byte_length, k;
316
317 #ifdef READ
318 GetBitContext tmp;
319 int bits_left, payload_zero_bits;
320
321
2/2
✓ Branch 3 → 4 taken 5 times.
✓ Branch 3 → 5 taken 9 times.
14 if (!ff_cbs_h2645_payload_extension_present(rw, payload_size, cur_pos))
322 5 return 0;
323
324 9 bits_left = 8 * payload_size - cur_pos;
325 9 tmp = *rw;
326
1/2
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 7 taken 9 times.
9 if (bits_left > 8)
327 ✗ skip_bits_long(&tmp, bits_left - 8);
328 9 payload_zero_bits = get_bits(&tmp, FFMIN(bits_left, 8));
329
1/2
✗ Branch 8 → 9 not taken.
✓ Branch 8 → 10 taken 9 times.
9 if (!payload_zero_bits)
330 ✗ return AVERROR_INVALIDDATA;
331 9 payload_zero_bits = ff_ctz(payload_zero_bits);
332 9 current->bit_length = bits_left - payload_zero_bits - 1;
333
1/2
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 13 taken 9 times.
9 allocate(current->data, (current->bit_length + 7) / 8);
334 #endif
335
336 9 byte_length = (current->bit_length + 7) / 8;
337
1/4
cbs_h266_read_payload_extension:
✗ Branch 18 → 14 not taken.
✓ Branch 18 → 19 taken 9 times.
cbs_h266_write_payload_extension:
✗ Branch 7 → 3 not taken.
✗ Branch 7 → 8 not taken.
9 for (k = 0; k < byte_length; k++) {
338 ✗ int length = FFMIN(current->bit_length - k * 8, 8);
339
0/4
cbs_h266_read_payload_extension:
✗ Branch 15 → 16 not taken.
✗ Branch 15 → 17 not taken.
cbs_h266_write_payload_extension:
✗ Branch 4 → 5 not taken.
✗ Branch 4 → 6 not taken.
✗ xu(length, reserved_payload_extension_data, current->data[k],
340 0, MAX_UINT_BITS(length), 0);
341 }
342
343 9 return 0;
344 }
345
346 31 static int FUNC(vui_payload) (CodedBitstreamContext *ctx, RWContext *rw,
347 H266RawVUI *current, uint16_t vui_payload_size,
348 uint8_t chroma_format_idc)
349 {
350 int err;
351 int start_position, current_position;
352
353 31 start_position = bit_position(rw);
354
2/4
cbs_h266_read_vui_payload:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 28 times.
cbs_h266_write_vui_payload:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 3 times.
31 CHECK(FUNC(vui_parameters) (ctx, rw, current, chroma_format_idc));
355 31 current_position = bit_position(rw) - start_position;
356
357
3/4
cbs_h266_read_vui_payload:
✓ Branch 7 → 8 taken 14 times.
✓ Branch 7 → 21 taken 14 times.
cbs_h266_write_vui_payload:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 21 taken 3 times.
31 if (current_position < 8 * vui_payload_size) {
358
1/4
cbs_h266_read_vui_payload:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 14 times.
cbs_h266_write_vui_payload:
✗ Branch 9 → 10 not taken.
✗ Branch 9 → 11 not taken.
14 CHECK(FUNC(payload_extension) (ctx, rw, &current->extension_data,
359 vui_payload_size, current_position));
360
1/4
cbs_h266_read_vui_payload:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 14 taken 14 times.
cbs_h266_write_vui_payload:
✗ Branch 12 → 13 not taken.
✗ Branch 12 → 14 not taken.
14 fixed(1, vui_payload_bit_equal_to_one, 1);
361
2/4
cbs_h266_read_vui_payload:
✓ Branch 20 → 15 taken 83 times.
✓ Branch 20 → 21 taken 14 times.
cbs_h266_write_vui_payload:
✗ Branch 20 → 15 not taken.
✗ Branch 20 → 21 not taken.
97 while (byte_alignment(rw) != 0)
362
1/4
cbs_h266_read_vui_payload:
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 18 taken 83 times.
cbs_h266_write_vui_payload:
✗ Branch 16 → 17 not taken.
✗ Branch 16 → 18 not taken.
83 fixed(1, vui_payload_bit_equal_to_zero, 0);
363 }
364 31 return 0;
365 }
366
367 3 static int FUNC(extension_data) (CodedBitstreamContext *ctx, RWContext *rw,
368 H266RawExtensionData *current)
369 {
370 int err;
371 size_t k;
372 #ifdef READ
373 GetBitContext start;
374 uint8_t bit;
375 2 start = *rw;
376
2/2
✓ Branch 6 → 3 taken 8 times.
✓ Branch 6 → 7 taken 2 times.
10 for (k = 0; ff_cbs_h2645_read_more_rbsp_data(rw); k++)
377 8 skip_bits(rw, 1);
378 2 current->bit_length = k;
379
1/2
✓ Branch 7 → 8 taken 2 times.
✗ Branch 7 → 17 not taken.
2 if (k > 0) {
380 2 *rw = start;
381
1/2
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 2 times.
2 allocate(current->data, (current->bit_length + 7) / 8);
382
2/2
✓ Branch 16 → 12 taken 8 times.
✓ Branch 16 → 17 taken 2 times.
10 for (k = 0; k < current->bit_length; k++) {
383
1/2
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 8 times.
8 xu(1, extension_data, bit, 0, 1, 0);
384 8 current->data[k / 8] |= bit << (7 - k % 8);
385 }
386 }
387 #else
388
2/2
✓ Branch 7 → 3 taken 4 times.
✓ Branch 7 → 8 taken 1 time.
5 for (k = 0; k < current->bit_length; k++)
389
1/2
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 4 times.
4 xu(1, extension_data, current->data[k / 8] >> (7 - k % 8) & 1, 0, 1, 0);
390 #endif
391 3 return 0;
392 }
393
394 1334 static int FUNC(dpb_parameters) (CodedBitstreamContext *ctx, RWContext *rw,
395 H266DpbParameters *current,
396 uint8_t max_sublayers_minus1,
397 uint8_t sublayer_info_flag)
398 {
399 int err, i;
400
4/4
cbs_h266_read_dpb_parameters:
✓ Branch 2 → 3 taken 981 times.
✓ Branch 2 → 4 taken 14 times.
cbs_h266_write_dpb_parameters:
✓ Branch 2 → 3 taken 336 times.
✓ Branch 2 → 4 taken 3 times.
1334 for (i = (sublayer_info_flag ? 0 : max_sublayers_minus1);
401
4/4
cbs_h266_read_dpb_parameters:
✓ Branch 16 → 6 taken 1051 times.
✓ Branch 16 → 17 taken 995 times.
cbs_h266_write_dpb_parameters:
✓ Branch 16 → 6 taken 351 times.
✓ Branch 16 → 17 taken 339 times.
2736 i <= max_sublayers_minus1; i++) {
402
2/4
cbs_h266_read_dpb_parameters:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 1051 times.
cbs_h266_write_dpb_parameters:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 351 times.
1402 ues(dpb_max_dec_pic_buffering_minus1[i], 0, VVC_MAX_DPB_SIZE - 1, 1, i);
403
2/4
cbs_h266_read_dpb_parameters:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 1051 times.
cbs_h266_write_dpb_parameters:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 351 times.
1402 ues(dpb_max_num_reorder_pics[i],
404 0, current->dpb_max_dec_pic_buffering_minus1[i], 1, i);
405
2/4
cbs_h266_read_dpb_parameters:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 1051 times.
cbs_h266_write_dpb_parameters:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 351 times.
1402 ues(dpb_max_latency_increase_plus1[i], 0, UINT32_MAX - 1, 1, i);
406 }
407 1334 return 0;
408 }
409
410 66253 static int FUNC(ref_pic_list_struct) (CodedBitstreamContext *ctx,
411 RWContext *rw,
412 H266RefPicListStruct *current,
413 uint8_t list_idx, uint8_t rpls_idx,
414 const H266RawSPS *sps)
415 {
416 66253 CodedBitstreamH266Context *h266 = ctx->priv_data;
417 66253 int err, i, j, general_layer_idx = -1, num_direct_ref_layers = 0;
418 66253 const H266RawVPS *vps = h266->vps[sps->sps_video_parameter_set_id];
419
420
2/4
cbs_h266_read_ref_pic_list_struct:
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 5 taken 48941 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 5 taken 17312 times.
66253 if (!vps) {
421 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
422 ✗ "VPS id %d not available.\n", sps->sps_video_parameter_set_id);
423 ✗ return AVERROR_INVALIDDATA;
424 }
425 //7.4.3.3 (29)
426
2/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 9 → 6 taken 49304 times.
✗ Branch 9 → 10 not taken.
cbs_h266_write_ref_pic_list_struct:
✓ Branch 9 → 6 taken 17429 times.
✗ Branch 9 → 10 not taken.
66733 for (i = 0; i <= vps->vps_max_layers_minus1; i++) {
427
4/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 6 → 7 taken 48941 times.
✓ Branch 6 → 8 taken 363 times.
cbs_h266_write_ref_pic_list_struct:
✓ Branch 6 → 7 taken 17312 times.
✓ Branch 6 → 8 taken 117 times.
66733 if (sps->nal_unit_header.nuh_layer_id == vps->vps_layer_id[i]) {
428 66253 general_layer_idx = i;
429 66253 break;
430 }
431 }
432
2/4
cbs_h266_read_ref_pic_list_struct:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 13 taken 48941 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 13 taken 17312 times.
66253 if (general_layer_idx < 0) {
433 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR, "vps_layer_id %d not available.\n",
434 ✗ sps->nal_unit_header.nuh_layer_id);
435 ✗ return AVERROR_INVALIDDATA;
436 }
437 //7.4.3.3 (28)
438
4/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 17 → 14 taken 50031 times.
✓ Branch 17 → 18 taken 48941 times.
cbs_h266_write_ref_pic_list_struct:
✓ Branch 17 → 14 taken 17589 times.
✓ Branch 17 → 18 taken 17312 times.
133873 for (j = 0; j <= vps->vps_max_layers_minus1; j++) {
439
4/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 14 → 15 taken 363 times.
✓ Branch 14 → 16 taken 49668 times.
cbs_h266_write_ref_pic_list_struct:
✓ Branch 14 → 15 taken 117 times.
✓ Branch 14 → 16 taken 17472 times.
67620 if (vps->vps_direct_ref_layer_flag[general_layer_idx][j])
440 480 num_direct_ref_layers++;
441 }
442
443
2/4
cbs_h266_read_ref_pic_list_struct:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 48941 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 17312 times.
66253 ue(num_ref_entries, 0, VVC_MAX_REF_ENTRIES);
444
3/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 21 → 22 taken 672 times.
✓ Branch 21 → 28 taken 48269 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 21 → 22 not taken.
✓ Branch 21 → 27 taken 17312 times.
66253 if (sps->sps_long_term_ref_pics_flag &&
445
2/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 22 → 23 taken 380 times.
✓ Branch 22 → 28 taken 292 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 22 → 23 not taken.
✗ Branch 22 → 27 not taken.
672 rpls_idx < sps->sps_num_ref_pic_lists[list_idx] &&
446
2/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 23 → 24 taken 375 times.
✓ Branch 23 → 28 taken 5 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 23 → 24 not taken.
✗ Branch 23 → 27 not taken.
380 current->num_ref_entries > 0)
447
1/4
cbs_h266_read_ref_pic_list_struct:
✗ Branch 25 → 26 not taken.
✓ Branch 25 → 27 taken 375 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 27 not taken.
375 flag(ltrp_in_header_flag);
448
3/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 28 → 29 taken 672 times.
✓ Branch 28 → 31 taken 48269 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 27 → 28 not taken.
✓ Branch 27 → 32 taken 17312 times.
66253 if (sps->sps_long_term_ref_pics_flag &&
449
2/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 29 → 30 taken 292 times.
✓ Branch 29 → 31 taken 380 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 28 → 29 not taken.
✗ Branch 28 → 32 not taken.
672 rpls_idx == sps->sps_num_ref_pic_lists[list_idx])
450
0/2
✗ Branch 29 → 30 not taken.
✗ Branch 29 → 32 not taken.
292 infer(ltrp_in_header_flag, 1);
451
4/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 72 → 32 taken 105744 times.
✓ Branch 72 → 73 taken 48941 times.
cbs_h266_write_ref_pic_list_struct:
✓ Branch 77 → 33 taken 35087 times.
✓ Branch 77 → 78 taken 17312 times.
207084 for (i = 0, j = 0; i < current->num_ref_entries; i++) {
452
4/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 32 → 33 taken 1238 times.
✓ Branch 32 → 37 taken 104506 times.
cbs_h266_write_ref_pic_list_struct:
✓ Branch 33 → 34 taken 373 times.
✓ Branch 33 → 38 taken 34714 times.
140831 if (sps->sps_inter_layer_prediction_enabled_flag)
453
2/4
cbs_h266_read_ref_pic_list_struct:
✗ Branch 34 → 35 not taken.
✓ Branch 34 → 36 taken 1238 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 35 → 36 not taken.
✓ Branch 35 → 37 taken 373 times.
1611 flags(inter_layer_ref_pic_flag[i], 1, i);
454 else
455
1/2
✗ Branch 38 → 39 not taken.
✓ Branch 38 → 41 taken 34714 times.
139220 infer(inter_layer_ref_pic_flag[i], 0);
456
457
4/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 38 → 39 taken 105586 times.
✓ Branch 38 → 64 taken 158 times.
cbs_h266_write_ref_pic_list_struct:
✓ Branch 41 → 42 taken 35035 times.
✓ Branch 41 → 69 taken 52 times.
140831 if (!current->inter_layer_ref_pic_flag[i]) {
458
3/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 39 → 40 taken 2648 times.
✓ Branch 39 → 44 taken 102938 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 42 → 43 not taken.
✓ Branch 42 → 47 taken 35035 times.
140621 if (sps->sps_long_term_ref_pics_flag)
459
1/4
cbs_h266_read_ref_pic_list_struct:
✗ Branch 41 → 42 not taken.
✓ Branch 41 → 43 taken 2648 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 44 → 45 not taken.
✗ Branch 44 → 46 not taken.
2648 flags(st_ref_pic_flag[i], 1, i);
460 else
461
1/2
✗ Branch 47 → 48 not taken.
✓ Branch 47 → 50 taken 35035 times.
137973 infer(st_ref_pic_flag[i], 1);
462
3/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 45 → 46 taken 104796 times.
✓ Branch 45 → 59 taken 790 times.
cbs_h266_write_ref_pic_list_struct:
✓ Branch 50 → 51 taken 35035 times.
✗ Branch 50 → 64 not taken.
140621 if (current->st_ref_pic_flag[i]) {
463 int abs_delta_poc_st;
464
2/4
cbs_h266_read_ref_pic_list_struct:
✗ Branch 47 → 48 not taken.
✓ Branch 47 → 49 taken 104796 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 52 → 53 not taken.
✓ Branch 52 → 54 taken 35035 times.
139831 ues(abs_delta_poc_st[i], 0, MAX_UINT_BITS(15), 1, i);
465
4/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 49 → 50 taken 102038 times.
✓ Branch 49 → 51 taken 2758 times.
cbs_h266_write_ref_pic_list_struct:
✓ Branch 54 → 55 taken 34851 times.
✓ Branch 54 → 56 taken 184 times.
139831 if ((sps->sps_weighted_pred_flag ||
466
6/8
cbs_h266_read_ref_pic_list_struct:
✗ Branch 50 → 51 not taken.
✓ Branch 50 → 53 taken 102038 times.
✓ Branch 51 → 52 taken 1889 times.
✓ Branch 51 → 53 taken 869 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 55 → 56 not taken.
✓ Branch 55 → 58 taken 34851 times.
✓ Branch 56 → 57 taken 104 times.
✓ Branch 56 → 58 taken 80 times.
139831 sps->sps_weighted_bipred_flag) && i != 0)
467 1993 abs_delta_poc_st = current->abs_delta_poc_st[i];
468 else
469 137838 abs_delta_poc_st = current->abs_delta_poc_st[i] + 1;
470
3/4
cbs_h266_read_ref_pic_list_struct:
✓ Branch 54 → 55 taken 104408 times.
✓ Branch 54 → 71 taken 388 times.
cbs_h266_write_ref_pic_list_struct:
✓ Branch 59 → 60 taken 35035 times.
✗ Branch 59 → 76 not taken.
139831 if (abs_delta_poc_st > 0)
471
2/4
cbs_h266_read_ref_pic_list_struct:
✗ Branch 56 → 57 not taken.
✓ Branch 56 → 58 taken 104408 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 61 → 62 not taken.
✓ Branch 61 → 63 taken 35035 times.
139443 flags(strp_entry_sign_flag[i], 1, i);
472 } else {
473
1/4
cbs_h266_read_ref_pic_list_struct:
✗ Branch 59 → 60 not taken.
✓ Branch 59 → 71 taken 790 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 64 → 65 not taken.
✗ Branch 64 → 76 not taken.
790 if (!current->ltrp_in_header_flag) {
474 ✗ uint8_t bits = sps->sps_log2_max_pic_order_cnt_lsb_minus4 + 4;
475
0/4
cbs_h266_read_ref_pic_list_struct:
✗ Branch 61 → 62 not taken.
✗ Branch 61 → 63 not taken.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 66 → 67 not taken.
✗ Branch 66 → 68 not taken.
✗ ubs(bits, rpls_poc_lsb_lt[j], 1, j);
476 ✗ j++;
477 }
478 }
479 } else {
480
2/4
cbs_h266_read_ref_pic_list_struct:
✗ Branch 64 → 65 not taken.
✓ Branch 64 → 67 taken 158 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 69 → 70 not taken.
✓ Branch 69 → 72 taken 52 times.
210 if (num_direct_ref_layers == 0) {
481 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
482 "num_direct_ref_layers needs > 0.\n");
483 ✗ return AVERROR_INVALIDDATA;
484 }
485
2/4
cbs_h266_read_ref_pic_list_struct:
✗ Branch 68 → 69 not taken.
✓ Branch 68 → 70 taken 158 times.
cbs_h266_write_ref_pic_list_struct:
✗ Branch 73 → 74 not taken.
✓ Branch 73 → 75 taken 52 times.
210 ues(ilrp_idx[i], 0, num_direct_ref_layers - 1, 1, i);
486 }
487 }
488 66253 return 0;
489 }
490
491 9590 static int FUNC(ref_pic_lists) (CodedBitstreamContext *ctx, RWContext *rw,
492 const H266RawSPS *sps, const H266RawPPS *pps,
493 H266RefPicLists *current) {
494 const H266RefPicListStruct * ref_list;
495 int err, i, j, num_ltrp_entries;
496
4/4
cbs_h266_read_ref_pic_lists:
✓ Branch 59 → 3 taken 14816 times.
✓ Branch 59 → 60 taken 7408 times.
cbs_h266_write_ref_pic_lists:
✓ Branch 68 → 3 taken 4364 times.
✓ Branch 68 → 69 taken 2182 times.
28770 for (i = 0; i < 2; i++) {
497
7/8
cbs_h266_read_ref_pic_lists:
✓ Branch 3 → 4 taken 14302 times.
✓ Branch 3 → 11 taken 514 times.
✓ Branch 4 → 5 taken 7151 times.
✓ Branch 4 → 7 taken 7151 times.
cbs_h266_write_ref_pic_lists:
✓ Branch 3 → 4 taken 4364 times.
✗ Branch 3 → 11 not taken.
✓ Branch 4 → 5 taken 2182 times.
✓ Branch 4 → 7 taken 2182 times.
19180 if (sps->sps_num_ref_pic_lists[i] > 0 &&
498
5/8
cbs_h266_read_ref_pic_lists:
✓ Branch 5 → 6 taken 7151 times.
✗ Branch 5 → 11 not taken.
✓ Branch 6 → 7 taken 69 times.
✓ Branch 6 → 11 taken 7082 times.
cbs_h266_write_ref_pic_lists:
✓ Branch 5 → 6 taken 2182 times.
✗ Branch 5 → 11 not taken.
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 11 taken 2182 times.
9333 (i == 0 || (i == 1 && pps->pps_rpl1_idx_present_flag))) {
499
2/4
cbs_h266_read_ref_pic_lists:
✗ Branch 8 → 9 not taken.
✓ Branch 8 → 10 taken 7220 times.
cbs_h266_write_ref_pic_lists:
✗ Branch 8 → 9 not taken.
✓ Branch 8 → 10 taken 2182 times.
9402 flags(rpl_sps_flag[i], 1, i);
500 } else {
501
3/4
cbs_h266_read_ref_pic_lists:
✓ Branch 11 → 12 taken 514 times.
✓ Branch 11 → 13 taken 7082 times.
cbs_h266_write_ref_pic_lists:
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 15 taken 2182 times.
9778 if (sps->sps_num_ref_pic_lists[i] == 0) {
502
0/2
✗ Branch 12 → 13 not taken.
✗ Branch 12 → 20 not taken.
514 infer(rpl_sps_flag[i], 0);
503 } else {
504
4/8
cbs_h266_read_ref_pic_lists:
✓ Branch 13 → 14 taken 7082 times.
✗ Branch 13 → 16 not taken.
✓ Branch 14 → 15 taken 7082 times.
✗ Branch 14 → 16 not taken.
cbs_h266_write_ref_pic_lists:
✓ Branch 15 → 16 taken 2182 times.
✗ Branch 15 → 20 not taken.
✓ Branch 16 → 17 taken 2182 times.
✗ Branch 16 → 20 not taken.
9264 if (!pps->pps_rpl1_idx_present_flag && i == 1)
505
1/2
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 20 taken 2182 times.
9264 infer(rpl_sps_flag[1], current->rpl_sps_flag[0]);
506 }
507 }
508
4/4
cbs_h266_read_ref_pic_lists:
✓ Branch 16 → 17 taken 8998 times.
✓ Branch 16 → 33 taken 5818 times.
cbs_h266_write_ref_pic_lists:
✓ Branch 20 → 21 taken 3144 times.
✓ Branch 20 → 42 taken 1220 times.
19180 if (current->rpl_sps_flag[i]) {
509
8/8
cbs_h266_read_ref_pic_lists:
✓ Branch 17 → 18 taken 8930 times.
✓ Branch 17 → 25 taken 68 times.
✓ Branch 18 → 19 taken 4465 times.
✓ Branch 18 → 21 taken 4465 times.
cbs_h266_write_ref_pic_lists:
✓ Branch 21 → 22 taken 3142 times.
✓ Branch 21 → 29 taken 2 times.
✓ Branch 22 → 23 taken 1571 times.
✓ Branch 22 → 25 taken 1571 times.
12142 if (sps->sps_num_ref_pic_lists[i] > 1 &&
510
5/8
cbs_h266_read_ref_pic_lists:
✓ Branch 19 → 20 taken 4465 times.
✗ Branch 19 → 25 not taken.
✓ Branch 20 → 21 taken 3 times.
✓ Branch 20 → 25 taken 4462 times.
cbs_h266_write_ref_pic_lists:
✓ Branch 23 → 24 taken 1571 times.
✗ Branch 23 → 29 not taken.
✗ Branch 24 → 25 not taken.
✓ Branch 24 → 29 taken 1571 times.
7607 (i == 0 || (i == 1 && pps->pps_rpl1_idx_present_flag))) {
511 6039 uint8_t bits = av_ceil_log2(sps->sps_num_ref_pic_lists[i]);
512
2/4
cbs_h266_read_ref_pic_lists:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 24 taken 4468 times.
cbs_h266_write_ref_pic_lists:
✗ Branch 26 → 27 not taken.
✓ Branch 26 → 28 taken 1571 times.
6039 us(bits, rpl_idx[i], 0, sps->sps_num_ref_pic_lists[i] - 1, 1, i);
513
4/4
cbs_h266_read_ref_pic_lists:
✓ Branch 25 → 26 taken 68 times.
✓ Branch 25 → 27 taken 4462 times.
cbs_h266_write_ref_pic_lists:
✓ Branch 29 → 30 taken 2 times.
✓ Branch 29 → 33 taken 1571 times.
6103 } else if (sps->sps_num_ref_pic_lists[i] == 1) {
514
1/2
✗ Branch 30 → 31 not taken.
✓ Branch 30 → 41 taken 2 times.
70 infer(rpl_idx[i], 0);
515
4/8
cbs_h266_read_ref_pic_lists:
✓ Branch 27 → 28 taken 4462 times.
✗ Branch 27 → 30 not taken.
✓ Branch 28 → 29 taken 4462 times.
✗ Branch 28 → 30 not taken.
cbs_h266_write_ref_pic_lists:
✓ Branch 33 → 34 taken 1571 times.
✗ Branch 33 → 39 not taken.
✓ Branch 34 → 35 taken 1571 times.
✗ Branch 34 → 39 not taken.
6033 } else if (i == 1 && !pps->pps_rpl1_idx_present_flag) {
516
1/2
✗ Branch 35 → 36 not taken.
✓ Branch 35 → 38 taken 1571 times.
6033 infer(rpl_idx[1], current->rpl_idx[0]);
517 } else {
518 //how to handle this? or never happpend?
519 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
520 "can't infer the rpl_idx[i]\n");
521 ✗ return AVERROR_PATCHWELCOME;
522 }
523 12142 memcpy(&current->rpl_ref_list[i],
524 12142 &sps->sps_ref_pic_list_struct[i][current->rpl_idx[i]],
525 sizeof(current->rpl_ref_list[i]));
526 } else {
527
2/4
cbs_h266_read_ref_pic_lists:
✗ Branch 34 → 35 not taken.
✓ Branch 34 → 36 taken 5818 times.
cbs_h266_write_ref_pic_lists:
✗ Branch 43 → 44 not taken.
✓ Branch 43 → 45 taken 1220 times.
7038 CHECK(FUNC(ref_pic_list_struct) (ctx, rw, &current->rpl_ref_list[i],
528 i, sps->sps_num_ref_pic_lists[i],
529 sps));
530 }
531 19180 ref_list = &current->rpl_ref_list[i];
532
533 19180 num_ltrp_entries = 0;
534
4/4
cbs_h266_read_ref_pic_lists:
✓ Branch 41 → 37 taken 30697 times.
✓ Branch 41 → 42 taken 14816 times.
cbs_h266_write_ref_pic_lists:
✓ Branch 50 → 46 taken 8263 times.
✓ Branch 50 → 51 taken 4364 times.
58140 for (int k = 0; k < ref_list->num_ref_entries; k++) {
535
4/4
cbs_h266_read_ref_pic_lists:
✓ Branch 37 → 38 taken 30539 times.
✓ Branch 37 → 40 taken 158 times.
cbs_h266_write_ref_pic_lists:
✓ Branch 46 → 47 taken 8211 times.
✓ Branch 46 → 49 taken 52 times.
38960 if (!ref_list->inter_layer_ref_pic_flag[k]) {
536
3/4
cbs_h266_read_ref_pic_lists:
✓ Branch 38 → 39 taken 790 times.
✓ Branch 38 → 40 taken 29749 times.
cbs_h266_write_ref_pic_lists:
✗ Branch 47 → 48 not taken.
✓ Branch 47 → 49 taken 8211 times.
38750 if (!ref_list->st_ref_pic_flag[k]) {
537 790 num_ltrp_entries++;
538 }
539 }
540 }
541
542
3/4
cbs_h266_read_ref_pic_lists:
✓ Branch 57 → 43 taken 790 times.
✓ Branch 57 → 58 taken 14816 times.
cbs_h266_write_ref_pic_lists:
✗ Branch 66 → 52 not taken.
✓ Branch 66 → 67 taken 4364 times.
19970 for (j = 0; j < num_ltrp_entries; j++) {
543
1/4
cbs_h266_read_ref_pic_lists:
✓ Branch 43 → 44 taken 790 times.
✗ Branch 43 → 48 not taken.
cbs_h266_write_ref_pic_lists:
✗ Branch 52 → 53 not taken.
✗ Branch 52 → 57 not taken.
790 if (ref_list->ltrp_in_header_flag) {
544
1/4
cbs_h266_read_ref_pic_lists:
✗ Branch 45 → 46 not taken.
✓ Branch 45 → 47 taken 790 times.
cbs_h266_write_ref_pic_lists:
✗ Branch 54 → 55 not taken.
✗ Branch 54 → 56 not taken.
790 ubs(sps->sps_log2_max_pic_order_cnt_lsb_minus4 + 4,
545 poc_lsb_lt[i][j], 2, i, j);
546 }
547
1/4
cbs_h266_read_ref_pic_lists:
✗ Branch 49 → 50 not taken.
✓ Branch 49 → 51 taken 790 times.
cbs_h266_write_ref_pic_lists:
✗ Branch 58 → 59 not taken.
✗ Branch 58 → 60 not taken.
790 flags(delta_poc_msb_cycle_present_flag[i][j], 2, i, j);
548
2/4
cbs_h266_read_ref_pic_lists:
✓ Branch 51 → 52 taken 28 times.
✓ Branch 51 → 56 taken 762 times.
cbs_h266_write_ref_pic_lists:
✗ Branch 60 → 61 not taken.
✗ Branch 60 → 65 not taken.
790 if (current->delta_poc_msb_cycle_present_flag[i][j]) {
549 28 uint32_t max =
550 28 1 << (32 - sps->sps_log2_max_pic_order_cnt_lsb_minus4 - 4);
551
1/4
cbs_h266_read_ref_pic_lists:
✗ Branch 53 → 54 not taken.
✓ Branch 53 → 55 taken 28 times.
cbs_h266_write_ref_pic_lists:
✗ Branch 62 → 63 not taken.
✗ Branch 62 → 64 not taken.
28 ues(delta_poc_msb_cycle_lt[i][j], 0, max, 2, i, j);
552 }
553 }
554 }
555 9590 return 0;
556 }
557
558 36 static int FUNC(general_timing_hrd_parameters)(CodedBitstreamContext *ctx,
559 RWContext *rw,
560 H266RawGeneralTimingHrdParameters *current)
561 {
562 int err;
563
2/4
cbs_h266_read_general_timing_hrd_parameters:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 33 times.
cbs_h266_write_general_timing_hrd_parameters:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 3 times.
36 ub(32, num_units_in_tick);
564
2/4
cbs_h266_read_general_timing_hrd_parameters:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 33 times.
cbs_h266_write_general_timing_hrd_parameters:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 3 times.
36 u(32, time_scale, 1, MAX_UINT_BITS(32));
565
2/4
cbs_h266_read_general_timing_hrd_parameters:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 33 times.
cbs_h266_write_general_timing_hrd_parameters:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 3 times.
36 flag(general_nal_hrd_params_present_flag);
566
2/4
cbs_h266_read_general_timing_hrd_parameters:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 14 taken 33 times.
cbs_h266_write_general_timing_hrd_parameters:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 14 taken 3 times.
36 flag(general_vcl_hrd_params_present_flag);
567
568
3/4
cbs_h266_read_general_timing_hrd_parameters:
✓ Branch 14 → 15 taken 19 times.
✓ Branch 14 → 16 taken 14 times.
cbs_h266_write_general_timing_hrd_parameters:
✗ Branch 14 → 15 not taken.
✓ Branch 14 → 16 taken 3 times.
36 if (current->general_nal_hrd_params_present_flag ||
569
1/4
cbs_h266_read_general_timing_hrd_parameters:
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 42 taken 19 times.
cbs_h266_write_general_timing_hrd_parameters:
✗ Branch 15 → 16 not taken.
✗ Branch 15 → 40 not taken.
19 current->general_vcl_hrd_params_present_flag) {
570
2/4
cbs_h266_read_general_timing_hrd_parameters:
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 19 taken 14 times.
cbs_h266_write_general_timing_hrd_parameters:
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 19 taken 3 times.
17 flag(general_same_pic_timing_in_all_ols_flag);
571
2/4
cbs_h266_read_general_timing_hrd_parameters:
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 22 taken 14 times.
cbs_h266_write_general_timing_hrd_parameters:
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 22 taken 3 times.
17 flag(general_du_hrd_params_present_flag);
572
2/4
cbs_h266_read_general_timing_hrd_parameters:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 27 taken 14 times.
cbs_h266_write_general_timing_hrd_parameters:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 26 taken 3 times.
17 if (current->general_du_hrd_params_present_flag)
573
0/4
cbs_h266_read_general_timing_hrd_parameters:
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 26 not taken.
cbs_h266_write_general_timing_hrd_parameters:
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 26 not taken.
✗ ub(8, tick_divisor_minus2);
574
2/4
cbs_h266_read_general_timing_hrd_parameters:
✗ Branch 28 → 29 not taken.
✓ Branch 28 → 30 taken 14 times.
cbs_h266_write_general_timing_hrd_parameters:
✗ Branch 27 → 28 not taken.
✓ Branch 27 → 29 taken 3 times.
17 ub(4, bit_rate_scale);
575
2/4
cbs_h266_read_general_timing_hrd_parameters:
✗ Branch 31 → 32 not taken.
✓ Branch 31 → 33 taken 14 times.
cbs_h266_write_general_timing_hrd_parameters:
✗ Branch 30 → 31 not taken.
✓ Branch 30 → 32 taken 3 times.
17 ub(4, cpb_size_scale);
576
2/4
cbs_h266_read_general_timing_hrd_parameters:
✗ Branch 33 → 34 not taken.
✓ Branch 33 → 38 taken 14 times.
cbs_h266_write_general_timing_hrd_parameters:
✗ Branch 32 → 33 not taken.
✓ Branch 32 → 36 taken 3 times.
17 if (current->general_du_hrd_params_present_flag)
577
0/4
cbs_h266_read_general_timing_hrd_parameters:
✗ Branch 35 → 36 not taken.
✗ Branch 35 → 37 not taken.
cbs_h266_write_general_timing_hrd_parameters:
✗ Branch 34 → 35 not taken.
✗ Branch 34 → 36 not taken.
✗ ub(4, cpb_size_du_scale);
578
2/4
cbs_h266_read_general_timing_hrd_parameters:
✗ Branch 39 → 40 not taken.
✓ Branch 39 → 41 taken 14 times.
cbs_h266_write_general_timing_hrd_parameters:
✗ Branch 37 → 38 not taken.
✓ Branch 37 → 39 taken 3 times.
17 ue(hrd_cpb_cnt_minus1, 0, 31);
579 } else {
580 //infer general_same_pic_timing_in_all_ols_flag?
581
0/2
✗ Branch 40 → 41 not taken.
✗ Branch 40 → 43 not taken.
19 infer(general_du_hrd_params_present_flag, 0);
582 }
583 36 return 0;
584 }
585
586 170 static int FUNC(sublayer_hrd_parameters) (CodedBitstreamContext *ctx,
587 RWContext *rw,
588 H266RawSubLayerHRDParameters *current,
589 int sublayer_id,
590 const H266RawGeneralTimingHrdParameters *general)
591 {
592 int err, i;
593
4/4
cbs_h266_read_sublayer_hrd_parameters:
✓ Branch 21 → 3 taken 140 times.
✓ Branch 21 → 22 taken 140 times.
cbs_h266_write_sublayer_hrd_parameters:
✓ Branch 21 → 3 taken 30 times.
✓ Branch 21 → 22 taken 30 times.
340 for (i = 0; i <= general->hrd_cpb_cnt_minus1; i++) {
594
2/4
cbs_h266_read_sublayer_hrd_parameters:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 140 times.
cbs_h266_write_sublayer_hrd_parameters:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 30 times.
170 ues(bit_rate_value_minus1[sublayer_id][i], 0, UINT32_MAX - 1, 2,
595 sublayer_id, i);
596
2/4
cbs_h266_read_sublayer_hrd_parameters:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 140 times.
cbs_h266_write_sublayer_hrd_parameters:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 30 times.
170 ues(cpb_size_value_minus1[sublayer_id][i], 0, UINT32_MAX - 1, 2,
597 sublayer_id, i);
598
2/4
cbs_h266_read_sublayer_hrd_parameters:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 17 taken 140 times.
cbs_h266_write_sublayer_hrd_parameters:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 17 taken 30 times.
170 if (general->general_du_hrd_params_present_flag) {
599
0/4
cbs_h266_read_sublayer_hrd_parameters:
✗ Branch 11 → 12 not taken.
✗ Branch 11 → 13 not taken.
cbs_h266_write_sublayer_hrd_parameters:
✗ Branch 11 → 12 not taken.
✗ Branch 11 → 13 not taken.
✗ ues(cpb_size_du_value_minus1[sublayer_id][i],
600 0, UINT32_MAX - 1, 2, sublayer_id, i);
601
0/4
cbs_h266_read_sublayer_hrd_parameters:
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 16 not taken.
cbs_h266_write_sublayer_hrd_parameters:
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 16 not taken.
✗ ues(bit_rate_du_value_minus1[sublayer_id][i],
602 0, UINT32_MAX - 1, 2, sublayer_id, i);
603 }
604
2/4
cbs_h266_read_sublayer_hrd_parameters:
✗ Branch 18 → 19 not taken.
✓ Branch 18 → 20 taken 140 times.
cbs_h266_write_sublayer_hrd_parameters:
✗ Branch 18 → 19 not taken.
✓ Branch 18 → 20 taken 30 times.
170 flags(cbr_flag[sublayer_id][i], 2, sublayer_id, i);
605 }
606 170 return 0;
607 }
608
609 36 static int FUNC(ols_timing_hrd_parameters) (CodedBitstreamContext *ctx,
610 RWContext *rw, H266RawOlsTimingHrdParameters *current,
611 uint8_t first_sublayer, uint8_t max_sublayers_minus1,
612 const H266RawGeneralTimingHrdParameters *general)
613 {
614 int err, i;
615
4/4
cbs_h266_read_ols_timing_hrd_parameters:
✓ Branch 34 → 3 taken 89 times.
✓ Branch 34 → 35 taken 33 times.
cbs_h266_write_ols_timing_hrd_parameters:
✓ Branch 40 → 3 taken 15 times.
✓ Branch 40 → 41 taken 3 times.
140 for (i = first_sublayer; i <= max_sublayers_minus1; i++) {
616
2/4
cbs_h266_read_ols_timing_hrd_parameters:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 89 times.
cbs_h266_write_ols_timing_hrd_parameters:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 15 times.
104 flags(fixed_pic_rate_general_flag[i], 1, i);
617
2/4
cbs_h266_read_ols_timing_hrd_parameters:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 11 taken 89 times.
cbs_h266_write_ols_timing_hrd_parameters:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 11 taken 15 times.
104 if (!current->fixed_pic_rate_general_flag[i])
618
0/4
cbs_h266_read_ols_timing_hrd_parameters:
✗ Branch 8 → 9 not taken.
✗ Branch 8 → 10 not taken.
cbs_h266_write_ols_timing_hrd_parameters:
✗ Branch 8 → 9 not taken.
✗ Branch 8 → 10 not taken.
✗ flags(fixed_pic_rate_within_cvs_flag[i], 1, i);
619 else
620
1/2
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 14 taken 15 times.
104 infer(fixed_pic_rate_within_cvs_flag[i], 1);
621
2/4
cbs_h266_read_ols_timing_hrd_parameters:
✓ Branch 12 → 13 taken 89 times.
✗ Branch 12 → 17 not taken.
cbs_h266_write_ols_timing_hrd_parameters:
✓ Branch 14 → 15 taken 15 times.
✗ Branch 14 → 21 not taken.
104 if (current->fixed_pic_rate_within_cvs_flag[i]) {
622
2/4
cbs_h266_read_ols_timing_hrd_parameters:
✗ Branch 14 → 15 not taken.
✓ Branch 14 → 16 taken 89 times.
cbs_h266_write_ols_timing_hrd_parameters:
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 18 taken 15 times.
104 ues(elemental_duration_in_tc_minus1[i], 0, 2047, 1, i);
623
1/2
✗ Branch 18 → 19 not taken.
✓ Branch 18 → 31 taken 15 times.
104 infer(low_delay_hrd_flag[i], 0);
624
0/4
cbs_h266_read_ols_timing_hrd_parameters:
✗ Branch 17 → 18 not taken.
✗ Branch 17 → 19 not taken.
cbs_h266_write_ols_timing_hrd_parameters:
✗ Branch 21 → 22 not taken.
✗ Branch 21 → 23 not taken.
✗ } else if ((general->general_nal_hrd_params_present_flag ||
625
0/4
cbs_h266_read_ols_timing_hrd_parameters:
✗ Branch 18 → 19 not taken.
✗ Branch 18 → 24 not taken.
cbs_h266_write_ols_timing_hrd_parameters:
✗ Branch 22 → 23 not taken.
✗ Branch 22 → 28 not taken.
✗ general->general_vcl_hrd_params_present_flag) &&
626
0/4
cbs_h266_read_ols_timing_hrd_parameters:
✗ Branch 19 → 20 not taken.
✗ Branch 19 → 24 not taken.
cbs_h266_write_ols_timing_hrd_parameters:
✗ Branch 23 → 24 not taken.
✗ Branch 23 → 28 not taken.
✗ general->hrd_cpb_cnt_minus1 == 0) {
627
0/4
cbs_h266_read_ols_timing_hrd_parameters:
✗ Branch 21 → 22 not taken.
✗ Branch 21 → 23 not taken.
cbs_h266_write_ols_timing_hrd_parameters:
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 27 not taken.
✗ flags(low_delay_hrd_flag[i], 1, i);
628 } else {
629
0/2
✗ Branch 28 → 29 not taken.
✗ Branch 28 → 31 not taken.
✗ infer(low_delay_hrd_flag[i], 0);
630 }
631
3/4
cbs_h266_read_ols_timing_hrd_parameters:
✓ Branch 25 → 26 taken 70 times.
✓ Branch 25 → 29 taken 19 times.
cbs_h266_write_ols_timing_hrd_parameters:
✓ Branch 31 → 32 taken 15 times.
✗ Branch 31 → 35 not taken.
104 if (general->general_nal_hrd_params_present_flag)
632
2/4
cbs_h266_read_ols_timing_hrd_parameters:
✗ Branch 27 → 28 not taken.
✓ Branch 27 → 29 taken 70 times.
cbs_h266_write_ols_timing_hrd_parameters:
✗ Branch 33 → 34 not taken.
✓ Branch 33 → 35 taken 15 times.
85 CHECK(FUNC(sublayer_hrd_parameters) (ctx, rw,
633 &current->nal_sub_layer_hrd_parameters,
634 i, general));
635
3/4
cbs_h266_read_ols_timing_hrd_parameters:
✓ Branch 29 → 30 taken 70 times.
✓ Branch 29 → 33 taken 19 times.
cbs_h266_write_ols_timing_hrd_parameters:
✓ Branch 35 → 36 taken 15 times.
✗ Branch 35 → 39 not taken.
104 if (general->general_vcl_hrd_params_present_flag)
636
2/4
cbs_h266_read_ols_timing_hrd_parameters:
✗ Branch 31 → 32 not taken.
✓ Branch 31 → 33 taken 70 times.
cbs_h266_write_ols_timing_hrd_parameters:
✗ Branch 37 → 38 not taken.
✓ Branch 37 → 39 taken 15 times.
85 CHECK(FUNC(sublayer_hrd_parameters) (ctx, rw,
637 &current->nal_sub_layer_hrd_parameters,
638 i, general));
639 }
640 36 return 0;
641 }
642
643 3 static int FUNC(opi)(CodedBitstreamContext *ctx, RWContext *rw,
644 H266RawOPI *current)
645 {
646 int err;
647
648 3 HEADER("Operating point information");
649
650
2/4
cbs_h266_read_opi:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 2 times.
cbs_h266_write_opi:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 1 time.
3 CHECK(FUNC(nal_unit_header)(ctx, rw,
651 &current->nal_unit_header, VVC_OPI_NUT));
652
653
2/4
cbs_h266_read_opi:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 2 times.
cbs_h266_write_opi:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 1 time.
3 flag(opi_ols_info_present_flag);
654
2/4
cbs_h266_read_opi:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 2 times.
cbs_h266_write_opi:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 1 time.
3 flag(opi_htid_info_present_flag);
655
656
2/4
cbs_h266_read_opi:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 17 taken 2 times.
cbs_h266_write_opi:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 17 taken 1 time.
3 if(current->opi_ols_info_present_flag)
657
0/4
cbs_h266_read_opi:
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 16 not taken.
cbs_h266_write_opi:
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 16 not taken.
✗ ue(opi_ols_idx, 0, VVC_MAX_TOTAL_NUM_OLSS - 1);
658
659
2/4
cbs_h266_read_opi:
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 22 taken 2 times.
cbs_h266_write_opi:
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 21 taken 1 time.
3 if(current->opi_htid_info_present_flag)
660
0/4
cbs_h266_read_opi:
✗ Branch 19 → 20 not taken.
✗ Branch 19 → 21 not taken.
cbs_h266_write_opi:
✗ Branch 19 → 20 not taken.
✗ Branch 19 → 21 not taken.
✗ ub(3, opi_htid_plus1);
661
662
2/4
cbs_h266_read_opi:
✗ Branch 23 → 24 not taken.
✓ Branch 23 → 25 taken 2 times.
cbs_h266_write_opi:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 24 taken 1 time.
3 flag(opi_extension_flag);
663
2/4
cbs_h266_read_opi:
✓ Branch 25 → 26 taken 2 times.
✗ Branch 25 → 29 not taken.
cbs_h266_write_opi:
✓ Branch 24 → 25 taken 1 time.
✗ Branch 24 → 28 not taken.
3 if (current->opi_extension_flag)
664
2/4
cbs_h266_read_opi:
✗ Branch 27 → 28 not taken.
✓ Branch 27 → 29 taken 2 times.
cbs_h266_write_opi:
✗ Branch 26 → 27 not taken.
✓ Branch 26 → 28 taken 1 time.
3 CHECK(FUNC(extension_data) (ctx, rw, &current->extension_data));
665
2/4
cbs_h266_read_opi:
✗ Branch 30 → 31 not taken.
✓ Branch 30 → 32 taken 2 times.
cbs_h266_write_opi:
✗ Branch 29 → 30 not taken.
✓ Branch 29 → 31 taken 1 time.
3 CHECK(FUNC(rbsp_trailing_bits) (ctx, rw));
666
667 3 return 0;
668 }
669
670 5 static int FUNC(dci)(CodedBitstreamContext *ctx, RWContext *rw,
671 H266RawDCI *current)
672 {
673 int err, i;
674
675 5 HEADER("Decoding capability information");
676
677
2/4
cbs_h266_read_dci:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 4 times.
cbs_h266_write_dci:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 1 time.
5 CHECK(FUNC(nal_unit_header)(ctx, rw,
678 &current->nal_unit_header, VVC_DCI_NUT));
679
680
2/4
cbs_h266_read_dci:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 4 times.
cbs_h266_write_dci:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 1 time.
5 ub(4, dci_reserved_zero_4bits);
681
2/4
cbs_h266_read_dci:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 4 times.
cbs_h266_write_dci:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 1 time.
5 ub(4, dci_num_ptls_minus1);
682
4/4
cbs_h266_read_dci:
✓ Branch 17 → 13 taken 4 times.
✓ Branch 17 → 18 taken 4 times.
cbs_h266_write_dci:
✓ Branch 17 → 13 taken 1 time.
✓ Branch 17 → 18 taken 1 time.
10 for (i = 0; i <= current->dci_num_ptls_minus1; i++)
683
2/4
cbs_h266_read_dci:
✗ Branch 14 → 15 not taken.
✓ Branch 14 → 16 taken 4 times.
cbs_h266_write_dci:
✗ Branch 14 → 15 not taken.
✓ Branch 14 → 16 taken 1 time.
5 CHECK(FUNC(profile_tier_level)(ctx, rw,
684 current->dci_profile_tier_level + i, 1, 0));
685
686
2/4
cbs_h266_read_dci:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 4 times.
cbs_h266_write_dci:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 1 time.
5 flag(dci_extension_flag);
687
2/4
cbs_h266_read_dci:
✗ Branch 21 → 22 not taken.
✓ Branch 21 → 25 taken 4 times.
cbs_h266_write_dci:
✗ Branch 21 → 22 not taken.
✓ Branch 21 → 25 taken 1 time.
5 if (current->dci_extension_flag)
688
0/4
cbs_h266_read_dci:
✗ Branch 23 → 24 not taken.
✗ Branch 23 → 25 not taken.
cbs_h266_write_dci:
✗ Branch 23 → 24 not taken.
✗ Branch 23 → 25 not taken.
✗ CHECK(FUNC(extension_data)(ctx, rw, &current->extension_data));
689
2/4
cbs_h266_read_dci:
✗ Branch 26 → 27 not taken.
✓ Branch 26 → 28 taken 4 times.
cbs_h266_write_dci:
✗ Branch 26 → 27 not taken.
✓ Branch 26 → 28 taken 1 time.
5 CHECK(FUNC(rbsp_trailing_bits)(ctx, rw));
690
691 5 return 0;
692 }
693
694 26 static int FUNC(vps) (CodedBitstreamContext *ctx, RWContext *rw,
695 H266RawVPS *current)
696 {
697 int err, i, j, k;
698 26 uint16_t total_num_olss = 0;
699 26 uint8_t ols_mode_idc = 0;
700 26 uint16_t num_multi_layer_olss = 0;
701 uint8_t layer_included_in_ols_flag[VVC_MAX_TOTAL_NUM_OLSS][VVC_MAX_LAYERS];
702 uint8_t num_ref_layers[VVC_MAX_LAYERS];
703 uint8_t reference_layer_idx[VVC_MAX_LAYERS][VVC_MAX_LAYERS];
704
705 26 HEADER("Video Parameter Set");
706
707
2/4
cbs_h266_read_vps:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 22 times.
cbs_h266_write_vps:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 4 times.
26 CHECK(FUNC(nal_unit_header) (ctx, rw,
708 &current->nal_unit_header, VVC_VPS_NUT));
709
710
2/4
cbs_h266_read_vps:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 22 times.
cbs_h266_write_vps:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 4 times.
26 u(4, vps_video_parameter_set_id, 1, VVC_MAX_VPS_COUNT - 1);
711
2/4
cbs_h266_read_vps:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 22 times.
cbs_h266_write_vps:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 4 times.
26 ub(6, vps_max_layers_minus1);
712
2/4
cbs_h266_read_vps:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 22 times.
cbs_h266_write_vps:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 4 times.
26 u(3, vps_max_sublayers_minus1, 0, 6);
713
2/4
cbs_h266_read_vps:
✓ Branch 15 → 16 taken 22 times.
✗ Branch 15 → 21 not taken.
cbs_h266_write_vps:
✓ Branch 15 → 16 taken 4 times.
✗ Branch 15 → 21 not taken.
26 if (current->vps_max_layers_minus1 > 0
714
4/4
cbs_h266_read_vps:
✓ Branch 16 → 17 taken 5 times.
✓ Branch 16 → 21 taken 17 times.
cbs_h266_write_vps:
✓ Branch 16 → 17 taken 2 times.
✓ Branch 16 → 21 taken 2 times.
26 && current->vps_max_sublayers_minus1 > 0)
715
2/4
cbs_h266_read_vps:
✗ Branch 18 → 19 not taken.
✓ Branch 18 → 20 taken 5 times.
cbs_h266_write_vps:
✗ Branch 18 → 19 not taken.
✓ Branch 18 → 20 taken 2 times.
7 flag(vps_default_ptl_dpb_hrd_max_tid_flag);
716 else
717
1/2
✗ Branch 21 → 22 not taken.
✓ Branch 21 → 24 taken 2 times.
19 infer(vps_default_ptl_dpb_hrd_max_tid_flag, 1);
718
719
2/4
cbs_h266_read_vps:
✓ Branch 22 → 23 taken 22 times.
✗ Branch 22 → 27 not taken.
cbs_h266_write_vps:
✓ Branch 24 → 25 taken 4 times.
✗ Branch 24 → 28 not taken.
26 if (current->vps_max_layers_minus1 > 0)
720
2/4
cbs_h266_read_vps:
✗ Branch 24 → 25 not taken.
✓ Branch 24 → 26 taken 22 times.
cbs_h266_write_vps:
✗ Branch 26 → 27 not taken.
✓ Branch 26 → 31 taken 4 times.
26 flag(vps_all_independent_layers_flag);
721 else
722
0/2
✗ Branch 28 → 29 not taken.
✗ Branch 28 → 31 not taken.
✗ infer(vps_all_independent_layers_flag, 1);
723
724
4/4
cbs_h266_read_vps:
✓ Branch 66 → 29 taken 44 times.
✓ Branch 66 → 67 taken 22 times.
cbs_h266_write_vps:
✓ Branch 80 → 32 taken 8 times.
✓ Branch 80 → 81 taken 4 times.
78 for (i = 0; i <= current->vps_max_layers_minus1; i++) {
725
2/4
cbs_h266_read_vps:
✗ Branch 30 → 31 not taken.
✓ Branch 30 → 32 taken 44 times.
cbs_h266_write_vps:
✗ Branch 33 → 34 not taken.
✓ Branch 33 → 35 taken 8 times.
52 ubs(6, vps_layer_id[i], 1, i);
726
6/8
cbs_h266_read_vps:
✓ Branch 32 → 33 taken 22 times.
✓ Branch 32 → 36 taken 22 times.
✗ Branch 33 → 34 not taken.
✓ Branch 33 → 36 taken 22 times.
cbs_h266_write_vps:
✓ Branch 35 → 36 taken 4 times.
✓ Branch 35 → 39 taken 4 times.
✗ Branch 36 → 37 not taken.
✓ Branch 36 → 39 taken 4 times.
52 if (i > 0 && current->vps_layer_id[i] <= current->vps_layer_id[i - 1]) {
727 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
728 "vps_layer_id[%d](%d) should > vps_layer_id[%d](%d).\n",
729 ✗ i, current->vps_layer_id[i], i - 1,
730 ✗ current->vps_layer_id[i - 1]);
731 ✗ return AVERROR_INVALIDDATA;
732 }
733
6/8
cbs_h266_read_vps:
✓ Branch 36 → 37 taken 22 times.
✓ Branch 36 → 62 taken 22 times.
✓ Branch 37 → 38 taken 22 times.
✗ Branch 37 → 62 not taken.
cbs_h266_write_vps:
✓ Branch 39 → 40 taken 4 times.
✓ Branch 39 → 70 taken 4 times.
✓ Branch 40 → 41 taken 4 times.
✗ Branch 40 → 70 not taken.
52 if (i > 0 && !current->vps_all_independent_layers_flag) {
734
2/4
cbs_h266_read_vps:
✗ Branch 39 → 40 not taken.
✓ Branch 39 → 41 taken 22 times.
cbs_h266_write_vps:
✗ Branch 42 → 43 not taken.
✓ Branch 42 → 44 taken 4 times.
26 flags(vps_independent_layer_flag[i], 1, i);
735
2/4
cbs_h266_read_vps:
✓ Branch 41 → 42 taken 22 times.
✗ Branch 41 → 58 not taken.
cbs_h266_write_vps:
✓ Branch 44 → 45 taken 4 times.
✗ Branch 44 → 63 not taken.
26 if (!current->vps_independent_layer_flag[i]) {
736
2/4
cbs_h266_read_vps:
✗ Branch 43 → 44 not taken.
✓ Branch 43 → 45 taken 22 times.
cbs_h266_write_vps:
✗ Branch 46 → 47 not taken.
✓ Branch 46 → 48 taken 4 times.
26 flags(vps_max_tid_ref_present_flag[i], 1, i);
737
4/4
cbs_h266_read_vps:
✓ Branch 57 → 46 taken 22 times.
✓ Branch 57 → 61 taken 22 times.
cbs_h266_write_vps:
✓ Branch 62 → 49 taken 4 times.
✓ Branch 62 → 69 taken 4 times.
52 for (j = 0; j < i; j++) {
738
2/4
cbs_h266_read_vps:
✗ Branch 47 → 48 not taken.
✓ Branch 47 → 49 taken 22 times.
cbs_h266_write_vps:
✗ Branch 50 → 51 not taken.
✓ Branch 50 → 52 taken 4 times.
26 flags(vps_direct_ref_layer_flag[i][j], 2, i, j);
739
2/4
cbs_h266_read_vps:
✗ Branch 49 → 50 not taken.
✓ Branch 49 → 55 taken 22 times.
cbs_h266_write_vps:
✗ Branch 52 → 53 not taken.
✓ Branch 52 → 58 taken 4 times.
26 if (current->vps_max_tid_ref_present_flag[i] &&
740
0/4
cbs_h266_read_vps:
✗ Branch 50 → 51 not taken.
✗ Branch 50 → 55 not taken.
cbs_h266_write_vps:
✗ Branch 53 → 54 not taken.
✗ Branch 53 → 58 not taken.
✗ current->vps_direct_ref_layer_flag[i][j]) {
741
0/4
cbs_h266_read_vps:
✗ Branch 52 → 53 not taken.
✗ Branch 52 → 54 not taken.
cbs_h266_write_vps:
✗ Branch 55 → 56 not taken.
✗ Branch 55 → 57 not taken.
✗ ubs(3, vps_max_tid_il_ref_pics_plus1[i][j], 2, i, j);
742 } else {
743
1/2
✗ Branch 58 → 59 not taken.
✓ Branch 58 → 61 taken 4 times.
26 infer(vps_max_tid_il_ref_pics_plus1[i][j],
744 current->vps_max_sublayers_minus1 + 1);
745 }
746 }
747 } else {
748
0/4
cbs_h266_read_vps:
✗ Branch 60 → 59 not taken.
✗ Branch 60 → 61 not taken.
cbs_h266_write_vps:
✗ Branch 68 → 64 not taken.
✗ Branch 68 → 69 not taken.
✗ for (j = 0; j < i; j++) {
749
0/2
✗ Branch 64 → 65 not taken.
✗ Branch 64 → 67 not taken.
✗ infer(vps_direct_ref_layer_flag[i][j], 0);
750 }
751 }
752 } else {
753
1/2
✗ Branch 70 → 71 not taken.
✓ Branch 70 → 73 taken 4 times.
26 infer(vps_independent_layer_flag[i], 1);
754
2/4
cbs_h266_read_vps:
✗ Branch 64 → 63 not taken.
✓ Branch 64 → 65 taken 22 times.
cbs_h266_write_vps:
✗ Branch 78 → 74 not taken.
✓ Branch 78 → 79 taken 4 times.
26 for (j = 0; j < i; j++) {
755
0/2
✗ Branch 74 → 75 not taken.
✗ Branch 74 → 77 not taken.
✗ infer(vps_direct_ref_layer_flag[i][j], 0);
756 }
757 }
758 }
759
760
2/4
cbs_h266_read_vps:
✓ Branch 67 → 68 taken 22 times.
✗ Branch 67 → 107 not taken.
cbs_h266_write_vps:
✓ Branch 81 → 82 taken 4 times.
✗ Branch 81 → 123 not taken.
26 if (current->vps_max_layers_minus1 > 0) {
761
2/4
cbs_h266_read_vps:
✗ Branch 68 → 69 not taken.
✓ Branch 68 → 73 taken 22 times.
cbs_h266_write_vps:
✗ Branch 82 → 83 not taken.
✓ Branch 82 → 86 taken 4 times.
26 if (current->vps_all_independent_layers_flag)
762
0/4
cbs_h266_read_vps:
✗ Branch 70 → 71 not taken.
✗ Branch 70 → 72 not taken.
cbs_h266_write_vps:
✗ Branch 84 → 85 not taken.
✗ Branch 84 → 89 not taken.
✗ flag(vps_each_layer_is_an_ols_flag);
763 else
764
1/2
✗ Branch 86 → 87 not taken.
✓ Branch 86 → 89 taken 4 times.
26 infer(vps_each_layer_is_an_ols_flag, 0);
765
2/4
cbs_h266_read_vps:
✓ Branch 74 → 75 taken 22 times.
✗ Branch 74 → 95 not taken.
cbs_h266_write_vps:
✓ Branch 89 → 90 taken 4 times.
✗ Branch 89 → 111 not taken.
26 if (!current->vps_each_layer_is_an_ols_flag) {
766
2/4
cbs_h266_read_vps:
✓ Branch 75 → 76 taken 22 times.
✗ Branch 75 → 80 not taken.
cbs_h266_write_vps:
✓ Branch 90 → 91 taken 4 times.
✗ Branch 90 → 94 not taken.
26 if (!current->vps_all_independent_layers_flag)
767
2/4
cbs_h266_read_vps:
✗ Branch 77 → 78 not taken.
✓ Branch 77 → 79 taken 22 times.
cbs_h266_write_vps:
✗ Branch 92 → 93 not taken.
✓ Branch 92 → 97 taken 4 times.
26 ub(2, vps_ols_mode_idc);
768 else
769
0/2
✗ Branch 94 → 95 not taken.
✗ Branch 94 → 97 not taken.
✗ infer(vps_ols_mode_idc, 2);
770
2/4
cbs_h266_read_vps:
✓ Branch 81 → 82 taken 22 times.
✗ Branch 81 → 94 not taken.
cbs_h266_write_vps:
✓ Branch 97 → 98 taken 4 times.
✗ Branch 97 → 110 not taken.
26 if (current->vps_ols_mode_idc == 2) {
771
2/4
cbs_h266_read_vps:
✗ Branch 83 → 84 not taken.
✓ Branch 83 → 85 taken 22 times.
cbs_h266_write_vps:
✗ Branch 99 → 100 not taken.
✓ Branch 99 → 101 taken 4 times.
26 ub(8, vps_num_output_layer_sets_minus2);
772
4/4
cbs_h266_read_vps:
✓ Branch 93 → 86 taken 22 times.
✓ Branch 93 → 94 taken 22 times.
cbs_h266_write_vps:
✓ Branch 109 → 102 taken 4 times.
✓ Branch 109 → 110 taken 4 times.
52 for (i = 1; i <= current->vps_num_output_layer_sets_minus2 + 1;
773 26 i++)
774
4/4
cbs_h266_read_vps:
✓ Branch 91 → 87 taken 44 times.
✓ Branch 91 → 92 taken 22 times.
cbs_h266_write_vps:
✓ Branch 107 → 103 taken 8 times.
✓ Branch 107 → 108 taken 4 times.
78 for (j = 0; j <= current->vps_max_layers_minus1; j++)
775
2/4
cbs_h266_read_vps:
✗ Branch 88 → 89 not taken.
✓ Branch 88 → 90 taken 44 times.
cbs_h266_write_vps:
✗ Branch 104 → 105 not taken.
✓ Branch 104 → 106 taken 8 times.
52 flags(vps_ols_output_layer_flag[i][j], 2, i, j);
776 }
777 26 ols_mode_idc = current->vps_ols_mode_idc;
778 } else {
779 ✗ ols_mode_idc = 4;
780 }
781
6/12
cbs_h266_read_vps:
✓ Branch 96 → 97 taken 22 times.
✗ Branch 96 → 99 not taken.
✓ Branch 97 → 98 taken 22 times.
✗ Branch 97 → 99 not taken.
✗ Branch 98 → 99 not taken.
✓ Branch 98 → 100 taken 22 times.
cbs_h266_write_vps:
✓ Branch 112 → 113 taken 4 times.
✗ Branch 112 → 115 not taken.
✓ Branch 113 → 114 taken 4 times.
✗ Branch 113 → 115 not taken.
✗ Branch 114 → 115 not taken.
✓ Branch 114 → 116 taken 4 times.
26 if (ols_mode_idc == 4 || ols_mode_idc == 0 || ols_mode_idc == 1)
782 ✗ total_num_olss = current->vps_max_layers_minus1 + 1;
783
2/4
cbs_h266_read_vps:
✓ Branch 100 → 101 taken 22 times.
✗ Branch 100 → 102 not taken.
cbs_h266_write_vps:
✓ Branch 116 → 117 taken 4 times.
✗ Branch 116 → 118 not taken.
26 else if (ols_mode_idc == 2)
784 26 total_num_olss = current->vps_num_output_layer_sets_minus2 + 2;
785 else
786 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
787 "ols_mode_idc == 3, patch welcome");
788
2/4
cbs_h266_read_vps:
✗ Branch 104 → 105 not taken.
✓ Branch 104 → 106 taken 22 times.
cbs_h266_write_vps:
✗ Branch 120 → 121 not taken.
✓ Branch 120 → 122 taken 4 times.
26 u(8, vps_num_ptls_minus1, 0, total_num_olss - 1);
789 } else {
790
0/2
✗ Branch 123 → 124 not taken.
✗ Branch 123 → 126 not taken.
✗ infer(vps_each_layer_is_an_ols_flag, 1);
791
0/2
✗ Branch 126 → 127 not taken.
✗ Branch 126 → 129 not taken.
✗ infer(vps_num_ptls_minus1, 0);
792 }
793
794
4/4
cbs_h266_read_vps:
✓ Branch 122 → 109 taken 44 times.
✓ Branch 122 → 123 taken 22 times.
cbs_h266_write_vps:
✓ Branch 147 → 130 taken 8 times.
✓ Branch 147 → 148 taken 4 times.
78 for (i = 0; i <= current->vps_num_ptls_minus1; i++) {
795
4/4
cbs_h266_read_vps:
✓ Branch 109 → 110 taken 22 times.
✓ Branch 109 → 114 taken 22 times.
cbs_h266_write_vps:
✓ Branch 130 → 131 taken 4 times.
✓ Branch 130 → 135 taken 4 times.
52 if (i > 0)
796
2/4
cbs_h266_read_vps:
✗ Branch 111 → 112 not taken.
✓ Branch 111 → 113 taken 22 times.
cbs_h266_write_vps:
✗ Branch 132 → 133 not taken.
✓ Branch 132 → 134 taken 4 times.
26 flags(vps_pt_present_flag[i], 1, i);
797 else
798
1/2
✗ Branch 135 → 136 not taken.
✓ Branch 135 → 138 taken 4 times.
26 infer(vps_pt_present_flag[i], 1);
799
800
4/4
cbs_h266_read_vps:
✓ Branch 115 → 116 taken 10 times.
✓ Branch 115 → 120 taken 34 times.
cbs_h266_write_vps:
✓ Branch 138 → 139 taken 4 times.
✓ Branch 138 → 143 taken 4 times.
52 if (!current->vps_default_ptl_dpb_hrd_max_tid_flag)
801
2/4
cbs_h266_read_vps:
✗ Branch 117 → 118 not taken.
✓ Branch 117 → 119 taken 10 times.
cbs_h266_write_vps:
✗ Branch 140 → 141 not taken.
✓ Branch 140 → 142 taken 4 times.
14 us(3, vps_ptl_max_tid[i], 0, current->vps_max_sublayers_minus1, 1, i);
802 else
803
1/2
✗ Branch 143 → 144 not taken.
✓ Branch 143 → 146 taken 4 times.
38 infer(vps_ptl_max_tid[i], current->vps_max_sublayers_minus1);
804 }
805
4/4
cbs_h266_read_vps:
✓ Branch 129 → 124 taken 137 times.
✓ Branch 129 → 130 taken 22 times.
cbs_h266_write_vps:
✓ Branch 154 → 149 taken 26 times.
✓ Branch 154 → 155 taken 4 times.
189 while (byte_alignment(rw) != 0)
806
2/4
cbs_h266_read_vps:
✗ Branch 125 → 126 not taken.
✓ Branch 125 → 127 taken 137 times.
cbs_h266_write_vps:
✗ Branch 150 → 151 not taken.
✓ Branch 150 → 152 taken 26 times.
163 fixed(1, vps_ptl_alignment_zero_bit, 0);
807
808 {
809 //calc NumMultiLayerOlss
810 int m;
811 uint8_t dependency_flag[VVC_MAX_LAYERS][VVC_MAX_LAYERS];
812 uint16_t num_output_layers_in_ols[VVC_MAX_TOTAL_NUM_OLSS];
813 uint8_t num_sub_layers_in_layer_in_ols[VVC_MAX_TOTAL_NUM_OLSS][VVC_MAX_TOTAL_NUM_OLSS];
814 uint8_t output_layer_idx[VVC_MAX_TOTAL_NUM_OLSS][VVC_MAX_LAYERS];
815
816 //7.4.3.3 vps_direct_ref_layer_flag section
817
4/4
cbs_h266_read_vps:
✓ Branch 141 → 131 taken 44 times.
✓ Branch 141 → 142 taken 22 times.
cbs_h266_write_vps:
✓ Branch 166 → 156 taken 8 times.
✓ Branch 166 → 167 taken 4 times.
78 for (i = 0; i <= current->vps_max_layers_minus1; i++) {
818
4/4
cbs_h266_read_vps:
✓ Branch 139 → 132 taken 88 times.
✓ Branch 139 → 140 taken 44 times.
cbs_h266_write_vps:
✓ Branch 164 → 157 taken 16 times.
✓ Branch 164 → 165 taken 8 times.
156 for (j = 0; j <= current->vps_max_layers_minus1; j++) {
819 104 dependency_flag[i][j] = current->vps_direct_ref_layer_flag[i][j];
820
4/4
cbs_h266_read_vps:
✓ Branch 137 → 133 taken 44 times.
✓ Branch 137 → 138 taken 88 times.
cbs_h266_write_vps:
✓ Branch 162 → 158 taken 8 times.
✓ Branch 162 → 163 taken 16 times.
156 for (k = 0; k < i; k++) {
821
2/4
cbs_h266_read_vps:
✓ Branch 133 → 134 taken 44 times.
✗ Branch 133 → 136 not taken.
cbs_h266_write_vps:
✓ Branch 158 → 159 taken 8 times.
✗ Branch 158 → 161 not taken.
52 if (current->vps_direct_ref_layer_flag[i][k] &&
822
2/4
cbs_h266_read_vps:
✗ Branch 134 → 135 not taken.
✓ Branch 134 → 136 taken 44 times.
cbs_h266_write_vps:
✗ Branch 159 → 160 not taken.
✓ Branch 159 → 161 taken 8 times.
52 dependency_flag[k][j])
823 ✗ dependency_flag[i][j] = 1;
824 }
825 }
826 }
827
4/4
cbs_h266_read_vps:
✓ Branch 149 → 143 taken 44 times.
✓ Branch 149 → 150 taken 22 times.
cbs_h266_write_vps:
✓ Branch 174 → 168 taken 8 times.
✓ Branch 174 → 175 taken 4 times.
78 for (i = 0; i <= current->vps_max_layers_minus1; i++) {
828 int r;
829
4/4
cbs_h266_read_vps:
✓ Branch 147 → 144 taken 88 times.
✓ Branch 147 → 148 taken 44 times.
cbs_h266_write_vps:
✓ Branch 172 → 169 taken 16 times.
✓ Branch 172 → 173 taken 8 times.
156 for (j = 0, r = 0; j <= current->vps_max_layers_minus1; j++) {
830
4/4
cbs_h266_read_vps:
✓ Branch 144 → 145 taken 22 times.
✓ Branch 144 → 146 taken 66 times.
cbs_h266_write_vps:
✓ Branch 169 → 170 taken 4 times.
✓ Branch 169 → 171 taken 12 times.
104 if (dependency_flag[i][j])
831 26 reference_layer_idx[i][r++] = j;
832 }
833 52 num_ref_layers[i] = r;
834 }
835
836 //7.4.3.3 vps_ols_output_layer_flag section
837 26 num_output_layers_in_ols[0] = 1;
838 26 num_sub_layers_in_layer_in_ols[0][0] =
839 26 current->vps_ptl_max_tid[current->vps_ols_ptl_idx[0]] + 1;
840
4/4
cbs_h266_read_vps:
✓ Branch 201 → 151 taken 22 times.
✓ Branch 201 → 202 taken 22 times.
cbs_h266_write_vps:
✓ Branch 226 → 176 taken 4 times.
✓ Branch 226 → 227 taken 4 times.
52 for (i = 1; i < total_num_olss; i++) {
841
4/8
cbs_h266_read_vps:
✓ Branch 151 → 152 taken 22 times.
✗ Branch 151 → 153 not taken.
✗ Branch 152 → 153 not taken.
✓ Branch 152 → 165 taken 22 times.
cbs_h266_write_vps:
✓ Branch 176 → 177 taken 4 times.
✗ Branch 176 → 178 not taken.
✗ Branch 177 → 178 not taken.
✓ Branch 177 → 190 taken 4 times.
26 if (ols_mode_idc == 4 || ols_mode_idc == 0) {
842 ✗ num_output_layers_in_ols[i] = 1;
843
0/4
cbs_h266_read_vps:
✗ Branch 153 → 154 not taken.
✗ Branch 153 → 155 not taken.
cbs_h266_write_vps:
✗ Branch 178 → 179 not taken.
✗ Branch 178 → 180 not taken.
✗ if (current->vps_each_layer_is_an_ols_flag) {
844 ✗ num_sub_layers_in_layer_in_ols[i][0] =
845 ✗ current->vps_ptl_max_tid[current->vps_ols_ptl_idx[i]] + 1;
846 } else {
847 ✗ num_sub_layers_in_layer_in_ols[i][i] =
848 ✗ current->vps_ptl_max_tid[current->vps_ols_ptl_idx[i]] + 1;
849
0/4
cbs_h266_read_vps:
✗ Branch 163 → 156 not taken.
✗ Branch 163 → 164 not taken.
cbs_h266_write_vps:
✗ Branch 188 → 181 not taken.
✗ Branch 188 → 189 not taken.
✗ for (k = i - 1; k >= 0; k--) {
850 ✗ num_sub_layers_in_layer_in_ols[i][k] = 0;
851
0/4
cbs_h266_read_vps:
✗ Branch 161 → 157 not taken.
✗ Branch 161 → 162 not taken.
cbs_h266_write_vps:
✗ Branch 186 → 182 not taken.
✗ Branch 186 → 187 not taken.
✗ for (m = k + 1; m <= i; m++) {
852 ✗ uint8_t max_sublayer_needed =
853 ✗ FFMIN(num_sub_layers_in_layer_in_ols[i][m],
854 current->vps_max_tid_il_ref_pics_plus1[m][k]);
855
0/4
cbs_h266_read_vps:
✗ Branch 157 → 158 not taken.
✗ Branch 157 → 160 not taken.
cbs_h266_write_vps:
✗ Branch 182 → 183 not taken.
✗ Branch 182 → 185 not taken.
✗ if (current->vps_direct_ref_layer_flag[m][k] &&
856
0/4
cbs_h266_read_vps:
✗ Branch 158 → 159 not taken.
✗ Branch 158 → 160 not taken.
cbs_h266_write_vps:
✗ Branch 183 → 184 not taken.
✗ Branch 183 → 185 not taken.
✗ num_sub_layers_in_layer_in_ols[i][k] < max_sublayer_needed)
857 ✗ num_sub_layers_in_layer_in_ols[i][k] = max_sublayer_needed;
858 }
859 }
860 }
861
2/4
cbs_h266_read_vps:
✗ Branch 165 → 166 not taken.
✓ Branch 165 → 169 taken 22 times.
cbs_h266_write_vps:
✗ Branch 190 → 191 not taken.
✓ Branch 190 → 194 taken 4 times.
26 } else if (current->vps_ols_mode_idc == 1) {
862 ✗ num_output_layers_in_ols[i] = i + 1;
863
0/4
cbs_h266_read_vps:
✗ Branch 168 → 167 not taken.
✗ Branch 168 → 198 not taken.
cbs_h266_write_vps:
✗ Branch 193 → 192 not taken.
✗ Branch 193 → 223 not taken.
✗ for (j = 0; j < num_output_layers_in_ols[i]; j++) {
864 ✗ num_sub_layers_in_layer_in_ols[i][j] =
865 ✗ current->vps_ptl_max_tid[current->vps_ols_ptl_idx[i]] + 1;
866 }
867
2/4
cbs_h266_read_vps:
✓ Branch 169 → 170 taken 22 times.
✗ Branch 169 → 198 not taken.
cbs_h266_write_vps:
✓ Branch 194 → 195 taken 4 times.
✗ Branch 194 → 223 not taken.
26 } else if (current->vps_ols_mode_idc == 2) {
868 26 uint8_t highest_included_layer = 0;
869
4/4
cbs_h266_read_vps:
✓ Branch 172 → 171 taken 44 times.
✓ Branch 172 → 173 taken 22 times.
cbs_h266_write_vps:
✓ Branch 197 → 196 taken 8 times.
✓ Branch 197 → 198 taken 4 times.
78 for (j = 0; j <= current->vps_max_layers_minus1; j++) {
870 52 layer_included_in_ols_flag[i][j] = 0;
871 52 num_sub_layers_in_layer_in_ols[i][j] = 0;
872 }
873
4/4
cbs_h266_read_vps:
✓ Branch 177 → 174 taken 44 times.
✓ Branch 177 → 178 taken 22 times.
cbs_h266_write_vps:
✓ Branch 202 → 199 taken 8 times.
✓ Branch 202 → 203 taken 4 times.
78 for (k = 0, j = 0; k <= current->vps_max_layers_minus1; k++) {
874
2/4
cbs_h266_read_vps:
✓ Branch 174 → 175 taken 44 times.
✗ Branch 174 → 176 not taken.
cbs_h266_write_vps:
✓ Branch 199 → 200 taken 8 times.
✗ Branch 199 → 201 not taken.
52 if (current->vps_ols_output_layer_flag[i][k]) {
875 52 layer_included_in_ols_flag[i][k] = 1;
876 52 highest_included_layer = k;
877 52 output_layer_idx[i][j] = k;
878 52 num_sub_layers_in_layer_in_ols[i][k] =
879 52 current->vps_ptl_max_tid[current->
880 52 vps_ols_ptl_idx[i]] + 1;
881 52 j++;
882 }
883 }
884 26 num_output_layers_in_ols[i] = j;
885
4/4
cbs_h266_read_vps:
✓ Branch 185 → 179 taken 44 times.
✓ Branch 185 → 186 taken 22 times.
cbs_h266_write_vps:
✓ Branch 210 → 204 taken 8 times.
✓ Branch 210 → 211 taken 4 times.
78 for (j = 0; j < num_output_layers_in_ols[i]; j++) {
886 52 int idx = output_layer_idx[i][j];
887
4/4
cbs_h266_read_vps:
✓ Branch 183 → 180 taken 22 times.
✓ Branch 183 → 184 taken 44 times.
cbs_h266_write_vps:
✓ Branch 208 → 205 taken 4 times.
✓ Branch 208 → 209 taken 8 times.
78 for (k = 0; k < num_ref_layers[idx]; k++) {
888
2/4
cbs_h266_read_vps:
✗ Branch 180 → 181 not taken.
✓ Branch 180 → 182 taken 22 times.
cbs_h266_write_vps:
✗ Branch 205 → 206 not taken.
✓ Branch 205 → 207 taken 4 times.
26 if (!layer_included_in_ols_flag[i][reference_layer_idx[idx][k]])
889 ✗ layer_included_in_ols_flag[i][reference_layer_idx[idx][k]] = 1;
890 }
891 }
892
4/4
cbs_h266_read_vps:
✓ Branch 197 → 187 taken 22 times.
✓ Branch 197 → 198 taken 22 times.
cbs_h266_write_vps:
✓ Branch 222 → 212 taken 4 times.
✓ Branch 222 → 223 taken 4 times.
52 for (k = highest_included_layer - 1; k >= 0; k--) {
893
2/4
cbs_h266_read_vps:
✓ Branch 187 → 188 taken 22 times.
✗ Branch 187 → 196 not taken.
cbs_h266_write_vps:
✓ Branch 212 → 213 taken 4 times.
✗ Branch 212 → 221 not taken.
26 if (layer_included_in_ols_flag[i][k] &&
894
2/4
cbs_h266_read_vps:
✗ Branch 188 → 189 not taken.
✓ Branch 188 → 196 taken 22 times.
cbs_h266_write_vps:
✗ Branch 213 → 214 not taken.
✓ Branch 213 → 221 taken 4 times.
26 !current->vps_ols_output_layer_flag[i][k]) {
895
0/4
cbs_h266_read_vps:
✗ Branch 195 → 190 not taken.
✗ Branch 195 → 196 not taken.
cbs_h266_write_vps:
✗ Branch 220 → 215 not taken.
✗ Branch 220 → 221 not taken.
✗ for (m = k + 1; m <= highest_included_layer; m++) {
896 ✗ uint8_t max_sublayer_needed =
897 ✗ FFMIN(num_sub_layers_in_layer_in_ols[i][m],
898 current->vps_max_tid_il_ref_pics_plus1[m][k]);
899
0/4
cbs_h266_read_vps:
✗ Branch 190 → 191 not taken.
✗ Branch 190 → 194 not taken.
cbs_h266_write_vps:
✗ Branch 215 → 216 not taken.
✗ Branch 215 → 219 not taken.
✗ if (current->vps_direct_ref_layer_flag[m][k] &&
900
0/4
cbs_h266_read_vps:
✗ Branch 191 → 192 not taken.
✗ Branch 191 → 194 not taken.
cbs_h266_write_vps:
✗ Branch 216 → 217 not taken.
✗ Branch 216 → 219 not taken.
✗ layer_included_in_ols_flag[i][m] &&
901
0/4
cbs_h266_read_vps:
✗ Branch 192 → 193 not taken.
✗ Branch 192 → 194 not taken.
cbs_h266_write_vps:
✗ Branch 217 → 218 not taken.
✗ Branch 217 → 219 not taken.
✗ num_sub_layers_in_layer_in_ols[i][k] <
902 max_sublayer_needed)
903 ✗ num_sub_layers_in_layer_in_ols[i][k] =
904 max_sublayer_needed;
905 }
906 }
907 }
908 }
909
2/4
cbs_h266_read_vps:
✗ Branch 198 → 199 not taken.
✓ Branch 198 → 200 taken 22 times.
cbs_h266_write_vps:
✗ Branch 223 → 224 not taken.
✓ Branch 223 → 225 taken 4 times.
26 if (!num_output_layers_in_ols[i])
910 ✗ return AVERROR_INVALIDDATA;
911 }
912
4/4
cbs_h266_read_vps:
✓ Branch 218 → 203 taken 22 times.
✓ Branch 218 → 219 taken 22 times.
cbs_h266_write_vps:
✓ Branch 243 → 228 taken 4 times.
✓ Branch 243 → 244 taken 4 times.
52 for (i = 1; i < total_num_olss; i++) {
913 26 int num_layers_in_ols = 0;
914
2/4
cbs_h266_read_vps:
✗ Branch 203 → 204 not taken.
✓ Branch 203 → 205 taken 22 times.
cbs_h266_write_vps:
✗ Branch 228 → 229 not taken.
✓ Branch 228 → 230 taken 4 times.
26 if (current->vps_each_layer_is_an_ols_flag) {
915 ✗ num_layers_in_ols = 1;
916
2/4
cbs_h266_read_vps:
✓ Branch 205 → 206 taken 22 times.
✗ Branch 205 → 207 not taken.
cbs_h266_write_vps:
✓ Branch 230 → 231 taken 4 times.
✗ Branch 230 → 232 not taken.
26 } else if (current->vps_ols_mode_idc == 0 ||
917
2/4
cbs_h266_read_vps:
✗ Branch 206 → 207 not taken.
✓ Branch 206 → 208 taken 22 times.
cbs_h266_write_vps:
✗ Branch 231 → 232 not taken.
✓ Branch 231 → 233 taken 4 times.
26 current->vps_ols_mode_idc == 1) {
918 ✗ num_layers_in_ols = i + 1;
919
2/4
cbs_h266_read_vps:
✓ Branch 208 → 209 taken 22 times.
✗ Branch 208 → 215 not taken.
cbs_h266_write_vps:
✓ Branch 233 → 234 taken 4 times.
✗ Branch 233 → 240 not taken.
26 } else if (current->vps_ols_mode_idc == 2) {
920
4/4
cbs_h266_read_vps:
✓ Branch 213 → 210 taken 44 times.
✓ Branch 213 → 214 taken 22 times.
cbs_h266_write_vps:
✓ Branch 238 → 235 taken 8 times.
✓ Branch 238 → 239 taken 4 times.
78 for (k = 0, j = 0; k <= current->vps_max_layers_minus1; k++)
921
2/4
cbs_h266_read_vps:
✓ Branch 210 → 211 taken 44 times.
✗ Branch 210 → 212 not taken.
cbs_h266_write_vps:
✓ Branch 235 → 236 taken 8 times.
✗ Branch 235 → 237 not taken.
52 if (layer_included_in_ols_flag[i][k])
922 52 j++;
923 26 num_layers_in_ols = j;
924 }
925
2/4
cbs_h266_read_vps:
✓ Branch 215 → 216 taken 22 times.
✗ Branch 215 → 217 not taken.
cbs_h266_write_vps:
✓ Branch 240 → 241 taken 4 times.
✗ Branch 240 → 242 not taken.
26 if (num_layers_in_ols > 1) {
926 26 num_multi_layer_olss++;
927 }
928 }
929
4/8
cbs_h266_read_vps:
✓ Branch 219 → 220 taken 22 times.
✗ Branch 219 → 222 not taken.
✗ Branch 220 → 221 not taken.
✓ Branch 220 → 222 taken 22 times.
cbs_h266_write_vps:
✓ Branch 244 → 245 taken 4 times.
✗ Branch 244 → 247 not taken.
✗ Branch 245 → 246 not taken.
✓ Branch 245 → 247 taken 4 times.
26 if (!current->vps_each_layer_is_an_ols_flag && num_multi_layer_olss == 0)
930 ✗ return AVERROR_INVALIDDATA;
931 }
932
933
2/4
cbs_h266_read_vps:
✗ Branch 223 → 225 not taken.
✓ Branch 223 → 226 taken 22 times.
cbs_h266_write_vps:
✗ Branch 247 → 249 not taken.
✓ Branch 247 → 251 taken 4 times.
26 allocate(current->vps_profile_tier_level,
934 (current->vps_num_ptls_minus1 + 1) *
935 sizeof(*current->vps_profile_tier_level));
936
4/4
cbs_h266_read_vps:
✓ Branch 231 → 227 taken 44 times.
✓ Branch 231 → 232 taken 22 times.
cbs_h266_write_vps:
✓ Branch 256 → 252 taken 8 times.
✓ Branch 256 → 257 taken 4 times.
78 for (i = 0; i <= current->vps_num_ptls_minus1; i++) {
937
2/4
cbs_h266_read_vps:
✗ Branch 228 → 229 not taken.
✓ Branch 228 → 230 taken 44 times.
cbs_h266_write_vps:
✗ Branch 253 → 254 not taken.
✓ Branch 253 → 255 taken 8 times.
52 CHECK(FUNC(profile_tier_level) (ctx, rw,
938 current->vps_profile_tier_level + i,
939 current->vps_pt_present_flag[i],
940 current->vps_ptl_max_tid[i]));
941 }
942
4/4
cbs_h266_read_vps:
✓ Branch 243 → 233 taken 44 times.
✓ Branch 243 → 244 taken 22 times.
cbs_h266_write_vps:
✓ Branch 272 → 258 taken 8 times.
✓ Branch 272 → 273 taken 4 times.
78 for (i = 0; i < total_num_olss; i++) {
943
2/4
cbs_h266_read_vps:
✓ Branch 233 → 234 taken 44 times.
✗ Branch 233 → 239 not taken.
cbs_h266_write_vps:
✓ Branch 258 → 259 taken 8 times.
✗ Branch 258 → 264 not taken.
52 if (current->vps_num_ptls_minus1 > 0 &&
944
2/4
cbs_h266_read_vps:
✗ Branch 234 → 235 not taken.
✓ Branch 234 → 239 taken 44 times.
cbs_h266_write_vps:
✗ Branch 259 → 260 not taken.
✓ Branch 259 → 264 taken 8 times.
52 current->vps_num_ptls_minus1 + 1 != total_num_olss) {
945
0/4
cbs_h266_read_vps:
✗ Branch 236 → 237 not taken.
✗ Branch 236 → 238 not taken.
cbs_h266_write_vps:
✗ Branch 261 → 262 not taken.
✗ Branch 261 → 263 not taken.
✗ us(8, vps_ols_ptl_idx[i], 0, current->vps_num_ptls_minus1, 1, i);
946
2/4
cbs_h266_read_vps:
✗ Branch 239 → 240 not taken.
✓ Branch 239 → 241 taken 44 times.
cbs_h266_write_vps:
✗ Branch 264 → 265 not taken.
✓ Branch 264 → 268 taken 8 times.
52 } else if (current->vps_num_ptls_minus1 == 0) {
947
0/2
✗ Branch 265 → 266 not taken.
✗ Branch 265 → 271 not taken.
✗ infer(vps_ols_ptl_idx[i], 0);
948 } else {
949
1/2
✗ Branch 268 → 269 not taken.
✓ Branch 268 → 271 taken 8 times.
52 infer(vps_ols_ptl_idx[i], i);
950 }
951 }
952
953
2/4
cbs_h266_read_vps:
✓ Branch 244 → 245 taken 22 times.
✗ Branch 244 → 340 not taken.
cbs_h266_write_vps:
✓ Branch 273 → 274 taken 4 times.
✗ Branch 273 → 385 not taken.
26 if (!current->vps_each_layer_is_an_ols_flag) {
954 uint16_t vps_num_dpb_params;
955
2/4
cbs_h266_read_vps:
✗ Branch 246 → 247 not taken.
✓ Branch 246 → 248 taken 22 times.
cbs_h266_write_vps:
✗ Branch 275 → 276 not taken.
✓ Branch 275 → 277 taken 4 times.
26 ue(vps_num_dpb_params_minus1, 0, num_multi_layer_olss - 1);
956
2/4
cbs_h266_read_vps:
✗ Branch 248 → 249 not taken.
✓ Branch 248 → 250 taken 22 times.
cbs_h266_write_vps:
✗ Branch 277 → 278 not taken.
✓ Branch 277 → 279 taken 4 times.
26 if (current->vps_each_layer_is_an_ols_flag)
957 ✗ vps_num_dpb_params = 0;
958 else
959 26 vps_num_dpb_params = current->vps_num_dpb_params_minus1 + 1;
960
961
4/4
cbs_h266_read_vps:
✓ Branch 251 → 252 taken 5 times.
✓ Branch 251 → 256 taken 17 times.
cbs_h266_write_vps:
✓ Branch 280 → 281 taken 2 times.
✓ Branch 280 → 284 taken 2 times.
26 if (current->vps_max_sublayers_minus1 > 0)
962
2/4
cbs_h266_read_vps:
✗ Branch 253 → 254 not taken.
✓ Branch 253 → 255 taken 5 times.
cbs_h266_write_vps:
✗ Branch 282 → 283 not taken.
✓ Branch 282 → 287 taken 2 times.
7 flag(vps_sublayer_dpb_params_present_flag);
963 else
964
1/2
✗ Branch 284 → 285 not taken.
✓ Branch 284 → 287 taken 2 times.
19 infer(vps_sublayer_dpb_params_present_flag, 0);
965
966
4/4
cbs_h266_read_vps:
✓ Branch 268 → 258 taken 22 times.
✓ Branch 268 → 269 taken 22 times.
cbs_h266_write_vps:
✓ Branch 300 → 288 taken 4 times.
✓ Branch 300 → 301 taken 4 times.
52 for (i = 0; i < vps_num_dpb_params; i++) {
967
4/4
cbs_h266_read_vps:
✓ Branch 258 → 259 taken 5 times.
✓ Branch 258 → 263 taken 17 times.
cbs_h266_write_vps:
✓ Branch 288 → 289 taken 2 times.
✓ Branch 288 → 293 taken 2 times.
26 if (!current->vps_default_ptl_dpb_hrd_max_tid_flag)
968
2/4
cbs_h266_read_vps:
✗ Branch 260 → 261 not taken.
✓ Branch 260 → 262 taken 5 times.
cbs_h266_write_vps:
✗ Branch 290 → 291 not taken.
✓ Branch 290 → 292 taken 2 times.
7 us(3, vps_dpb_max_tid[i], 0, current->vps_max_sublayers_minus1,
969 1, i);
970 else
971
1/2
✗ Branch 293 → 294 not taken.
✓ Branch 293 → 296 taken 2 times.
19 infer(vps_dpb_max_tid[i], current->vps_max_sublayers_minus1);
972
2/4
cbs_h266_read_vps:
✗ Branch 265 → 266 not taken.
✓ Branch 265 → 267 taken 22 times.
cbs_h266_write_vps:
✗ Branch 297 → 298 not taken.
✓ Branch 297 → 299 taken 4 times.
26 CHECK(FUNC(dpb_parameters) (ctx, rw, current->vps_dpb_params + i,
973 current->vps_dpb_max_tid[i],
974 current->
975 vps_sublayer_dpb_params_present_flag));
976 }
977
4/4
cbs_h266_read_vps:
✓ Branch 292 → 270 taken 22 times.
✓ Branch 292 → 293 taken 22 times.
cbs_h266_write_vps:
✓ Branch 328 → 302 taken 4 times.
✓ Branch 328 → 329 taken 4 times.
52 for (i = 0; i < num_multi_layer_olss; i++) {
978
2/4
cbs_h266_read_vps:
✗ Branch 271 → 272 not taken.
✓ Branch 271 → 273 taken 22 times.
cbs_h266_write_vps:
✗ Branch 303 → 304 not taken.
✓ Branch 303 → 305 taken 4 times.
26 ues(vps_ols_dpb_pic_width[i], 0, UINT16_MAX, 1, i);
979
2/4
cbs_h266_read_vps:
✗ Branch 274 → 275 not taken.
✓ Branch 274 → 276 taken 22 times.
cbs_h266_write_vps:
✗ Branch 306 → 307 not taken.
✓ Branch 306 → 308 taken 4 times.
26 ues(vps_ols_dpb_pic_height[i], 0, UINT16_MAX, 1, i);
980
2/4
cbs_h266_read_vps:
✗ Branch 277 → 278 not taken.
✓ Branch 277 → 279 taken 22 times.
cbs_h266_write_vps:
✗ Branch 309 → 310 not taken.
✓ Branch 309 → 311 taken 4 times.
26 ubs(2, vps_ols_dpb_chroma_format[i], 1, i);
981
2/4
cbs_h266_read_vps:
✗ Branch 280 → 281 not taken.
✓ Branch 280 → 282 taken 22 times.
cbs_h266_write_vps:
✗ Branch 312 → 313 not taken.
✓ Branch 312 → 314 taken 4 times.
26 ues(vps_ols_dpb_bitdepth_minus8[i], 0, 8, 1, i);
982
2/4
cbs_h266_read_vps:
✗ Branch 282 → 283 not taken.
✓ Branch 282 → 288 taken 22 times.
cbs_h266_write_vps:
✗ Branch 314 → 315 not taken.
✓ Branch 314 → 320 taken 4 times.
26 if (vps_num_dpb_params > 1
983
0/4
cbs_h266_read_vps:
✗ Branch 283 → 284 not taken.
✗ Branch 283 → 288 not taken.
cbs_h266_write_vps:
✗ Branch 315 → 316 not taken.
✗ Branch 315 → 320 not taken.
✗ && vps_num_dpb_params != num_multi_layer_olss)
984
0/4
cbs_h266_read_vps:
✗ Branch 285 → 286 not taken.
✗ Branch 285 → 287 not taken.
cbs_h266_write_vps:
✗ Branch 317 → 318 not taken.
✗ Branch 317 → 319 not taken.
✗ ues(vps_ols_dpb_params_idx[i], 0, vps_num_dpb_params - 1, 1, i);
985
2/4
cbs_h266_read_vps:
✓ Branch 288 → 289 taken 22 times.
✗ Branch 288 → 290 not taken.
cbs_h266_write_vps:
✓ Branch 320 → 321 taken 4 times.
✗ Branch 320 → 324 not taken.
26 else if (vps_num_dpb_params == 1)
986
1/2
✗ Branch 321 → 322 not taken.
✓ Branch 321 → 327 taken 4 times.
26 infer(vps_ols_dpb_params_idx[i], 0);
987 else
988
0/2
✗ Branch 324 → 325 not taken.
✗ Branch 324 → 327 not taken.
✗ infer(vps_ols_dpb_params_idx[i], i);
989 }
990
2/4
cbs_h266_read_vps:
✗ Branch 294 → 295 not taken.
✓ Branch 294 → 296 taken 22 times.
cbs_h266_write_vps:
✗ Branch 330 → 331 not taken.
✓ Branch 330 → 332 taken 4 times.
26 flag(vps_timing_hrd_params_present_flag);
991
2/4
cbs_h266_read_vps:
✗ Branch 296 → 297 not taken.
✓ Branch 296 → 340 taken 22 times.
cbs_h266_write_vps:
✗ Branch 332 → 333 not taken.
✓ Branch 332 → 385 taken 4 times.
26 if (current->vps_timing_hrd_params_present_flag) {
992
0/4
cbs_h266_read_vps:
✗ Branch 298 → 299 not taken.
✗ Branch 298 → 300 not taken.
cbs_h266_write_vps:
✗ Branch 334 → 335 not taken.
✗ Branch 334 → 336 not taken.
✗ CHECK(FUNC(general_timing_hrd_parameters) (ctx, rw,
993 &current->
994 vps_general_timing_hrd_parameters));
995
0/4
cbs_h266_read_vps:
✗ Branch 300 → 301 not taken.
✗ Branch 300 → 305 not taken.
cbs_h266_write_vps:
✗ Branch 336 → 337 not taken.
✗ Branch 336 → 340 not taken.
✗ if (current->vps_max_sublayers_minus1 > 0)
996
0/4
cbs_h266_read_vps:
✗ Branch 302 → 303 not taken.
✗ Branch 302 → 304 not taken.
cbs_h266_write_vps:
✗ Branch 338 → 339 not taken.
✗ Branch 338 → 343 not taken.
✗ flag(vps_sublayer_cpb_params_present_flag);
997 else
998
0/2
✗ Branch 340 → 341 not taken.
✗ Branch 340 → 343 not taken.
✗ infer(vps_sublayer_cpb_params_present_flag, 0);
999
0/4
cbs_h266_read_vps:
✗ Branch 307 → 308 not taken.
✗ Branch 307 → 309 not taken.
cbs_h266_write_vps:
✗ Branch 344 → 345 not taken.
✗ Branch 344 → 346 not taken.
✗ ue(vps_num_ols_timing_hrd_params_minus1, 0,
1000 num_multi_layer_olss - 1);
1001
0/4
cbs_h266_read_vps:
✗ Branch 323 → 310 not taken.
✗ Branch 323 → 324 not taken.
cbs_h266_write_vps:
✗ Branch 362 → 347 not taken.
✗ Branch 362 → 363 not taken.
✗ for (i = 0; i <= current->vps_num_ols_timing_hrd_params_minus1; i++) {
1002 uint8_t first_sublayer;
1003
0/4
cbs_h266_read_vps:
✗ Branch 310 → 311 not taken.
✗ Branch 310 → 315 not taken.
cbs_h266_write_vps:
✗ Branch 347 → 348 not taken.
✗ Branch 347 → 352 not taken.
✗ if (!current->vps_default_ptl_dpb_hrd_max_tid_flag)
1004
0/4
cbs_h266_read_vps:
✗ Branch 312 → 313 not taken.
✗ Branch 312 → 314 not taken.
cbs_h266_write_vps:
✗ Branch 349 → 350 not taken.
✗ Branch 349 → 351 not taken.
✗ us(3, vps_hrd_max_tid[i], 0,
1005 current->vps_max_sublayers_minus1, 1, i);
1006 else
1007
0/2
✗ Branch 352 → 353 not taken.
✗ Branch 352 → 355 not taken.
✗ infer(vps_hrd_max_tid[i],
1008 current->vps_max_sublayers_minus1);
1009
0/4
cbs_h266_read_vps:
✗ Branch 316 → 317 not taken.
✗ Branch 316 → 318 not taken.
cbs_h266_write_vps:
✗ Branch 355 → 356 not taken.
✗ Branch 355 → 357 not taken.
✗ first_sublayer = current->vps_sublayer_cpb_params_present_flag ?
1010 0 : current->vps_hrd_max_tid[i];
1011
0/4
cbs_h266_read_vps:
✗ Branch 320 → 321 not taken.
✗ Branch 320 → 322 not taken.
cbs_h266_write_vps:
✗ Branch 359 → 360 not taken.
✗ Branch 359 → 361 not taken.
✗ CHECK(FUNC(ols_timing_hrd_parameters)
1012 (ctx, rw, &current->vps_ols_timing_hrd_parameters,
1013 first_sublayer, current->vps_max_sublayers_minus1,
1014 &current->vps_general_timing_hrd_parameters));
1015
1016 }
1017
0/4
cbs_h266_read_vps:
✗ Branch 324 → 325 not taken.
✗ Branch 324 → 333 not taken.
cbs_h266_write_vps:
✗ Branch 363 → 364 not taken.
✗ Branch 363 → 372 not taken.
✗ if (current->vps_num_ols_timing_hrd_params_minus1 > 0 &&
1018
0/4
cbs_h266_read_vps:
✗ Branch 325 → 326 not taken.
✗ Branch 325 → 333 not taken.
cbs_h266_write_vps:
✗ Branch 364 → 365 not taken.
✗ Branch 364 → 372 not taken.
✗ current->vps_num_ols_timing_hrd_params_minus1 + 1 !=
1019 num_multi_layer_olss) {
1020
0/4
cbs_h266_read_vps:
✗ Branch 331 → 327 not taken.
✗ Branch 331 → 332 not taken.
cbs_h266_write_vps:
✗ Branch 370 → 366 not taken.
✗ Branch 370 → 371 not taken.
✗ for (i = 0; i < num_multi_layer_olss; i++) {
1021
0/4
cbs_h266_read_vps:
✗ Branch 328 → 329 not taken.
✗ Branch 328 → 330 not taken.
cbs_h266_write_vps:
✗ Branch 367 → 368 not taken.
✗ Branch 367 → 369 not taken.
✗ ues(vps_ols_timing_hrd_idx[i], 0,
1022 current->vps_num_ols_timing_hrd_params_minus1, 1, i);
1023 }
1024
0/4
cbs_h266_read_vps:
✗ Branch 333 → 334 not taken.
✗ Branch 333 → 337 not taken.
cbs_h266_write_vps:
✗ Branch 372 → 373 not taken.
✗ Branch 372 → 379 not taken.
✗ } else if (current->vps_num_ols_timing_hrd_params_minus1 == 0) {
1025
0/4
cbs_h266_read_vps:
✗ Branch 336 → 335 not taken.
✗ Branch 336 → 340 not taken.
cbs_h266_write_vps:
✗ Branch 378 → 374 not taken.
✗ Branch 378 → 385 not taken.
✗ for (i = 0; i < num_multi_layer_olss; i++)
1026
0/2
✗ Branch 374 → 375 not taken.
✗ Branch 374 → 377 not taken.
✗ infer(vps_ols_timing_hrd_idx[i], 0);
1027 } else {
1028
0/4
cbs_h266_read_vps:
✗ Branch 339 → 338 not taken.
✗ Branch 339 → 340 not taken.
cbs_h266_write_vps:
✗ Branch 384 → 380 not taken.
✗ Branch 384 → 385 not taken.
✗ for (i = 0; i < num_multi_layer_olss; i++)
1029
0/2
✗ Branch 380 → 381 not taken.
✗ Branch 380 → 383 not taken.
✗ infer(vps_ols_timing_hrd_idx[i], i);
1030 }
1031 }
1032 }
1033
1034
2/4
cbs_h266_read_vps:
✗ Branch 341 → 342 not taken.
✓ Branch 341 → 343 taken 22 times.
cbs_h266_write_vps:
✗ Branch 386 → 387 not taken.
✓ Branch 386 → 388 taken 4 times.
26 flag(vps_extension_flag);
1035
2/4
cbs_h266_read_vps:
✗ Branch 343 → 344 not taken.
✓ Branch 343 → 347 taken 22 times.
cbs_h266_write_vps:
✗ Branch 388 → 389 not taken.
✓ Branch 388 → 392 taken 4 times.
26 if (current->vps_extension_flag)
1036
0/4
cbs_h266_read_vps:
✗ Branch 345 → 346 not taken.
✗ Branch 345 → 347 not taken.
cbs_h266_write_vps:
✗ Branch 390 → 391 not taken.
✗ Branch 390 → 392 not taken.
✗ CHECK(FUNC(extension_data) (ctx, rw, &current->extension_data));
1037
2/4
cbs_h266_read_vps:
✗ Branch 348 → 349 not taken.
✓ Branch 348 → 350 taken 22 times.
cbs_h266_write_vps:
✗ Branch 393 → 394 not taken.
✓ Branch 393 → 395 taken 4 times.
26 CHECK(FUNC(rbsp_trailing_bits) (ctx, rw));
1038
1039 26 return 0;
1040 }
1041
1042 ✗ static int FUNC(sps_range_extension)(CodedBitstreamContext *ctx, RWContext *rw,
1043 H266RawSPS *current)
1044 {
1045 int err;
1046
1047
0/4
cbs_h266_read_sps_range_extension:
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 5 not taken.
cbs_h266_write_sps_range_extension:
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 5 not taken.
✗ flag(sps_extended_precision_flag);
1048
0/4
cbs_h266_read_sps_range_extension:
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 10 not taken.
cbs_h266_write_sps_range_extension:
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 9 not taken.
✗ if (current->sps_transform_skip_enabled_flag)
1049
0/4
cbs_h266_read_sps_range_extension:
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
cbs_h266_write_sps_range_extension:
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 12 not taken.
✗ flag(sps_ts_residual_coding_rice_present_in_sh_flag);
1050 else
1051
0/2
✗ Branch 9 → 10 not taken.
✗ Branch 9 → 12 not taken.
✗ infer(sps_ts_residual_coding_rice_present_in_sh_flag, 0);
1052
0/4
cbs_h266_read_sps_range_extension:
✗ Branch 12 → 13 not taken.
✗ Branch 12 → 14 not taken.
cbs_h266_write_sps_range_extension:
✗ Branch 13 → 14 not taken.
✗ Branch 13 → 15 not taken.
✗ flag(sps_rrc_rice_extension_flag);
1053
0/4
cbs_h266_read_sps_range_extension:
✗ Branch 15 → 16 not taken.
✗ Branch 15 → 17 not taken.
cbs_h266_write_sps_range_extension:
✗ Branch 16 → 17 not taken.
✗ Branch 16 → 18 not taken.
✗ flag(sps_persistent_rice_adaptation_enabled_flag);
1054
0/4
cbs_h266_read_sps_range_extension:
✗ Branch 18 → 19 not taken.
✗ Branch 18 → 20 not taken.
cbs_h266_write_sps_range_extension:
✗ Branch 19 → 20 not taken.
✗ Branch 19 → 21 not taken.
✗ flag(sps_reverse_last_sig_coeff_enabled_flag);
1055
1056 ✗ return 0;
1057 }
1058
1059 1308 static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
1060 H266RawSPS *current)
1061 {
1062 1308 CodedBitstreamH266Context *h266 = ctx->priv_data;
1063 int err, i, j, max_width_minus1, max_height_minus1;
1064 unsigned int ctb_log2_size_y, min_cb_log2_size_y,
1065 min_qt_log2_size_intra_y, min_qt_log2_size_inter_y,
1066 ctb_size_y, max_num_merge_cand, tmp_width_val, tmp_height_val;
1067 uint8_t qp_bd_offset, sub_width_c, sub_height_c;
1068
1069 static const uint8_t h266_sub_width_c[] = {
1070 1, 2, 2, 1
1071 };
1072 static const uint8_t h266_sub_height_c[] = {
1073 1, 2, 1, 1
1074 };
1075
1076 1308 HEADER("Sequence Parameter Set");
1077
1078
2/4
cbs_h266_read_sps:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 973 times.
cbs_h266_write_sps:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 335 times.
1308 CHECK(FUNC(nal_unit_header) (ctx, rw,
1079 &current->nal_unit_header, VVC_SPS_NUT));
1080
1081
2/4
cbs_h266_read_sps:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 973 times.
cbs_h266_write_sps:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 335 times.
1308 ub(4, sps_seq_parameter_set_id);
1082
2/4
cbs_h266_read_sps:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 973 times.
cbs_h266_write_sps:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 335 times.
1308 ub(4, sps_video_parameter_set_id);
1083
8/8
cbs_h266_read_sps:
✓ Branch 12 → 13 taken 944 times.
✓ Branch 12 → 18 taken 29 times.
✓ Branch 13 → 14 taken 193 times.
✓ Branch 13 → 18 taken 751 times.
cbs_h266_write_sps:
✓ Branch 12 → 13 taken 329 times.
✓ Branch 12 → 18 taken 6 times.
✓ Branch 13 → 14 taken 24 times.
✓ Branch 13 → 18 taken 305 times.
1308 if (current->sps_video_parameter_set_id == 0 && !h266->vps[0]) {
1084 217 H266RawVPS *vps = av_refstruct_allocz(sizeof(*vps));
1085
2/4
cbs_h266_read_sps:
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 17 taken 193 times.
cbs_h266_write_sps:
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 17 taken 24 times.
217 if (!vps)
1086 ✗ return AVERROR(ENOMEM);
1087 217 vps->vps_max_layers_minus1 = 0;
1088 217 vps->vps_independent_layer_flag[0] = 1;
1089 217 vps->vps_layer_id[0] = current->nal_unit_header.nuh_layer_id;
1090 217 h266->vps[0] = vps;
1091 }
1092
1093
2/4
cbs_h266_read_sps:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 973 times.
cbs_h266_write_sps:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 335 times.
1308 u(3, sps_max_sublayers_minus1, 0, VVC_MAX_SUBLAYERS - 1);
1094
2/4
cbs_h266_read_sps:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 24 taken 973 times.
cbs_h266_write_sps:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 24 taken 335 times.
1308 u(2, sps_chroma_format_idc, 0, 3);
1095 1308 sub_width_c = h266_sub_width_c[current->sps_chroma_format_idc];
1096 1308 sub_height_c = h266_sub_height_c[current->sps_chroma_format_idc];
1097
1098
2/4
cbs_h266_read_sps:
✗ Branch 25 → 26 not taken.
✓ Branch 25 → 27 taken 973 times.
cbs_h266_write_sps:
✗ Branch 25 → 26 not taken.
✓ Branch 25 → 27 taken 335 times.
1308 u(2, sps_log2_ctu_size_minus5, 0, 3);
1099 1308 ctb_log2_size_y = current->sps_log2_ctu_size_minus5 + 5;
1100 1308 ctb_size_y = 1 << ctb_log2_size_y;
1101
1102
2/4
cbs_h266_read_sps:
✗ Branch 28 → 29 not taken.
✓ Branch 28 → 30 taken 973 times.
cbs_h266_write_sps:
✗ Branch 28 → 29 not taken.
✓ Branch 28 → 30 taken 335 times.
1308 flag(sps_ptl_dpb_hrd_params_present_flag);
1103
2/4
cbs_h266_read_sps:
✓ Branch 30 → 31 taken 973 times.
✗ Branch 30 → 34 not taken.
cbs_h266_write_sps:
✓ Branch 30 → 31 taken 335 times.
✗ Branch 30 → 34 not taken.
1308 if (current->sps_ptl_dpb_hrd_params_present_flag) {
1104
2/4
cbs_h266_read_sps:
✗ Branch 32 → 33 not taken.
✓ Branch 32 → 34 taken 973 times.
cbs_h266_write_sps:
✗ Branch 32 → 33 not taken.
✓ Branch 32 → 34 taken 335 times.
1308 CHECK(FUNC(profile_tier_level) (ctx, rw, &current->profile_tier_level,
1105 1, current->sps_max_sublayers_minus1));
1106 }
1107
2/4
cbs_h266_read_sps:
✗ Branch 35 → 36 not taken.
✓ Branch 35 → 37 taken 973 times.
cbs_h266_write_sps:
✗ Branch 35 → 36 not taken.
✓ Branch 35 → 37 taken 335 times.
1308 flag(sps_gdr_enabled_flag);
1108
2/4
cbs_h266_read_sps:
✗ Branch 38 → 39 not taken.
✓ Branch 38 → 40 taken 973 times.
cbs_h266_write_sps:
✗ Branch 38 → 39 not taken.
✓ Branch 38 → 40 taken 335 times.
1308 flag(sps_ref_pic_resampling_enabled_flag);
1109
3/4
cbs_h266_read_sps:
✓ Branch 40 → 41 taken 940 times.
✓ Branch 40 → 45 taken 33 times.
cbs_h266_write_sps:
✓ Branch 40 → 41 taken 335 times.
✗ Branch 40 → 44 not taken.
1308 if (current->sps_ref_pic_resampling_enabled_flag)
1110
2/4
cbs_h266_read_sps:
✗ Branch 42 → 43 not taken.
✓ Branch 42 → 44 taken 940 times.
cbs_h266_write_sps:
✗ Branch 42 → 43 not taken.
✓ Branch 42 → 47 taken 335 times.
1275 flag(sps_res_change_in_clvs_allowed_flag);
1111 else
1112
0/2
✗ Branch 44 → 45 not taken.
✗ Branch 44 → 47 not taken.
33 infer(sps_res_change_in_clvs_allowed_flag, 0);
1113
1114
2/4
cbs_h266_read_sps:
✗ Branch 47 → 48 not taken.
✓ Branch 47 → 49 taken 973 times.
cbs_h266_write_sps:
✗ Branch 48 → 49 not taken.
✓ Branch 48 → 50 taken 335 times.
1308 ue(sps_pic_width_max_in_luma_samples, 1, VVC_MAX_WIDTH);
1115
2/4
cbs_h266_read_sps:
✗ Branch 50 → 51 not taken.
✓ Branch 50 → 52 taken 973 times.
cbs_h266_write_sps:
✗ Branch 51 → 52 not taken.
✓ Branch 51 → 53 taken 335 times.
1308 ue(sps_pic_height_max_in_luma_samples, 1, VVC_MAX_HEIGHT);
1116
1117
2/4
cbs_h266_read_sps:
✗ Branch 53 → 54 not taken.
✓ Branch 53 → 55 taken 973 times.
cbs_h266_write_sps:
✗ Branch 54 → 55 not taken.
✓ Branch 54 → 56 taken 335 times.
1308 flag(sps_conformance_window_flag);
1118
4/4
cbs_h266_read_sps:
✓ Branch 55 → 56 taken 33 times.
✓ Branch 55 → 69 taken 940 times.
cbs_h266_write_sps:
✓ Branch 56 → 57 taken 3 times.
✓ Branch 56 → 70 taken 332 times.
1308 if (current->sps_conformance_window_flag) {
1119 36 uint16_t max_offsets_x = (current->sps_pic_width_max_in_luma_samples - 1) / sub_width_c;
1120 36 uint16_t max_offsets_y = (current->sps_pic_height_max_in_luma_samples - 1) / sub_height_c;
1121
2/4
cbs_h266_read_sps:
✗ Branch 57 → 58 not taken.
✓ Branch 57 → 59 taken 33 times.
cbs_h266_write_sps:
✗ Branch 58 → 59 not taken.
✓ Branch 58 → 60 taken 3 times.
36 ue(sps_conf_win_left_offset, 0, max_offsets_x);
1122
2/4
cbs_h266_read_sps:
✗ Branch 60 → 61 not taken.
✓ Branch 60 → 62 taken 33 times.
cbs_h266_write_sps:
✗ Branch 61 → 62 not taken.
✓ Branch 61 → 63 taken 3 times.
36 ue(sps_conf_win_right_offset, 0, max_offsets_x - current->sps_conf_win_left_offset);
1123
2/4
cbs_h266_read_sps:
✗ Branch 63 → 64 not taken.
✓ Branch 63 → 65 taken 33 times.
cbs_h266_write_sps:
✗ Branch 64 → 65 not taken.
✓ Branch 64 → 66 taken 3 times.
36 ue(sps_conf_win_top_offset, 0, max_offsets_y);
1124
2/4
cbs_h266_read_sps:
✗ Branch 66 → 67 not taken.
✓ Branch 66 → 68 taken 33 times.
cbs_h266_write_sps:
✗ Branch 67 → 68 not taken.
✓ Branch 67 → 69 taken 3 times.
36 ue(sps_conf_win_bottom_offset, 0, max_offsets_y - current->sps_conf_win_top_offset);
1125 } else {
1126
1/2
✗ Branch 70 → 71 not taken.
✓ Branch 70 → 73 taken 332 times.
1272 infer(sps_conf_win_left_offset, 0);
1127
1/2
✗ Branch 73 → 74 not taken.
✓ Branch 73 → 76 taken 332 times.
1272 infer(sps_conf_win_right_offset, 0);
1128
1/2
✗ Branch 76 → 77 not taken.
✓ Branch 76 → 79 taken 332 times.
1272 infer(sps_conf_win_top_offset, 0);
1129
1/2
✗ Branch 79 → 80 not taken.
✓ Branch 79 → 82 taken 332 times.
1272 infer(sps_conf_win_bottom_offset, 0);
1130 }
1131
1132 1308 tmp_width_val = AV_CEIL_RSHIFT(current->sps_pic_width_max_in_luma_samples,
1133 ctb_log2_size_y);
1134 1308 tmp_height_val = AV_CEIL_RSHIFT(current->sps_pic_height_max_in_luma_samples,
1135 ctb_log2_size_y);
1136 1308 max_width_minus1 = tmp_width_val - 1;
1137 1308 max_height_minus1 = tmp_height_val - 1;
1138
1139
2/4
cbs_h266_read_sps:
✗ Branch 71 → 72 not taken.
✓ Branch 71 → 73 taken 973 times.
cbs_h266_write_sps:
✗ Branch 83 → 84 not taken.
✓ Branch 83 → 85 taken 335 times.
1308 u(1, sps_subpic_info_present_flag, 0, !current->sps_res_change_in_clvs_allowed_flag);
1140
4/4
cbs_h266_read_sps:
✓ Branch 73 → 74 taken 32 times.
✓ Branch 73 → 173 taken 941 times.
cbs_h266_write_sps:
✓ Branch 85 → 86 taken 5 times.
✓ Branch 85 → 234 taken 330 times.
1308 if (current->sps_subpic_info_present_flag) {
1141
2/4
cbs_h266_read_sps:
✗ Branch 75 → 76 not taken.
✓ Branch 75 → 77 taken 32 times.
cbs_h266_write_sps:
✗ Branch 87 → 88 not taken.
✓ Branch 87 → 89 taken 5 times.
37 ue(sps_num_subpics_minus1, 0, VVC_MAX_SLICES - 1);
1142
2/4
cbs_h266_read_sps:
✓ Branch 77 → 78 taken 32 times.
✗ Branch 77 → 85 not taken.
cbs_h266_write_sps:
✓ Branch 89 → 90 taken 5 times.
✗ Branch 89 → 96 not taken.
37 if (current->sps_num_subpics_minus1 > 0) {
1143
2/4
cbs_h266_read_sps:
✗ Branch 79 → 80 not taken.
✓ Branch 79 → 81 taken 32 times.
cbs_h266_write_sps:
✗ Branch 91 → 92 not taken.
✓ Branch 91 → 93 taken 5 times.
37 flag(sps_independent_subpics_flag);
1144
2/4
cbs_h266_read_sps:
✗ Branch 82 → 83 not taken.
✓ Branch 82 → 84 taken 32 times.
cbs_h266_write_sps:
✗ Branch 94 → 95 not taken.
✓ Branch 94 → 96 taken 5 times.
37 flag(sps_subpic_same_size_flag);
1145 }
1146
1147
2/4
cbs_h266_read_sps:
✓ Branch 85 → 86 taken 32 times.
✗ Branch 85 → 152 not taken.
cbs_h266_write_sps:
✓ Branch 96 → 97 taken 5 times.
✗ Branch 96 → 202 not taken.
37 if (current->sps_num_subpics_minus1 > 0) {
1148 37 int wlen = av_ceil_log2(tmp_width_val);
1149 37 int hlen = av_ceil_log2(tmp_height_val);
1150
1/2
✗ Branch 97 → 98 not taken.
✓ Branch 97 → 100 taken 5 times.
37 infer(sps_subpic_ctu_top_left_x[0], 0);
1151
1/2
✗ Branch 100 → 101 not taken.
✓ Branch 100 → 103 taken 5 times.
37 infer(sps_subpic_ctu_top_left_y[0], 0);
1152
2/4
cbs_h266_read_sps:
✓ Branch 86 → 87 taken 32 times.
✗ Branch 86 → 91 not taken.
cbs_h266_write_sps:
✓ Branch 103 → 104 taken 5 times.
✗ Branch 103 → 108 not taken.
37 if (current->sps_pic_width_max_in_luma_samples > ctb_size_y)
1153
2/4
cbs_h266_read_sps:
✗ Branch 88 → 89 not taken.
✓ Branch 88 → 90 taken 32 times.
cbs_h266_write_sps:
✗ Branch 105 → 106 not taken.
✓ Branch 105 → 107 taken 5 times.
37 us(wlen, sps_subpic_width_minus1[0], 0, max_width_minus1, 1, 0);
1154 else
1155
0/2
✗ Branch 108 → 109 not taken.
✗ Branch 108 → 111 not taken.
✗ infer(sps_subpic_width_minus1[0], max_width_minus1);
1156
2/4
cbs_h266_read_sps:
✓ Branch 92 → 93 taken 32 times.
✗ Branch 92 → 97 not taken.
cbs_h266_write_sps:
✓ Branch 111 → 112 taken 5 times.
✗ Branch 111 → 116 not taken.
37 if (current->sps_pic_height_max_in_luma_samples > ctb_size_y)
1157
2/4
cbs_h266_read_sps:
✗ Branch 94 → 95 not taken.
✓ Branch 94 → 96 taken 32 times.
cbs_h266_write_sps:
✗ Branch 113 → 114 not taken.
✓ Branch 113 → 115 taken 5 times.
37 us(hlen, sps_subpic_height_minus1[0], 0, max_height_minus1, 1, 0);
1158 else
1159
0/2
✗ Branch 116 → 117 not taken.
✗ Branch 116 → 119 not taken.
✗ infer(sps_subpic_height_minus1[0], max_height_minus1);
1160
2/4
cbs_h266_read_sps:
✓ Branch 98 → 99 taken 32 times.
✗ Branch 98 → 106 not taken.
cbs_h266_write_sps:
✓ Branch 119 → 120 taken 5 times.
✗ Branch 119 → 127 not taken.
37 if (!current->sps_independent_subpics_flag) {
1161
2/4
cbs_h266_read_sps:
✗ Branch 100 → 101 not taken.
✓ Branch 100 → 102 taken 32 times.
cbs_h266_write_sps:
✗ Branch 121 → 122 not taken.
✓ Branch 121 → 123 taken 5 times.
37 flags(sps_subpic_treated_as_pic_flag[0], 1, 0);
1162
2/4
cbs_h266_read_sps:
✗ Branch 103 → 104 not taken.
✓ Branch 103 → 105 taken 32 times.
cbs_h266_write_sps:
✗ Branch 124 → 125 not taken.
✓ Branch 124 → 126 taken 5 times.
37 flags(sps_loop_filter_across_subpic_enabled_flag[0], 1, 0);
1163 } else {
1164
0/2
✗ Branch 127 → 128 not taken.
✗ Branch 127 → 130 not taken.
✗ infer(sps_subpic_treated_as_pic_flag[0], 1);
1165
0/2
✗ Branch 130 → 131 not taken.
✗ Branch 130 → 133 not taken.
✗ infer(sps_loop_filter_across_subpic_enabled_flag[0], 1);
1166 }
1167
4/4
cbs_h266_read_sps:
✓ Branch 151 → 108 taken 133 times.
✓ Branch 151 → 153 taken 32 times.
cbs_h266_write_sps:
✓ Branch 201 → 134 taken 20 times.
✓ Branch 201 → 214 taken 5 times.
190 for (i = 1; i <= current->sps_num_subpics_minus1; i++) {
1168
3/4
cbs_h266_read_sps:
✓ Branch 108 → 109 taken 98 times.
✓ Branch 108 → 136 taken 35 times.
cbs_h266_write_sps:
✓ Branch 134 → 135 taken 20 times.
✗ Branch 134 → 170 not taken.
153 if (!current->sps_subpic_same_size_flag) {
1169 118 const int win_right_edge =
1170 118 current->sps_pic_width_max_in_luma_samples -
1171 118 current->sps_conf_win_right_offset * sub_width_c;
1172 118 const int win_bottom_edge =
1173 118 current->sps_pic_height_max_in_luma_samples -
1174 118 current->sps_conf_win_bottom_offset * sub_height_c;
1175 118 const int win_left_edge =
1176 118 current->sps_conf_win_left_offset * sub_width_c;
1177 118 const int win_top_edge =
1178 118 current->sps_conf_win_top_offset * sub_height_c;
1179 118 const int win_left_edge_ctus =
1180 118 AV_CEIL_RSHIFT(win_left_edge, ctb_log2_size_y);
1181 118 const int win_right_edge_ctus =
1182 118 AV_CEIL_RSHIFT(win_right_edge, ctb_log2_size_y);
1183 118 const int win_top_edge_ctus =
1184 118 AV_CEIL_RSHIFT(win_top_edge, ctb_log2_size_y);
1185 118 const int win_bottom_edge_ctus =
1186 118 AV_CEIL_RSHIFT(win_bottom_edge, ctb_log2_size_y);
1187 118 const int min_width =
1188 118 FFMAX(win_left_edge_ctus - current->sps_subpic_ctu_top_left_x[i], 0);
1189 118 const int min_height =
1190 118 FFMAX(win_top_edge_ctus - current->sps_subpic_ctu_top_left_y[i], 0);
1191
1192
2/4
cbs_h266_read_sps:
✓ Branch 109 → 110 taken 98 times.
✗ Branch 109 → 114 not taken.
cbs_h266_write_sps:
✓ Branch 135 → 136 taken 20 times.
✗ Branch 135 → 140 not taken.
118 if (current->sps_pic_width_max_in_luma_samples > ctb_size_y)
1193
2/4
cbs_h266_read_sps:
✗ Branch 111 → 112 not taken.
✓ Branch 111 → 113 taken 98 times.
cbs_h266_write_sps:
✗ Branch 137 → 138 not taken.
✓ Branch 137 → 139 taken 20 times.
118 us(wlen, sps_subpic_ctu_top_left_x[i], 0, win_right_edge_ctus - 1, 1, i);
1194 else
1195
0/2
✗ Branch 140 → 141 not taken.
✗ Branch 140 → 143 not taken.
✗ infer(sps_subpic_ctu_top_left_x[i], 0);
1196
1197
2/4
cbs_h266_read_sps:
✓ Branch 115 → 116 taken 98 times.
✗ Branch 115 → 120 not taken.
cbs_h266_write_sps:
✓ Branch 143 → 144 taken 20 times.
✗ Branch 143 → 148 not taken.
118 if (current->sps_pic_height_max_in_luma_samples > ctb_size_y)
1198
2/4
cbs_h266_read_sps:
✗ Branch 117 → 118 not taken.
✓ Branch 117 → 119 taken 98 times.
cbs_h266_write_sps:
✗ Branch 145 → 146 not taken.
✓ Branch 145 → 147 taken 20 times.
118 us(hlen, sps_subpic_ctu_top_left_y[i], 0, win_bottom_edge_ctus - 1, 1, i);
1199 else
1200
0/2
✗ Branch 148 → 149 not taken.
✗ Branch 148 → 151 not taken.
✗ infer(sps_subpic_ctu_top_left_y[i], 0);
1201
1202 118 max_width_minus1 = tmp_width_val - current->sps_subpic_ctu_top_left_x[i] - 1;
1203 118 max_height_minus1 = tmp_height_val - current->sps_subpic_ctu_top_left_y[i] - 1;
1204
1205
4/4
cbs_h266_read_sps:
✓ Branch 121 → 122 taken 71 times.
✓ Branch 121 → 127 taken 27 times.
cbs_h266_write_sps:
✓ Branch 151 → 152 taken 15 times.
✓ Branch 151 → 157 taken 5 times.
118 if (i < current->sps_num_subpics_minus1 &&
1206
2/4
cbs_h266_read_sps:
✓ Branch 122 → 123 taken 71 times.
✗ Branch 122 → 127 not taken.
cbs_h266_write_sps:
✓ Branch 152 → 153 taken 15 times.
✗ Branch 152 → 157 not taken.
86 current->sps_pic_width_max_in_luma_samples > ctb_size_y) {
1207
2/4
cbs_h266_read_sps:
✗ Branch 124 → 125 not taken.
✓ Branch 124 → 126 taken 71 times.
cbs_h266_write_sps:
✗ Branch 154 → 155 not taken.
✓ Branch 154 → 156 taken 15 times.
86 us(wlen, sps_subpic_width_minus1[i], min_width, max_width_minus1, 1, i);
1208 } else {
1209
1/2
✗ Branch 157 → 158 not taken.
✓ Branch 157 → 160 taken 5 times.
32 infer(sps_subpic_width_minus1[i], max_width_minus1);
1210 }
1211
1212
4/4
cbs_h266_read_sps:
✓ Branch 128 → 129 taken 71 times.
✓ Branch 128 → 134 taken 27 times.
cbs_h266_write_sps:
✓ Branch 160 → 161 taken 15 times.
✓ Branch 160 → 166 taken 5 times.
118 if (i < current->sps_num_subpics_minus1 &&
1213
2/4
cbs_h266_read_sps:
✓ Branch 129 → 130 taken 71 times.
✗ Branch 129 → 134 not taken.
cbs_h266_write_sps:
✓ Branch 161 → 162 taken 15 times.
✗ Branch 161 → 166 not taken.
86 current->sps_pic_height_max_in_luma_samples > ctb_size_y) {
1214
2/4
cbs_h266_read_sps:
✗ Branch 131 → 132 not taken.
✓ Branch 131 → 133 taken 71 times.
cbs_h266_write_sps:
✗ Branch 163 → 164 not taken.
✓ Branch 163 → 165 taken 15 times.
86 us(hlen, sps_subpic_height_minus1[i], min_height, max_height_minus1, 1, i);
1215 } else {
1216
1/2
✗ Branch 166 → 167 not taken.
✓ Branch 166 → 169 taken 5 times.
32 infer(sps_subpic_height_minus1[i], max_height_minus1);
1217 }
1218 } else {
1219 35 int num_subpic_cols = tmp_width_val /
1220 35 (current->sps_subpic_width_minus1[0] + 1);
1221
1/4
cbs_h266_read_sps:
✓ Branch 136 → 137 taken 35 times.
✗ Branch 136 → 139 not taken.
cbs_h266_write_sps:
✗ Branch 170 → 171 not taken.
✗ Branch 170 → 173 not taken.
35 if (tmp_width_val % (current->sps_subpic_width_minus1[0] + 1) ||
1222
1/4
cbs_h266_read_sps:
✓ Branch 137 → 138 taken 35 times.
✗ Branch 137 → 139 not taken.
cbs_h266_write_sps:
✗ Branch 171 → 172 not taken.
✗ Branch 171 → 173 not taken.
35 tmp_height_val % (current->sps_subpic_height_minus1[0] + 1) ||
1223 35 current->sps_num_subpics_minus1 !=
1224 35 (num_subpic_cols * tmp_height_val /
1225
1/4
cbs_h266_read_sps:
✗ Branch 138 → 139 not taken.
✓ Branch 138 → 140 taken 35 times.
cbs_h266_write_sps:
✗ Branch 172 → 173 not taken.
✗ Branch 172 → 174 not taken.
35 (current->sps_subpic_height_minus1[0] + 1) - 1))
1226 ✗ return AVERROR_INVALIDDATA;
1227
0/2
✗ Branch 174 → 175 not taken.
✗ Branch 174 → 177 not taken.
35 infer(sps_subpic_ctu_top_left_x[i],
1228 (i % num_subpic_cols) *
1229 (current->sps_subpic_width_minus1[0] + 1));
1230
0/2
✗ Branch 177 → 178 not taken.
✗ Branch 177 → 180 not taken.
35 infer(sps_subpic_ctu_top_left_y[i],
1231 (i / num_subpic_cols) *
1232 (current->sps_subpic_height_minus1[0] + 1));
1233
0/2
✗ Branch 180 → 181 not taken.
✗ Branch 180 → 183 not taken.
35 infer(sps_subpic_width_minus1[i],
1234 current->sps_subpic_width_minus1[0]);
1235
0/2
✗ Branch 183 → 184 not taken.
✗ Branch 183 → 186 not taken.
35 infer(sps_subpic_height_minus1[i],
1236 current->sps_subpic_height_minus1[0]);
1237 }
1238
2/4
cbs_h266_read_sps:
✓ Branch 141 → 142 taken 133 times.
✗ Branch 141 → 149 not taken.
cbs_h266_write_sps:
✓ Branch 186 → 187 taken 20 times.
✗ Branch 186 → 194 not taken.
153 if (!current->sps_independent_subpics_flag) {
1239
2/4
cbs_h266_read_sps:
✗ Branch 143 → 144 not taken.
✓ Branch 143 → 145 taken 133 times.
cbs_h266_write_sps:
✗ Branch 188 → 189 not taken.
✓ Branch 188 → 190 taken 20 times.
153 flags(sps_subpic_treated_as_pic_flag[i], 1, i);
1240
2/4
cbs_h266_read_sps:
✗ Branch 146 → 147 not taken.
✓ Branch 146 → 148 taken 133 times.
cbs_h266_write_sps:
✗ Branch 191 → 192 not taken.
✓ Branch 191 → 193 taken 20 times.
153 flags(sps_loop_filter_across_subpic_enabled_flag[i], 1, i);
1241 } else {
1242
0/2
✗ Branch 194 → 195 not taken.
✗ Branch 194 → 197 not taken.
✗ infer(sps_subpic_treated_as_pic_flag[i], 1);
1243
0/2
✗ Branch 197 → 198 not taken.
✗ Branch 197 → 200 not taken.
✗ infer(sps_loop_filter_across_subpic_enabled_flag[i], 0);
1244 }
1245 }
1246 } else {
1247
0/2
✗ Branch 202 → 203 not taken.
✗ Branch 202 → 205 not taken.
✗ infer(sps_subpic_ctu_top_left_x[0], 0);
1248
0/2
✗ Branch 205 → 206 not taken.
✗ Branch 205 → 208 not taken.
✗ infer(sps_subpic_ctu_top_left_y[0], 0);
1249
0/2
✗ Branch 208 → 209 not taken.
✗ Branch 208 → 211 not taken.
✗ infer(sps_subpic_width_minus1[0], max_width_minus1);
1250
0/2
✗ Branch 211 → 212 not taken.
✗ Branch 211 → 214 not taken.
✗ infer(sps_subpic_height_minus1[0], max_height_minus1);
1251 }
1252
2/4
cbs_h266_read_sps:
✗ Branch 154 → 155 not taken.
✓ Branch 154 → 156 taken 32 times.
cbs_h266_write_sps:
✗ Branch 215 → 216 not taken.
✓ Branch 215 → 217 taken 5 times.
37 ue(sps_subpic_id_len_minus1, 0, 15);
1253 37 if ((1 << (current->sps_subpic_id_len_minus1 + 1)) <
1254
2/4
cbs_h266_read_sps:
✗ Branch 156 → 157 not taken.
✓ Branch 156 → 159 taken 32 times.
cbs_h266_write_sps:
✗ Branch 217 → 218 not taken.
✓ Branch 217 → 220 taken 5 times.
37 current->sps_num_subpics_minus1 + 1) {
1255 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
1256 "sps_subpic_id_len_minus1(%d) is too small\n",
1257 ✗ current->sps_subpic_id_len_minus1);
1258 ✗ return AVERROR_INVALIDDATA;
1259 }
1260
2/4
cbs_h266_read_sps:
✗ Branch 160 → 161 not taken.
✓ Branch 160 → 162 taken 32 times.
cbs_h266_write_sps:
✗ Branch 221 → 222 not taken.
✓ Branch 221 → 223 taken 5 times.
37 flag(sps_subpic_id_mapping_explicitly_signalled_flag);
1261
3/4
cbs_h266_read_sps:
✓ Branch 162 → 163 taken 22 times.
✓ Branch 162 → 174 taken 10 times.
cbs_h266_write_sps:
✓ Branch 223 → 224 taken 5 times.
✗ Branch 223 → 258 not taken.
37 if (current->sps_subpic_id_mapping_explicitly_signalled_flag) {
1262
2/4
cbs_h266_read_sps:
✗ Branch 164 → 165 not taken.
✓ Branch 164 → 166 taken 22 times.
cbs_h266_write_sps:
✗ Branch 225 → 226 not taken.
✓ Branch 225 → 227 taken 5 times.
27 flag(sps_subpic_id_mapping_present_flag);
1263
4/4
cbs_h266_read_sps:
✓ Branch 166 → 167 taken 8 times.
✓ Branch 166 → 174 taken 14 times.
cbs_h266_write_sps:
✓ Branch 227 → 228 taken 2 times.
✓ Branch 227 → 258 taken 3 times.
27 if (current->sps_subpic_id_mapping_present_flag) {
1264
4/4
cbs_h266_read_sps:
✓ Branch 172 → 168 taken 40 times.
✓ Branch 172 → 174 taken 8 times.
cbs_h266_write_sps:
✓ Branch 233 → 229 taken 10 times.
✓ Branch 233 → 258 taken 2 times.
60 for (i = 0; i <= current->sps_num_subpics_minus1; i++) {
1265
2/4
cbs_h266_read_sps:
✗ Branch 169 → 170 not taken.
✓ Branch 169 → 171 taken 40 times.
cbs_h266_write_sps:
✗ Branch 230 → 231 not taken.
✓ Branch 230 → 232 taken 10 times.
50 ubs(current->sps_subpic_id_len_minus1 + 1,
1266 sps_subpic_id[i], 1, i);
1267 }
1268 }
1269 }
1270 } else {
1271
1/2
✗ Branch 234 → 235 not taken.
✓ Branch 234 → 237 taken 330 times.
1271 infer(sps_num_subpics_minus1, 0);
1272
1/2
✗ Branch 237 → 238 not taken.
✓ Branch 237 → 240 taken 330 times.
1271 infer(sps_independent_subpics_flag, 1);
1273
1/2
✗ Branch 240 → 241 not taken.
✓ Branch 240 → 243 taken 330 times.
1271 infer(sps_subpic_same_size_flag, 0);
1274
1/2
✗ Branch 243 → 244 not taken.
✓ Branch 243 → 246 taken 330 times.
1271 infer(sps_subpic_id_mapping_explicitly_signalled_flag, 0);
1275
1/2
✗ Branch 246 → 247 not taken.
✓ Branch 246 → 249 taken 330 times.
1271 infer(sps_subpic_ctu_top_left_x[0], 0);
1276
1/2
✗ Branch 249 → 250 not taken.
✓ Branch 249 → 252 taken 330 times.
1271 infer(sps_subpic_ctu_top_left_y[0], 0);
1277
1/2
✗ Branch 252 → 253 not taken.
✓ Branch 252 → 255 taken 330 times.
1271 infer(sps_subpic_width_minus1[0], max_width_minus1);
1278
1/2
✗ Branch 255 → 256 not taken.
✓ Branch 255 → 258 taken 330 times.
1271 infer(sps_subpic_height_minus1[0], max_height_minus1);
1279 }
1280
1281
1282
2/4
cbs_h266_read_sps:
✗ Branch 175 → 176 not taken.
✓ Branch 175 → 177 taken 973 times.
cbs_h266_write_sps:
✗ Branch 259 → 260 not taken.
✓ Branch 259 → 261 taken 335 times.
1308 ue(sps_bitdepth_minus8, 0, 8);
1283 1308 qp_bd_offset = 6 * current->sps_bitdepth_minus8;
1284
1285
2/4
cbs_h266_read_sps:
✗ Branch 178 → 179 not taken.
✓ Branch 178 → 180 taken 973 times.
cbs_h266_write_sps:
✗ Branch 262 → 263 not taken.
✓ Branch 262 → 264 taken 335 times.
1308 flag(sps_entropy_coding_sync_enabled_flag);
1286
2/4
cbs_h266_read_sps:
✗ Branch 181 → 182 not taken.
✓ Branch 181 → 183 taken 973 times.
cbs_h266_write_sps:
✗ Branch 265 → 266 not taken.
✓ Branch 265 → 267 taken 335 times.
1308 flag(sps_entry_point_offsets_present_flag);
1287
1288
2/4
cbs_h266_read_sps:
✗ Branch 184 → 185 not taken.
✓ Branch 184 → 186 taken 973 times.
cbs_h266_write_sps:
✗ Branch 268 → 269 not taken.
✓ Branch 268 → 270 taken 335 times.
1308 u(4, sps_log2_max_pic_order_cnt_lsb_minus4, 0, 12);
1289
2/4
cbs_h266_read_sps:
✗ Branch 187 → 188 not taken.
✓ Branch 187 → 189 taken 973 times.
cbs_h266_write_sps:
✗ Branch 271 → 272 not taken.
✓ Branch 271 → 273 taken 335 times.
1308 flag(sps_poc_msb_cycle_flag);
1290
4/4
cbs_h266_read_sps:
✓ Branch 189 → 190 taken 14 times.
✓ Branch 189 → 194 taken 959 times.
cbs_h266_write_sps:
✓ Branch 273 → 274 taken 3 times.
✓ Branch 273 → 278 taken 332 times.
1308 if (current->sps_poc_msb_cycle_flag)
1291
2/4
cbs_h266_read_sps:
✗ Branch 191 → 192 not taken.
✓ Branch 191 → 193 taken 14 times.
cbs_h266_write_sps:
✗ Branch 275 → 276 not taken.
✓ Branch 275 → 277 taken 3 times.
17 ue(sps_poc_msb_cycle_len_minus1,
1292 0, 32 - current->sps_log2_max_pic_order_cnt_lsb_minus4 - 5);
1293
1294
2/4
cbs_h266_read_sps:
✗ Branch 195 → 196 not taken.
✓ Branch 195 → 197 taken 973 times.
cbs_h266_write_sps:
✗ Branch 279 → 280 not taken.
✓ Branch 279 → 281 taken 335 times.
1308 u(2, sps_num_extra_ph_bytes, 0, 2);
1295
2/4
cbs_h266_read_sps:
✗ Branch 202 → 198 not taken.
✓ Branch 202 → 203 taken 973 times.
cbs_h266_write_sps:
✗ Branch 286 → 282 not taken.
✓ Branch 286 → 287 taken 335 times.
1308 for (i = 0; i < (current->sps_num_extra_ph_bytes * 8); i++) {
1296
0/4
cbs_h266_read_sps:
✗ Branch 199 → 200 not taken.
✗ Branch 199 → 201 not taken.
cbs_h266_write_sps:
✗ Branch 283 → 284 not taken.
✗ Branch 283 → 285 not taken.
✗ flags(sps_extra_ph_bit_present_flag[i], 1, i);
1297 }
1298
1299
2/4
cbs_h266_read_sps:
✗ Branch 204 → 205 not taken.
✓ Branch 204 → 206 taken 973 times.
cbs_h266_write_sps:
✗ Branch 288 → 289 not taken.
✓ Branch 288 → 290 taken 335 times.
1308 u(2, sps_num_extra_sh_bytes, 0, 2);
1300
2/4
cbs_h266_read_sps:
✗ Branch 211 → 207 not taken.
✓ Branch 211 → 212 taken 973 times.
cbs_h266_write_sps:
✗ Branch 295 → 291 not taken.
✓ Branch 295 → 296 taken 335 times.
1308 for (i = 0; i < (current->sps_num_extra_sh_bytes * 8); i++) {
1301
0/4
cbs_h266_read_sps:
✗ Branch 208 → 209 not taken.
✗ Branch 208 → 210 not taken.
cbs_h266_write_sps:
✗ Branch 292 → 293 not taken.
✗ Branch 292 → 294 not taken.
✗ flags(sps_extra_sh_bit_present_flag[i], 1, i);
1302 }
1303
1304
2/4
cbs_h266_read_sps:
✓ Branch 212 → 213 taken 973 times.
✗ Branch 212 → 222 not taken.
cbs_h266_write_sps:
✓ Branch 296 → 297 taken 335 times.
✗ Branch 296 → 307 not taken.
1308 if (current->sps_ptl_dpb_hrd_params_present_flag) {
1305
4/4
cbs_h266_read_sps:
✓ Branch 213 → 214 taken 314 times.
✓ Branch 213 → 218 taken 659 times.
cbs_h266_write_sps:
✓ Branch 297 → 298 taken 60 times.
✓ Branch 297 → 301 taken 275 times.
1308 if (current->sps_max_sublayers_minus1 > 0)
1306
2/4
cbs_h266_read_sps:
✗ Branch 215 → 216 not taken.
✓ Branch 215 → 217 taken 314 times.
cbs_h266_write_sps:
✗ Branch 299 → 300 not taken.
✓ Branch 299 → 304 taken 60 times.
374 flag(sps_sublayer_dpb_params_flag);
1307 else
1308
1/2
✗ Branch 301 → 302 not taken.
✓ Branch 301 → 304 taken 275 times.
934 infer(sps_sublayer_dpb_params_flag, 0);
1309
2/4
cbs_h266_read_sps:
✗ Branch 220 → 221 not taken.
✓ Branch 220 → 222 taken 973 times.
cbs_h266_write_sps:
✗ Branch 305 → 306 not taken.
✓ Branch 305 → 307 taken 335 times.
1308 CHECK(FUNC(dpb_parameters) (ctx, rw, &current->sps_dpb_params,
1310 current->sps_max_sublayers_minus1,
1311 current->sps_sublayer_dpb_params_flag));
1312 }
1313
1314
6/8
cbs_h266_read_sps:
✓ Branch 222 → 223 taken 43 times.
✓ Branch 222 → 224 taken 930 times.
✗ Branch 226 → 227 not taken.
✓ Branch 226 → 228 taken 973 times.
cbs_h266_write_sps:
✓ Branch 307 → 308 taken 3 times.
✓ Branch 307 → 309 taken 332 times.
✗ Branch 311 → 312 not taken.
✓ Branch 311 → 313 taken 335 times.
1308 ue(sps_log2_min_luma_coding_block_size_minus2,
1315 0, FFMIN(4, current->sps_log2_ctu_size_minus5 + 3));
1316 1308 min_cb_log2_size_y =
1317 1308 current->sps_log2_min_luma_coding_block_size_minus2 + 2;
1318
1319
2/4
cbs_h266_read_sps:
✗ Branch 229 → 230 not taken.
✓ Branch 229 → 231 taken 973 times.
cbs_h266_write_sps:
✗ Branch 314 → 315 not taken.
✓ Branch 314 → 316 taken 335 times.
1308 flag(sps_partition_constraints_override_enabled_flag);
1320
1321
2/4
cbs_h266_read_sps:
✗ Branch 232 → 233 not taken.
✓ Branch 232 → 234 taken 973 times.
cbs_h266_write_sps:
✗ Branch 317 → 318 not taken.
✓ Branch 317 → 319 taken 335 times.
1308 ue(sps_log2_diff_min_qt_min_cb_intra_slice_luma,
1322 0, FFMIN(6, ctb_log2_size_y) - min_cb_log2_size_y);
1323 1308 min_qt_log2_size_intra_y =
1324 1308 current->sps_log2_diff_min_qt_min_cb_intra_slice_luma +
1325 min_cb_log2_size_y;
1326
1327
2/4
cbs_h266_read_sps:
✗ Branch 235 → 236 not taken.
✓ Branch 235 → 237 taken 973 times.
cbs_h266_write_sps:
✗ Branch 320 → 321 not taken.
✓ Branch 320 → 322 taken 335 times.
1308 ue(sps_max_mtt_hierarchy_depth_intra_slice_luma,
1328 0, 2 * (ctb_log2_size_y - min_cb_log2_size_y));
1329
1330
3/4
cbs_h266_read_sps:
✓ Branch 237 → 238 taken 935 times.
✓ Branch 237 → 245 taken 38 times.
cbs_h266_write_sps:
✓ Branch 322 → 323 taken 335 times.
✗ Branch 322 → 330 not taken.
1308 if (current->sps_max_mtt_hierarchy_depth_intra_slice_luma != 0) {
1331
2/4
cbs_h266_read_sps:
✗ Branch 239 → 240 not taken.
✓ Branch 239 → 241 taken 935 times.
cbs_h266_write_sps:
✗ Branch 324 → 325 not taken.
✓ Branch 324 → 326 taken 335 times.
1270 ue(sps_log2_diff_max_bt_min_qt_intra_slice_luma,
1332 0, ctb_log2_size_y - min_qt_log2_size_intra_y);
1333
2/4
cbs_h266_read_sps:
✗ Branch 242 → 243 not taken.
✓ Branch 242 → 244 taken 935 times.
cbs_h266_write_sps:
✗ Branch 327 → 328 not taken.
✓ Branch 327 → 329 taken 335 times.
1270 ue(sps_log2_diff_max_tt_min_qt_intra_slice_luma,
1334 0, FFMIN(6, ctb_log2_size_y) - min_qt_log2_size_intra_y);
1335 } else {
1336
0/2
✗ Branch 330 → 331 not taken.
✗ Branch 330 → 333 not taken.
38 infer(sps_log2_diff_max_bt_min_qt_intra_slice_luma, 0);
1337
0/2
✗ Branch 333 → 334 not taken.
✗ Branch 333 → 336 not taken.
38 infer(sps_log2_diff_max_tt_min_qt_intra_slice_luma, 0);
1338 }
1339
1340
4/4
cbs_h266_read_sps:
✓ Branch 246 → 247 taken 959 times.
✓ Branch 246 → 251 taken 14 times.
cbs_h266_write_sps:
✓ Branch 336 → 337 taken 332 times.
✓ Branch 336 → 340 taken 3 times.
1308 if (current->sps_chroma_format_idc != 0) {
1341
2/4
cbs_h266_read_sps:
✗ Branch 248 → 249 not taken.
✓ Branch 248 → 250 taken 959 times.
cbs_h266_write_sps:
✗ Branch 338 → 339 not taken.
✓ Branch 338 → 343 taken 332 times.
1291 flag(sps_qtbtt_dual_tree_intra_flag);
1342 } else {
1343
1/2
✗ Branch 340 → 341 not taken.
✓ Branch 340 → 343 taken 3 times.
17 infer(sps_qtbtt_dual_tree_intra_flag, 0);
1344 }
1345
1346
4/4
cbs_h266_read_sps:
✓ Branch 252 → 253 taken 406 times.
✓ Branch 252 → 267 taken 567 times.
cbs_h266_write_sps:
✓ Branch 343 → 344 taken 75 times.
✓ Branch 343 → 358 taken 260 times.
1308 if (current->sps_qtbtt_dual_tree_intra_flag) {
1347
2/4
cbs_h266_read_sps:
✗ Branch 254 → 255 not taken.
✓ Branch 254 → 256 taken 406 times.
cbs_h266_write_sps:
✗ Branch 345 → 346 not taken.
✓ Branch 345 → 347 taken 75 times.
481 ue(sps_log2_diff_min_qt_min_cb_intra_slice_chroma,
1348 0, FFMIN(6, ctb_log2_size_y) - min_cb_log2_size_y);
1349
2/4
cbs_h266_read_sps:
✗ Branch 257 → 258 not taken.
✓ Branch 257 → 259 taken 406 times.
cbs_h266_write_sps:
✗ Branch 348 → 349 not taken.
✓ Branch 348 → 350 taken 75 times.
481 ue(sps_max_mtt_hierarchy_depth_intra_slice_chroma,
1350 0, 2 * (ctb_log2_size_y - min_cb_log2_size_y));
1351
3/4
cbs_h266_read_sps:
✓ Branch 259 → 260 taken 387 times.
✓ Branch 259 → 268 taken 19 times.
cbs_h266_write_sps:
✓ Branch 350 → 351 taken 75 times.
✗ Branch 350 → 364 not taken.
481 if (current->sps_max_mtt_hierarchy_depth_intra_slice_chroma != 0) {
1352 462 unsigned int min_qt_log2_size_intra_c =
1353 462 current->sps_log2_diff_min_qt_min_cb_intra_slice_chroma +
1354 min_cb_log2_size_y;
1355
2/4
cbs_h266_read_sps:
✗ Branch 261 → 262 not taken.
✓ Branch 261 → 263 taken 387 times.
cbs_h266_write_sps:
✗ Branch 352 → 353 not taken.
✓ Branch 352 → 354 taken 75 times.
462 ue(sps_log2_diff_max_bt_min_qt_intra_slice_chroma,
1356 0, FFMIN(6, ctb_log2_size_y) - min_qt_log2_size_intra_c);
1357
2/4
cbs_h266_read_sps:
✗ Branch 264 → 265 not taken.
✓ Branch 264 → 266 taken 387 times.
cbs_h266_write_sps:
✗ Branch 355 → 356 not taken.
✓ Branch 355 → 357 taken 75 times.
462 ue(sps_log2_diff_max_tt_min_qt_intra_slice_chroma,
1358 0, FFMIN(6, ctb_log2_size_y) - min_qt_log2_size_intra_c);
1359 }
1360 } else {
1361
1/2
✗ Branch 358 → 359 not taken.
✓ Branch 358 → 361 taken 260 times.
827 infer(sps_log2_diff_min_qt_min_cb_intra_slice_chroma, 0);
1362
1/2
✗ Branch 361 → 362 not taken.
✓ Branch 361 → 364 taken 260 times.
827 infer(sps_max_mtt_hierarchy_depth_intra_slice_chroma, 0);
1363 }
1364
4/4
cbs_h266_read_sps:
✓ Branch 268 → 269 taken 586 times.
✓ Branch 268 → 270 taken 387 times.
cbs_h266_write_sps:
✓ Branch 364 → 365 taken 260 times.
✓ Branch 364 → 371 taken 75 times.
1308 if (current->sps_max_mtt_hierarchy_depth_intra_slice_chroma == 0) {
1365
1/2
✗ Branch 365 → 366 not taken.
✓ Branch 365 → 368 taken 260 times.
846 infer(sps_log2_diff_max_bt_min_qt_intra_slice_chroma, 0);
1366
1/2
✗ Branch 368 → 369 not taken.
✓ Branch 368 → 371 taken 260 times.
846 infer(sps_log2_diff_max_tt_min_qt_intra_slice_chroma, 0);
1367 }
1368
1369
2/4
cbs_h266_read_sps:
✗ Branch 271 → 272 not taken.
✓ Branch 271 → 273 taken 973 times.
cbs_h266_write_sps:
✗ Branch 372 → 373 not taken.
✓ Branch 372 → 374 taken 335 times.
1308 ue(sps_log2_diff_min_qt_min_cb_inter_slice,
1370 0, FFMIN(6, ctb_log2_size_y) - min_cb_log2_size_y);
1371 1308 min_qt_log2_size_inter_y =
1372 1308 current->sps_log2_diff_min_qt_min_cb_inter_slice + min_cb_log2_size_y;
1373
1374
2/4
cbs_h266_read_sps:
✗ Branch 274 → 275 not taken.
✓ Branch 274 → 276 taken 973 times.
cbs_h266_write_sps:
✗ Branch 375 → 376 not taken.
✓ Branch 375 → 377 taken 335 times.
1308 ue(sps_max_mtt_hierarchy_depth_inter_slice,
1375 0, 2 * (ctb_log2_size_y - min_cb_log2_size_y));
1376
3/4
cbs_h266_read_sps:
✓ Branch 276 → 277 taken 935 times.
✓ Branch 276 → 284 taken 38 times.
cbs_h266_write_sps:
✓ Branch 377 → 378 taken 335 times.
✗ Branch 377 → 385 not taken.
1308 if (current->sps_max_mtt_hierarchy_depth_inter_slice != 0) {
1377
2/4
cbs_h266_read_sps:
✗ Branch 278 → 279 not taken.
✓ Branch 278 → 280 taken 935 times.
cbs_h266_write_sps:
✗ Branch 379 → 380 not taken.
✓ Branch 379 → 381 taken 335 times.
1270 ue(sps_log2_diff_max_bt_min_qt_inter_slice,
1378 0, ctb_log2_size_y - min_qt_log2_size_inter_y);
1379
2/4
cbs_h266_read_sps:
✗ Branch 281 → 282 not taken.
✓ Branch 281 → 283 taken 935 times.
cbs_h266_write_sps:
✗ Branch 382 → 383 not taken.
✓ Branch 382 → 384 taken 335 times.
1270 ue(sps_log2_diff_max_tt_min_qt_inter_slice,
1380 0, FFMIN(6, ctb_log2_size_y) - min_qt_log2_size_inter_y);
1381 } else {
1382
0/2
✗ Branch 385 → 386 not taken.
✗ Branch 385 → 388 not taken.
38 infer(sps_log2_diff_max_bt_min_qt_inter_slice, 0);
1383
0/2
✗ Branch 388 → 389 not taken.
✗ Branch 388 → 391 not taken.
38 infer(sps_log2_diff_max_tt_min_qt_inter_slice, 0);
1384 }
1385
1386
4/4
cbs_h266_read_sps:
✓ Branch 285 → 286 taken 930 times.
✓ Branch 285 → 290 taken 43 times.
cbs_h266_write_sps:
✓ Branch 391 → 392 taken 332 times.
✓ Branch 391 → 395 taken 3 times.
1308 if (ctb_size_y > 32)
1387
2/4
cbs_h266_read_sps:
✗ Branch 287 → 288 not taken.
✓ Branch 287 → 289 taken 930 times.
cbs_h266_write_sps:
✗ Branch 393 → 394 not taken.
✓ Branch 393 → 398 taken 332 times.
1262 flag(sps_max_luma_transform_size_64_flag);
1388 else
1389
1/2
✗ Branch 395 → 396 not taken.
✓ Branch 395 → 398 taken 3 times.
46 infer(sps_max_luma_transform_size_64_flag, 0);
1390
1391
2/4
cbs_h266_read_sps:
✗ Branch 292 → 293 not taken.
✓ Branch 292 → 294 taken 973 times.
cbs_h266_write_sps:
✗ Branch 399 → 400 not taken.
✓ Branch 399 → 401 taken 335 times.
1308 flag(sps_transform_skip_enabled_flag);
1392
4/4
cbs_h266_read_sps:
✓ Branch 294 → 295 taken 401 times.
✓ Branch 294 → 302 taken 572 times.
cbs_h266_write_sps:
✓ Branch 401 → 402 taken 75 times.
✓ Branch 401 → 408 taken 260 times.
1308 if (current->sps_transform_skip_enabled_flag) {
1393
2/4
cbs_h266_read_sps:
✗ Branch 296 → 297 not taken.
✓ Branch 296 → 298 taken 401 times.
cbs_h266_write_sps:
✗ Branch 403 → 404 not taken.
✓ Branch 403 → 405 taken 75 times.
476 ue(sps_log2_transform_skip_max_size_minus2, 0, 3);
1394
2/4
cbs_h266_read_sps:
✗ Branch 299 → 300 not taken.
✓ Branch 299 → 301 taken 401 times.
cbs_h266_write_sps:
✗ Branch 406 → 407 not taken.
✓ Branch 406 → 408 taken 75 times.
476 flag(sps_bdpcm_enabled_flag);
1395 }
1396
1397
2/4
cbs_h266_read_sps:
✗ Branch 303 → 304 not taken.
✓ Branch 303 → 305 taken 973 times.
cbs_h266_write_sps:
✗ Branch 409 → 410 not taken.
✓ Branch 409 → 411 taken 335 times.
1308 flag(sps_mts_enabled_flag);
1398
4/4
cbs_h266_read_sps:
✓ Branch 305 → 306 taken 415 times.
✓ Branch 305 → 313 taken 558 times.
cbs_h266_write_sps:
✓ Branch 411 → 412 taken 75 times.
✓ Branch 411 → 418 taken 260 times.
1308 if (current->sps_mts_enabled_flag) {
1399
2/4
cbs_h266_read_sps:
✗ Branch 307 → 308 not taken.
✓ Branch 307 → 309 taken 415 times.
cbs_h266_write_sps:
✗ Branch 413 → 414 not taken.
✓ Branch 413 → 415 taken 75 times.
490 flag(sps_explicit_mts_intra_enabled_flag);
1400
2/4
cbs_h266_read_sps:
✗ Branch 310 → 311 not taken.
✓ Branch 310 → 312 taken 415 times.
cbs_h266_write_sps:
✗ Branch 416 → 417 not taken.
✓ Branch 416 → 424 taken 75 times.
490 flag(sps_explicit_mts_inter_enabled_flag);
1401 } else {
1402
1/2
✗ Branch 418 → 419 not taken.
✓ Branch 418 → 421 taken 260 times.
818 infer(sps_explicit_mts_intra_enabled_flag, 0);
1403
1/2
✗ Branch 421 → 422 not taken.
✓ Branch 421 → 424 taken 260 times.
818 infer(sps_explicit_mts_inter_enabled_flag, 0);
1404 }
1405
1406
2/4
cbs_h266_read_sps:
✗ Branch 315 → 316 not taken.
✓ Branch 315 → 317 taken 973 times.
cbs_h266_write_sps:
✗ Branch 425 → 426 not taken.
✓ Branch 425 → 427 taken 335 times.
1308 flag(sps_lfnst_enabled_flag);
1407
1408
4/4
cbs_h266_read_sps:
✓ Branch 317 → 318 taken 959 times.
✓ Branch 317 → 347 taken 14 times.
cbs_h266_write_sps:
✓ Branch 427 → 428 taken 332 times.
✓ Branch 427 → 457 taken 3 times.
1308 if (current->sps_chroma_format_idc != 0) {
1409 uint8_t num_qp_tables;
1410
2/4
cbs_h266_read_sps:
✗ Branch 319 → 320 not taken.
✓ Branch 319 → 321 taken 959 times.
cbs_h266_write_sps:
✗ Branch 429 → 430 not taken.
✓ Branch 429 → 431 taken 332 times.
1291 flag(sps_joint_cbcr_enabled_flag);
1411
2/4
cbs_h266_read_sps:
✗ Branch 322 → 323 not taken.
✓ Branch 322 → 324 taken 959 times.
cbs_h266_write_sps:
✗ Branch 432 → 433 not taken.
✓ Branch 432 → 434 taken 332 times.
1291 flag(sps_same_qp_table_for_chroma_flag);
1412
4/4
cbs_h266_read_sps:
✓ Branch 324 → 325 taken 10 times.
✓ Branch 324 → 328 taken 949 times.
cbs_h266_write_sps:
✓ Branch 434 → 435 taken 2 times.
✓ Branch 434 → 438 taken 330 times.
1303 num_qp_tables = current->sps_same_qp_table_for_chroma_flag ?
1413
2/4
cbs_h266_read_sps:
✓ Branch 325 → 326 taken 10 times.
✗ Branch 325 → 327 not taken.
cbs_h266_write_sps:
✓ Branch 435 → 436 taken 2 times.
✗ Branch 435 → 437 not taken.
12 1 : (current->sps_joint_cbcr_enabled_flag ? 3 : 2);
1414
4/4
cbs_h266_read_sps:
✓ Branch 346 → 330 taken 979 times.
✓ Branch 346 → 348 taken 959 times.
cbs_h266_write_sps:
✓ Branch 456 → 440 taken 336 times.
✓ Branch 456 → 463 taken 332 times.
2606 for (i = 0; i < num_qp_tables; i++) {
1415
2/4
cbs_h266_read_sps:
✗ Branch 331 → 332 not taken.
✓ Branch 331 → 333 taken 979 times.
cbs_h266_write_sps:
✗ Branch 441 → 442 not taken.
✓ Branch 441 → 443 taken 336 times.
1315 ses(sps_qp_table_start_minus26[i], -26 - qp_bd_offset, 36, 1, i);
1416
2/4
cbs_h266_read_sps:
✗ Branch 334 → 335 not taken.
✓ Branch 334 → 336 taken 979 times.
cbs_h266_write_sps:
✗ Branch 444 → 445 not taken.
✓ Branch 444 → 446 taken 336 times.
1315 ues(sps_num_points_in_qp_table_minus1[i],
1417 0, 36 - current->sps_qp_table_start_minus26[i], 1, i);
1418
4/4
cbs_h266_read_sps:
✓ Branch 344 → 337 taken 1860 times.
✓ Branch 344 → 345 taken 979 times.
cbs_h266_write_sps:
✓ Branch 454 → 447 taken 495 times.
✓ Branch 454 → 455 taken 336 times.
3670 for (j = 0; j <= current->sps_num_points_in_qp_table_minus1[i]; j++) {
1419 2355 uint8_t max = MAX_UINT_BITS(8);
1420
2/4
cbs_h266_read_sps:
✗ Branch 338 → 339 not taken.
✓ Branch 338 → 340 taken 1860 times.
cbs_h266_write_sps:
✗ Branch 448 → 449 not taken.
✓ Branch 448 → 450 taken 495 times.
2355 ues(sps_delta_qp_in_val_minus1[i][j], 0, max, 2, i, j);
1421
2/4
cbs_h266_read_sps:
✗ Branch 341 → 342 not taken.
✓ Branch 341 → 343 taken 1860 times.
cbs_h266_write_sps:
✗ Branch 451 → 452 not taken.
✓ Branch 451 → 453 taken 495 times.
2355 ues(sps_delta_qp_diff_val[i][j], 0, max, 2, i, j);
1422 }
1423 }
1424 } else {
1425
1/2
✗ Branch 457 → 458 not taken.
✓ Branch 457 → 460 taken 3 times.
17 infer(sps_joint_cbcr_enabled_flag, 0);
1426
1/2
✗ Branch 460 → 461 not taken.
✓ Branch 460 → 463 taken 3 times.
17 infer(sps_same_qp_table_for_chroma_flag, 0);
1427 }
1428
1429
2/4
cbs_h266_read_sps:
✗ Branch 349 → 350 not taken.
✓ Branch 349 → 351 taken 973 times.
cbs_h266_write_sps:
✗ Branch 464 → 465 not taken.
✓ Branch 464 → 466 taken 335 times.
1308 flag(sps_sao_enabled_flag);
1430
2/4
cbs_h266_read_sps:
✗ Branch 352 → 353 not taken.
✓ Branch 352 → 354 taken 973 times.
cbs_h266_write_sps:
✗ Branch 467 → 468 not taken.
✓ Branch 467 → 469 taken 335 times.
1308 flag(sps_alf_enabled_flag);
1431
8/8
cbs_h266_read_sps:
✓ Branch 354 → 355 taken 370 times.
✓ Branch 354 → 360 taken 603 times.
✓ Branch 355 → 356 taken 356 times.
✓ Branch 355 → 360 taken 14 times.
cbs_h266_write_sps:
✓ Branch 469 → 470 taken 67 times.
✓ Branch 469 → 475 taken 268 times.
✓ Branch 470 → 471 taken 64 times.
✓ Branch 470 → 475 taken 3 times.
1308 if (current->sps_alf_enabled_flag && current->sps_chroma_format_idc)
1432
2/4
cbs_h266_read_sps:
✗ Branch 357 → 358 not taken.
✓ Branch 357 → 359 taken 356 times.
cbs_h266_write_sps:
✗ Branch 472 → 473 not taken.
✓ Branch 472 → 474 taken 64 times.
420 flag(sps_ccalf_enabled_flag);
1433 else
1434
1/2
✗ Branch 475 → 476 not taken.
✓ Branch 475 → 478 taken 271 times.
888 infer(sps_ccalf_enabled_flag, 0);
1435
2/4
cbs_h266_read_sps:
✗ Branch 362 → 363 not taken.
✓ Branch 362 → 364 taken 973 times.
cbs_h266_write_sps:
✗ Branch 479 → 480 not taken.
✓ Branch 479 → 481 taken 335 times.
1308 flag(sps_lmcs_enabled_flag);
1436
2/4
cbs_h266_read_sps:
✗ Branch 365 → 366 not taken.
✓ Branch 365 → 367 taken 973 times.
cbs_h266_write_sps:
✗ Branch 482 → 483 not taken.
✓ Branch 482 → 484 taken 335 times.
1308 flag(sps_weighted_pred_flag);
1437
2/4
cbs_h266_read_sps:
✗ Branch 368 → 369 not taken.
✓ Branch 368 → 370 taken 973 times.
cbs_h266_write_sps:
✗ Branch 485 → 486 not taken.
✓ Branch 485 → 487 taken 335 times.
1308 flag(sps_weighted_bipred_flag);
1438
2/4
cbs_h266_read_sps:
✗ Branch 371 → 372 not taken.
✓ Branch 371 → 373 taken 973 times.
cbs_h266_write_sps:
✗ Branch 488 → 489 not taken.
✓ Branch 488 → 490 taken 335 times.
1308 flag(sps_long_term_ref_pics_flag);
1439
4/4
cbs_h266_read_sps:
✓ Branch 373 → 374 taken 29 times.
✓ Branch 373 → 378 taken 944 times.
cbs_h266_write_sps:
✓ Branch 490 → 491 taken 6 times.
✓ Branch 490 → 494 taken 329 times.
1308 if (current->sps_video_parameter_set_id > 0)
1440
2/4
cbs_h266_read_sps:
✗ Branch 375 → 376 not taken.
✓ Branch 375 → 377 taken 29 times.
cbs_h266_write_sps:
✗ Branch 492 → 493 not taken.
✓ Branch 492 → 497 taken 6 times.
35 flag(sps_inter_layer_prediction_enabled_flag);
1441 else
1442
1/2
✗ Branch 494 → 495 not taken.
✓ Branch 494 → 497 taken 329 times.
1273 infer(sps_inter_layer_prediction_enabled_flag, 0);
1443
2/4
cbs_h266_read_sps:
✗ Branch 380 → 381 not taken.
✓ Branch 380 → 382 taken 973 times.
cbs_h266_write_sps:
✗ Branch 498 → 499 not taken.
✓ Branch 498 → 500 taken 335 times.
1308 flag(sps_idr_rpl_present_flag);
1444
2/4
cbs_h266_read_sps:
✗ Branch 383 → 384 not taken.
✓ Branch 383 → 385 taken 973 times.
cbs_h266_write_sps:
✗ Branch 501 → 502 not taken.
✓ Branch 501 → 503 taken 335 times.
1308 flag(sps_rpl1_same_as_rpl0_flag);
1445
1446
8/8
cbs_h266_read_sps:
✓ Branch 396 → 397 taken 164 times.
✓ Branch 396 → 398 taken 2673 times.
✓ Branch 399 → 386 taken 1864 times.
✓ Branch 399 → 400 taken 973 times.
cbs_h266_write_sps:
✓ Branch 514 → 515 taken 24 times.
✓ Branch 514 → 516 taken 969 times.
✓ Branch 517 → 504 taken 658 times.
✓ Branch 517 → 518 taken 335 times.
3830 for (i = 0; i < (current->sps_rpl1_same_as_rpl0_flag ? 1 : 2); i++) {
1447
2/4
cbs_h266_read_sps:
✗ Branch 387 → 388 not taken.
✓ Branch 387 → 389 taken 1864 times.
cbs_h266_write_sps:
✗ Branch 505 → 506 not taken.
✓ Branch 505 → 507 taken 658 times.
2522 ues(sps_num_ref_pic_lists[i], 0, VVC_MAX_REF_PIC_LISTS, 1, i);
1448
4/4
cbs_h266_read_sps:
✓ Branch 394 → 390 taken 43123 times.
✓ Branch 394 → 395 taken 1864 times.
cbs_h266_write_sps:
✓ Branch 512 → 508 taken 16092 times.
✓ Branch 512 → 513 taken 658 times.
61737 for (j = 0; j < current->sps_num_ref_pic_lists[i]; j++)
1449
2/4
cbs_h266_read_sps:
✗ Branch 391 → 392 not taken.
✓ Branch 391 → 393 taken 43123 times.
cbs_h266_write_sps:
✗ Branch 509 → 510 not taken.
✓ Branch 509 → 511 taken 16092 times.
59215 CHECK(FUNC(ref_pic_list_struct) (ctx, rw,
1450 &current->
1451 sps_ref_pic_list_struct[i][j], i,
1452 j, current));
1453 }
1454
1455
4/4
cbs_h266_read_sps:
✓ Branch 400 → 401 taken 82 times.
✓ Branch 400 → 404 taken 891 times.
cbs_h266_write_sps:
✓ Branch 518 → 519 taken 12 times.
✓ Branch 518 → 522 taken 323 times.
1308 if (current->sps_rpl1_same_as_rpl0_flag) {
1456 94 current->sps_num_ref_pic_lists[1] = current->sps_num_ref_pic_lists[0];
1457
4/4
cbs_h266_read_sps:
✓ Branch 403 → 402 taken 1123 times.
✓ Branch 403 → 404 taken 82 times.
cbs_h266_write_sps:
✓ Branch 521 → 520 taken 168 times.
✓ Branch 521 → 522 taken 12 times.
1385 for (j = 0; j < current->sps_num_ref_pic_lists[0]; j++)
1458 1291 memcpy(&current->sps_ref_pic_list_struct[1][j],
1459 1291 &current->sps_ref_pic_list_struct[0][j],
1460 sizeof(current->sps_ref_pic_list_struct[0][j]));
1461 }
1462
1463
2/4
cbs_h266_read_sps:
✗ Branch 405 → 406 not taken.
✓ Branch 405 → 407 taken 973 times.
cbs_h266_write_sps:
✗ Branch 523 → 524 not taken.
✓ Branch 523 → 525 taken 335 times.
1308 flag(sps_ref_wraparound_enabled_flag);
1464
1465
2/4
cbs_h266_read_sps:
✗ Branch 408 → 409 not taken.
✓ Branch 408 → 410 taken 973 times.
cbs_h266_write_sps:
✗ Branch 526 → 527 not taken.
✓ Branch 526 → 528 taken 335 times.
1308 flag(sps_temporal_mvp_enabled_flag);
1466
2/4
cbs_h266_read_sps:
✓ Branch 410 → 411 taken 973 times.
✗ Branch 410 → 415 not taken.
cbs_h266_write_sps:
✓ Branch 528 → 529 taken 335 times.
✗ Branch 528 → 532 not taken.
1308 if (current->sps_temporal_mvp_enabled_flag)
1467
2/4
cbs_h266_read_sps:
✗ Branch 412 → 413 not taken.
✓ Branch 412 → 414 taken 973 times.
cbs_h266_write_sps:
✗ Branch 530 → 531 not taken.
✓ Branch 530 → 535 taken 335 times.
1308 flag(sps_sbtmvp_enabled_flag);
1468 else
1469
0/2
✗ Branch 532 → 533 not taken.
✗ Branch 532 → 535 not taken.
✗ infer(sps_sbtmvp_enabled_flag, 0);
1470
1471
2/4
cbs_h266_read_sps:
✗ Branch 417 → 418 not taken.
✓ Branch 417 → 419 taken 973 times.
cbs_h266_write_sps:
✗ Branch 536 → 537 not taken.
✓ Branch 536 → 538 taken 335 times.
1308 flag(sps_amvr_enabled_flag);
1472
2/4
cbs_h266_read_sps:
✗ Branch 420 → 421 not taken.
✓ Branch 420 → 422 taken 973 times.
cbs_h266_write_sps:
✗ Branch 539 → 540 not taken.
✓ Branch 539 → 541 taken 335 times.
1308 flag(sps_bdof_enabled_flag);
1473
4/4
cbs_h266_read_sps:
✓ Branch 422 → 423 taken 314 times.
✓ Branch 422 → 427 taken 659 times.
cbs_h266_write_sps:
✓ Branch 541 → 542 taken 60 times.
✓ Branch 541 → 545 taken 275 times.
1308 if (current->sps_bdof_enabled_flag)
1474
2/4
cbs_h266_read_sps:
✗ Branch 424 → 425 not taken.
✓ Branch 424 → 426 taken 314 times.
cbs_h266_write_sps:
✗ Branch 543 → 544 not taken.
✓ Branch 543 → 548 taken 60 times.
374 flag(sps_bdof_control_present_in_ph_flag);
1475 else
1476
1/2
✗ Branch 545 → 546 not taken.
✓ Branch 545 → 548 taken 275 times.
934 infer(sps_bdof_control_present_in_ph_flag, 0);
1477
1478
2/4
cbs_h266_read_sps:
✗ Branch 429 → 430 not taken.
✓ Branch 429 → 431 taken 973 times.
cbs_h266_write_sps:
✗ Branch 549 → 550 not taken.
✓ Branch 549 → 551 taken 335 times.
1308 flag(sps_smvd_enabled_flag);
1479
2/4
cbs_h266_read_sps:
✗ Branch 432 → 433 not taken.
✓ Branch 432 → 434 taken 973 times.
cbs_h266_write_sps:
✗ Branch 552 → 553 not taken.
✓ Branch 552 → 554 taken 335 times.
1308 flag(sps_dmvr_enabled_flag);
1480
4/4
cbs_h266_read_sps:
✓ Branch 434 → 435 taken 300 times.
✓ Branch 434 → 439 taken 673 times.
cbs_h266_write_sps:
✓ Branch 554 → 555 taken 57 times.
✓ Branch 554 → 558 taken 278 times.
1308 if (current->sps_dmvr_enabled_flag)
1481
2/4
cbs_h266_read_sps:
✗ Branch 436 → 437 not taken.
✓ Branch 436 → 438 taken 300 times.
cbs_h266_write_sps:
✗ Branch 556 → 557 not taken.
✓ Branch 556 → 561 taken 57 times.
357 flag(sps_dmvr_control_present_in_ph_flag);
1482 else
1483
1/2
✗ Branch 558 → 559 not taken.
✓ Branch 558 → 561 taken 278 times.
951 infer(sps_dmvr_control_present_in_ph_flag, 0);
1484
1485
2/4
cbs_h266_read_sps:
✗ Branch 441 → 442 not taken.
✓ Branch 441 → 443 taken 973 times.
cbs_h266_write_sps:
✗ Branch 562 → 563 not taken.
✓ Branch 562 → 564 taken 335 times.
1308 flag(sps_mmvd_enabled_flag);
1486
4/4
cbs_h266_read_sps:
✓ Branch 443 → 444 taken 931 times.
✓ Branch 443 → 448 taken 42 times.
cbs_h266_write_sps:
✓ Branch 564 → 565 taken 332 times.
✓ Branch 564 → 568 taken 3 times.
1308 if (current->sps_mmvd_enabled_flag)
1487
2/4
cbs_h266_read_sps:
✗ Branch 445 → 446 not taken.
✓ Branch 445 → 447 taken 931 times.
cbs_h266_write_sps:
✗ Branch 566 → 567 not taken.
✓ Branch 566 → 571 taken 332 times.
1263 flag(sps_mmvd_fullpel_only_enabled_flag);
1488 else
1489
1/2
✗ Branch 568 → 569 not taken.
✓ Branch 568 → 571 taken 3 times.
45 infer(sps_mmvd_fullpel_only_enabled_flag, 0);
1490
1491
2/4
cbs_h266_read_sps:
✗ Branch 450 → 451 not taken.
✓ Branch 450 → 452 taken 973 times.
cbs_h266_write_sps:
✗ Branch 572 → 573 not taken.
✓ Branch 572 → 574 taken 335 times.
1308 ue(sps_six_minus_max_num_merge_cand, 0, 5);
1492 1308 max_num_merge_cand = 6 - current->sps_six_minus_max_num_merge_cand;
1493
1494
2/4
cbs_h266_read_sps:
✗ Branch 453 → 454 not taken.
✓ Branch 453 → 455 taken 973 times.
cbs_h266_write_sps:
✗ Branch 575 → 576 not taken.
✓ Branch 575 → 577 taken 335 times.
1308 flag(sps_sbt_enabled_flag);
1495
1496
2/4
cbs_h266_read_sps:
✗ Branch 456 → 457 not taken.
✓ Branch 456 → 458 taken 973 times.
cbs_h266_write_sps:
✗ Branch 578 → 579 not taken.
✓ Branch 578 → 580 taken 335 times.
1308 flag(sps_affine_enabled_flag);
1497
4/4
cbs_h266_read_sps:
✓ Branch 458 → 459 taken 420 times.
✓ Branch 458 → 480 taken 553 times.
cbs_h266_write_sps:
✓ Branch 580 → 581 taken 75 times.
✓ Branch 580 → 604 taken 260 times.
1308 if (current->sps_affine_enabled_flag) {
1498
2/4
cbs_h266_read_sps:
✗ Branch 460 → 461 not taken.
✓ Branch 460 → 462 taken 420 times.
cbs_h266_write_sps:
✗ Branch 582 → 583 not taken.
✓ Branch 582 → 584 taken 75 times.
495 ue(sps_five_minus_max_num_subblock_merge_cand,
1499 0, 5 - current->sps_sbtmvp_enabled_flag);
1500
2/4
cbs_h266_read_sps:
✗ Branch 463 → 464 not taken.
✓ Branch 463 → 465 taken 420 times.
cbs_h266_write_sps:
✗ Branch 585 → 586 not taken.
✓ Branch 585 → 587 taken 75 times.
495 flag(sps_6param_affine_enabled_flag);
1501
3/4
cbs_h266_read_sps:
✓ Branch 465 → 466 taken 415 times.
✓ Branch 465 → 470 taken 5 times.
cbs_h266_write_sps:
✓ Branch 587 → 588 taken 75 times.
✗ Branch 587 → 591 not taken.
495 if (current->sps_amvr_enabled_flag)
1502
2/4
cbs_h266_read_sps:
✗ Branch 467 → 468 not taken.
✓ Branch 467 → 469 taken 415 times.
cbs_h266_write_sps:
✗ Branch 589 → 590 not taken.
✓ Branch 589 → 594 taken 75 times.
490 flag(sps_affine_amvr_enabled_flag);
1503 else
1504
0/2
✗ Branch 591 → 592 not taken.
✗ Branch 591 → 594 not taken.
5 infer(sps_affine_amvr_enabled_flag, 0);
1505
2/4
cbs_h266_read_sps:
✗ Branch 472 → 473 not taken.
✓ Branch 472 → 474 taken 420 times.
cbs_h266_write_sps:
✗ Branch 595 → 596 not taken.
✓ Branch 595 → 597 taken 75 times.
495 flag(sps_affine_prof_enabled_flag);
1506
3/4
cbs_h266_read_sps:
✓ Branch 474 → 475 taken 402 times.
✓ Branch 474 → 479 taken 18 times.
cbs_h266_write_sps:
✓ Branch 597 → 598 taken 75 times.
✗ Branch 597 → 601 not taken.
495 if (current->sps_affine_prof_enabled_flag)
1507
2/4
cbs_h266_read_sps:
✗ Branch 476 → 477 not taken.
✓ Branch 476 → 478 taken 402 times.
cbs_h266_write_sps:
✗ Branch 599 → 600 not taken.
✓ Branch 599 → 616 taken 75 times.
477 flag(sps_prof_control_present_in_ph_flag);
1508 else
1509
0/2
✗ Branch 601 → 602 not taken.
✗ Branch 601 → 616 not taken.
18 infer(sps_prof_control_present_in_ph_flag, 0);
1510 } else {
1511
1/2
✗ Branch 604 → 605 not taken.
✓ Branch 604 → 607 taken 260 times.
813 infer(sps_6param_affine_enabled_flag, 0);
1512
1/2
✗ Branch 607 → 608 not taken.
✓ Branch 607 → 610 taken 260 times.
813 infer(sps_affine_amvr_enabled_flag, 0);
1513
1/2
✗ Branch 610 → 611 not taken.
✓ Branch 610 → 613 taken 260 times.
813 infer(sps_affine_prof_enabled_flag, 0);
1514
1/2
✗ Branch 613 → 614 not taken.
✓ Branch 613 → 616 taken 260 times.
813 infer(sps_prof_control_present_in_ph_flag, 0);
1515 }
1516
1517
2/4
cbs_h266_read_sps:
✗ Branch 482 → 483 not taken.
✓ Branch 482 → 484 taken 973 times.
cbs_h266_write_sps:
✗ Branch 617 → 618 not taken.
✓ Branch 617 → 619 taken 335 times.
1308 flag(sps_bcw_enabled_flag);
1518
2/4
cbs_h266_read_sps:
✗ Branch 485 → 486 not taken.
✓ Branch 485 → 487 taken 973 times.
cbs_h266_write_sps:
✗ Branch 620 → 621 not taken.
✓ Branch 620 → 622 taken 335 times.
1308 flag(sps_ciip_enabled_flag);
1519
1520
2/4
cbs_h266_read_sps:
✓ Branch 487 → 488 taken 973 times.
✗ Branch 487 → 497 not taken.
cbs_h266_write_sps:
✓ Branch 622 → 623 taken 335 times.
✗ Branch 622 → 632 not taken.
1308 if (max_num_merge_cand >= 2) {
1521
2/4
cbs_h266_read_sps:
✗ Branch 489 → 490 not taken.
✓ Branch 489 → 491 taken 973 times.
cbs_h266_write_sps:
✗ Branch 624 → 625 not taken.
✓ Branch 624 → 626 taken 335 times.
1308 flag(sps_gpm_enabled_flag);
1522
6/8
cbs_h266_read_sps:
✓ Branch 491 → 492 taken 374 times.
✓ Branch 491 → 498 taken 599 times.
✓ Branch 492 → 493 taken 374 times.
✗ Branch 492 → 498 not taken.
cbs_h266_write_sps:
✓ Branch 626 → 627 taken 69 times.
✓ Branch 626 → 635 taken 266 times.
✓ Branch 627 → 628 taken 69 times.
✗ Branch 627 → 635 not taken.
1308 if (current->sps_gpm_enabled_flag && max_num_merge_cand >= 3)
1523
2/4
cbs_h266_read_sps:
✗ Branch 494 → 495 not taken.
✓ Branch 494 → 496 taken 374 times.
cbs_h266_write_sps:
✗ Branch 629 → 630 not taken.
✓ Branch 629 → 631 taken 69 times.
443 ue(sps_max_num_merge_cand_minus_max_num_gpm_cand,
1524 0, max_num_merge_cand - 2);
1525 } else {
1526
0/2
✗ Branch 632 → 633 not taken.
✗ Branch 632 → 635 not taken.
✗ infer(sps_gpm_enabled_flag, 0);
1527 }
1528
1529
2/4
cbs_h266_read_sps:
✗ Branch 499 → 500 not taken.
✓ Branch 499 → 501 taken 973 times.
cbs_h266_write_sps:
✗ Branch 636 → 637 not taken.
✓ Branch 636 → 638 taken 335 times.
1308 ue(sps_log2_parallel_merge_level_minus2, 0, ctb_log2_size_y - 2);
1530
1531
2/4
cbs_h266_read_sps:
✗ Branch 502 → 503 not taken.
✓ Branch 502 → 504 taken 973 times.
cbs_h266_write_sps:
✗ Branch 639 → 640 not taken.
✓ Branch 639 → 641 taken 335 times.
1308 flag(sps_isp_enabled_flag);
1532
2/4
cbs_h266_read_sps:
✗ Branch 505 → 506 not taken.
✓ Branch 505 → 507 taken 973 times.
cbs_h266_write_sps:
✗ Branch 642 → 643 not taken.
✓ Branch 642 → 644 taken 335 times.
1308 flag(sps_mrl_enabled_flag);
1533
2/4
cbs_h266_read_sps:
✗ Branch 508 → 509 not taken.
✓ Branch 508 → 510 taken 973 times.
cbs_h266_write_sps:
✗ Branch 645 → 646 not taken.
✓ Branch 645 → 647 taken 335 times.
1308 flag(sps_mip_enabled_flag);
1534
1535
4/4
cbs_h266_read_sps:
✓ Branch 510 → 511 taken 959 times.
✓ Branch 510 → 515 taken 14 times.
cbs_h266_write_sps:
✓ Branch 647 → 648 taken 332 times.
✓ Branch 647 → 651 taken 3 times.
1308 if (current->sps_chroma_format_idc != 0)
1536
2/4
cbs_h266_read_sps:
✗ Branch 512 → 513 not taken.
✓ Branch 512 → 514 taken 959 times.
cbs_h266_write_sps:
✗ Branch 649 → 650 not taken.
✓ Branch 649 → 654 taken 332 times.
1291 flag(sps_cclm_enabled_flag);
1537 else
1538
1/2
✗ Branch 651 → 652 not taken.
✓ Branch 651 → 654 taken 3 times.
17 infer(sps_cclm_enabled_flag, 0);
1539
4/4
cbs_h266_read_sps:
✓ Branch 516 → 517 taken 926 times.
✓ Branch 516 → 524 taken 47 times.
cbs_h266_write_sps:
✓ Branch 654 → 655 taken 329 times.
✓ Branch 654 → 661 taken 6 times.
1308 if (current->sps_chroma_format_idc == 1) {
1540
2/4
cbs_h266_read_sps:
✗ Branch 518 → 519 not taken.
✓ Branch 518 → 520 taken 926 times.
cbs_h266_write_sps:
✗ Branch 656 → 657 not taken.
✓ Branch 656 → 658 taken 329 times.
1255 flag(sps_chroma_horizontal_collocated_flag);
1541
2/4
cbs_h266_read_sps:
✗ Branch 521 → 522 not taken.
✓ Branch 521 → 523 taken 926 times.
cbs_h266_write_sps:
✗ Branch 659 → 660 not taken.
✓ Branch 659 → 667 taken 329 times.
1255 flag(sps_chroma_vertical_collocated_flag);
1542 } else {
1543
1/2
✗ Branch 661 → 662 not taken.
✓ Branch 661 → 664 taken 6 times.
53 infer(sps_chroma_horizontal_collocated_flag, 1);
1544
1/2
✗ Branch 664 → 665 not taken.
✓ Branch 664 → 667 taken 6 times.
53 infer(sps_chroma_vertical_collocated_flag, 1);
1545 }
1546
1547
2/4
cbs_h266_read_sps:
✗ Branch 526 → 527 not taken.
✓ Branch 526 → 528 taken 973 times.
cbs_h266_write_sps:
✗ Branch 668 → 669 not taken.
✓ Branch 668 → 670 taken 335 times.
1308 flag(sps_palette_enabled_flag);
1548
4/4
cbs_h266_read_sps:
✓ Branch 528 → 529 taken 21 times.
✓ Branch 528 → 534 taken 952 times.
cbs_h266_write_sps:
✓ Branch 670 → 671 taken 3 times.
✓ Branch 670 → 676 taken 332 times.
1308 if (current->sps_chroma_format_idc == 3 &&
1549
3/4
cbs_h266_read_sps:
✓ Branch 529 → 530 taken 7 times.
✓ Branch 529 → 534 taken 14 times.
cbs_h266_write_sps:
✗ Branch 671 → 672 not taken.
✓ Branch 671 → 676 taken 3 times.
24 !current->sps_max_luma_transform_size_64_flag)
1550
1/4
cbs_h266_read_sps:
✗ Branch 531 → 532 not taken.
✓ Branch 531 → 533 taken 7 times.
cbs_h266_write_sps:
✗ Branch 673 → 674 not taken.
✗ Branch 673 → 675 not taken.
7 flag(sps_act_enabled_flag);
1551 else
1552
1/2
✗ Branch 676 → 677 not taken.
✓ Branch 676 → 679 taken 335 times.
1301 infer(sps_act_enabled_flag, 0);
1553
4/4
cbs_h266_read_sps:
✓ Branch 535 → 536 taken 572 times.
✓ Branch 535 → 537 taken 401 times.
cbs_h266_write_sps:
✓ Branch 679 → 680 taken 260 times.
✓ Branch 679 → 681 taken 75 times.
1308 if (current->sps_transform_skip_enabled_flag ||
1554
2/4
cbs_h266_read_sps:
✗ Branch 536 → 537 not taken.
✓ Branch 536 → 541 taken 572 times.
cbs_h266_write_sps:
✗ Branch 680 → 681 not taken.
✓ Branch 680 → 685 taken 260 times.
832 current->sps_palette_enabled_flag)
1555
2/4
cbs_h266_read_sps:
✗ Branch 538 → 539 not taken.
✓ Branch 538 → 540 taken 401 times.
cbs_h266_write_sps:
✗ Branch 682 → 683 not taken.
✓ Branch 682 → 684 taken 75 times.
476 ue(sps_min_qp_prime_ts, 0, 8);
1556
1557
2/4
cbs_h266_read_sps:
✗ Branch 542 → 543 not taken.
✓ Branch 542 → 544 taken 973 times.
cbs_h266_write_sps:
✗ Branch 686 → 687 not taken.
✓ Branch 686 → 688 taken 335 times.
1308 flag(sps_ibc_enabled_flag);
1558
3/4
cbs_h266_read_sps:
✓ Branch 544 → 545 taken 29 times.
✓ Branch 544 → 549 taken 944 times.
cbs_h266_write_sps:
✗ Branch 688 → 689 not taken.
✓ Branch 688 → 693 taken 335 times.
1308 if (current->sps_ibc_enabled_flag)
1559
1/4
cbs_h266_read_sps:
✗ Branch 546 → 547 not taken.
✓ Branch 546 → 548 taken 29 times.
cbs_h266_write_sps:
✗ Branch 690 → 691 not taken.
✗ Branch 690 → 692 not taken.
29 ue(sps_six_minus_max_num_ibc_merge_cand, 0, 5);
1560
1561
2/4
cbs_h266_read_sps:
✗ Branch 550 → 551 not taken.
✓ Branch 550 → 552 taken 973 times.
cbs_h266_write_sps:
✗ Branch 694 → 695 not taken.
✓ Branch 694 → 696 taken 335 times.
1308 flag(sps_ladf_enabled_flag);
1562
3/4
cbs_h266_read_sps:
✓ Branch 552 → 553 taken 5 times.
✓ Branch 552 → 568 taken 968 times.
cbs_h266_write_sps:
✗ Branch 696 → 697 not taken.
✓ Branch 696 → 712 taken 335 times.
1308 if (current->sps_ladf_enabled_flag) {
1563
1/4
cbs_h266_read_sps:
✗ Branch 554 → 555 not taken.
✓ Branch 554 → 556 taken 5 times.
cbs_h266_write_sps:
✗ Branch 698 → 699 not taken.
✗ Branch 698 → 700 not taken.
5 ub(2, sps_num_ladf_intervals_minus2);
1564
1/4
cbs_h266_read_sps:
✗ Branch 557 → 558 not taken.
✓ Branch 557 → 559 taken 5 times.
cbs_h266_write_sps:
✗ Branch 701 → 702 not taken.
✗ Branch 701 → 703 not taken.
5 se(sps_ladf_lowest_interval_qp_offset, -63, 63);
1565
2/4
cbs_h266_read_sps:
✓ Branch 567 → 560 taken 10 times.
✓ Branch 567 → 568 taken 5 times.
cbs_h266_write_sps:
✗ Branch 711 → 704 not taken.
✗ Branch 711 → 712 not taken.
15 for (i = 0; i < current->sps_num_ladf_intervals_minus2 + 1; i++) {
1566
1/4
cbs_h266_read_sps:
✗ Branch 561 → 562 not taken.
✓ Branch 561 → 563 taken 10 times.
cbs_h266_write_sps:
✗ Branch 705 → 706 not taken.
✗ Branch 705 → 707 not taken.
10 ses(sps_ladf_qp_offset[i], -63, 63, 1, i);
1567
1/4
cbs_h266_read_sps:
✗ Branch 564 → 565 not taken.
✓ Branch 564 → 566 taken 10 times.
cbs_h266_write_sps:
✗ Branch 708 → 709 not taken.
✗ Branch 708 → 710 not taken.
10 ues(sps_ladf_delta_threshold_minus1[i],
1568 0, (2 << (8 + current->sps_bitdepth_minus8)) - 3, 1, i);
1569 }
1570 }
1571
1572
2/4
cbs_h266_read_sps:
✗ Branch 569 → 570 not taken.
✓ Branch 569 → 571 taken 973 times.
cbs_h266_write_sps:
✗ Branch 713 → 714 not taken.
✓ Branch 713 → 715 taken 335 times.
1308 flag(sps_explicit_scaling_list_enabled_flag);
1573
4/4
cbs_h266_read_sps:
✓ Branch 571 → 572 taken 318 times.
✓ Branch 571 → 577 taken 655 times.
cbs_h266_write_sps:
✓ Branch 715 → 716 taken 60 times.
✓ Branch 715 → 720 taken 275 times.
1308 if (current->sps_lfnst_enabled_flag &&
1574
4/4
cbs_h266_read_sps:
✓ Branch 572 → 573 taken 33 times.
✓ Branch 572 → 577 taken 285 times.
cbs_h266_write_sps:
✓ Branch 716 → 717 taken 6 times.
✓ Branch 716 → 720 taken 54 times.
378 current->sps_explicit_scaling_list_enabled_flag)
1575
2/4
cbs_h266_read_sps:
✗ Branch 574 → 575 not taken.
✓ Branch 574 → 576 taken 33 times.
cbs_h266_write_sps:
✗ Branch 718 → 719 not taken.
✓ Branch 718 → 720 taken 6 times.
39 flag(sps_scaling_matrix_for_lfnst_disabled_flag);
1576
1577
3/4
cbs_h266_read_sps:
✓ Branch 577 → 578 taken 7 times.
✓ Branch 577 → 583 taken 966 times.
cbs_h266_write_sps:
✗ Branch 720 → 721 not taken.
✓ Branch 720 → 726 taken 335 times.
1308 if (current->sps_act_enabled_flag &&
1578
1/4
cbs_h266_read_sps:
✗ Branch 578 → 579 not taken.
✓ Branch 578 → 583 taken 7 times.
cbs_h266_write_sps:
✗ Branch 721 → 722 not taken.
✗ Branch 721 → 726 not taken.
7 current->sps_explicit_scaling_list_enabled_flag)
1579
0/4
cbs_h266_read_sps:
✗ Branch 580 → 581 not taken.
✗ Branch 580 → 582 not taken.
cbs_h266_write_sps:
✗ Branch 723 → 724 not taken.
✗ Branch 723 → 725 not taken.
✗ flag(sps_scaling_matrix_for_alternative_colour_space_disabled_flag);
1580 else
1581
1/2
✗ Branch 726 → 727 not taken.
✓ Branch 726 → 729 taken 335 times.
1308 infer(sps_scaling_matrix_for_alternative_colour_space_disabled_flag, 0);
1582
2/4
cbs_h266_read_sps:
✗ Branch 584 → 585 not taken.
✓ Branch 584 → 589 taken 973 times.
cbs_h266_write_sps:
✗ Branch 729 → 730 not taken.
✓ Branch 729 → 733 taken 335 times.
1308 if (current->sps_scaling_matrix_for_alternative_colour_space_disabled_flag)
1583
0/4
cbs_h266_read_sps:
✗ Branch 586 → 587 not taken.
✗ Branch 586 → 588 not taken.
cbs_h266_write_sps:
✗ Branch 731 → 732 not taken.
✗ Branch 731 → 733 not taken.
✗ flag(sps_scaling_matrix_designated_colour_space_flag);
1584
1585
2/4
cbs_h266_read_sps:
✗ Branch 590 → 591 not taken.
✓ Branch 590 → 592 taken 973 times.
cbs_h266_write_sps:
✗ Branch 734 → 735 not taken.
✓ Branch 734 → 736 taken 335 times.
1308 flag(sps_dep_quant_enabled_flag);
1586
2/4
cbs_h266_read_sps:
✗ Branch 593 → 594 not taken.
✓ Branch 593 → 595 taken 973 times.
cbs_h266_write_sps:
✗ Branch 737 → 738 not taken.
✓ Branch 737 → 739 taken 335 times.
1308 flag(sps_sign_data_hiding_enabled_flag);
1587
1588
2/4
cbs_h266_read_sps:
✗ Branch 596 → 597 not taken.
✓ Branch 596 → 598 taken 973 times.
cbs_h266_write_sps:
✗ Branch 740 → 741 not taken.
✓ Branch 740 → 742 taken 335 times.
1308 flag(sps_virtual_boundaries_enabled_flag);
1589
3/4
cbs_h266_read_sps:
✓ Branch 598 → 599 taken 5 times.
✓ Branch 598 → 627 taken 968 times.
cbs_h266_write_sps:
✗ Branch 742 → 743 not taken.
✓ Branch 742 → 771 taken 335 times.
1308 if (current->sps_virtual_boundaries_enabled_flag) {
1590
1/4
cbs_h266_read_sps:
✗ Branch 600 → 601 not taken.
✓ Branch 600 → 602 taken 5 times.
cbs_h266_write_sps:
✗ Branch 744 → 745 not taken.
✗ Branch 744 → 746 not taken.
5 u(1, sps_virtual_boundaries_present_flag, 0, !current->sps_res_change_in_clvs_allowed_flag);
1591
1/4
cbs_h266_read_sps:
✓ Branch 602 → 603 taken 5 times.
✗ Branch 602 → 628 not taken.
cbs_h266_write_sps:
✗ Branch 746 → 747 not taken.
✗ Branch 746 → 780 not taken.
5 if (current->sps_virtual_boundaries_present_flag) {
1592
2/8
cbs_h266_read_sps:
✗ Branch 603 → 604 not taken.
✓ Branch 603 → 605 taken 5 times.
✗ Branch 607 → 608 not taken.
✓ Branch 607 → 609 taken 5 times.
cbs_h266_write_sps:
✗ Branch 747 → 748 not taken.
✗ Branch 747 → 749 not taken.
✗ Branch 751 → 752 not taken.
✗ Branch 751 → 753 not taken.
5 ue(sps_num_ver_virtual_boundaries,
1593 0, current->sps_pic_width_max_in_luma_samples <= 8 ? 0 : VVC_MAX_VBS);
1594
1/4
cbs_h266_read_sps:
✗ Branch 614 → 610 not taken.
✓ Branch 614 → 615 taken 5 times.
cbs_h266_write_sps:
✗ Branch 758 → 754 not taken.
✗ Branch 758 → 759 not taken.
5 for (i = 0; i < current->sps_num_ver_virtual_boundaries; i++)
1595
0/4
cbs_h266_read_sps:
✗ Branch 611 → 612 not taken.
✗ Branch 611 → 613 not taken.
cbs_h266_write_sps:
✗ Branch 755 → 756 not taken.
✗ Branch 755 → 757 not taken.
✗ ues(sps_virtual_boundary_pos_x_minus1[i],
1596 0, (current->sps_pic_width_max_in_luma_samples + 7) / 8 - 2,
1597 1, i);
1598
2/8
cbs_h266_read_sps:
✗ Branch 615 → 616 not taken.
✓ Branch 615 → 617 taken 5 times.
✗ Branch 619 → 620 not taken.
✓ Branch 619 → 621 taken 5 times.
cbs_h266_write_sps:
✗ Branch 759 → 760 not taken.
✗ Branch 759 → 761 not taken.
✗ Branch 763 → 764 not taken.
✗ Branch 763 → 765 not taken.
5 ue(sps_num_hor_virtual_boundaries,
1599 0, current->sps_pic_height_max_in_luma_samples <= 8 ? 0 : VVC_MAX_VBS);
1600
1/4
cbs_h266_read_sps:
✗ Branch 626 → 622 not taken.
✓ Branch 626 → 628 taken 5 times.
cbs_h266_write_sps:
✗ Branch 770 → 766 not taken.
✗ Branch 770 → 780 not taken.
5 for (i = 0; i < current->sps_num_hor_virtual_boundaries; i++)
1601
0/4
cbs_h266_read_sps:
✗ Branch 623 → 624 not taken.
✗ Branch 623 → 625 not taken.
cbs_h266_write_sps:
✗ Branch 767 → 768 not taken.
✗ Branch 767 → 769 not taken.
✗ ues(sps_virtual_boundary_pos_y_minus1[i],
1602 0, (current->sps_pic_height_max_in_luma_samples + 7) /
1603 8 - 2, 1, i);
1604 }
1605 } else {
1606
1/2
✗ Branch 771 → 772 not taken.
✓ Branch 771 → 774 taken 335 times.
1303 infer(sps_virtual_boundaries_present_flag, 0);
1607
1/2
✗ Branch 774 → 775 not taken.
✓ Branch 774 → 777 taken 335 times.
1303 infer(sps_num_ver_virtual_boundaries, 0);
1608
1/2
✗ Branch 777 → 778 not taken.
✓ Branch 777 → 780 taken 335 times.
1303 infer(sps_num_hor_virtual_boundaries, 0);
1609 }
1610
1611
2/4
cbs_h266_read_sps:
✓ Branch 628 → 629 taken 973 times.
✗ Branch 628 → 648 not taken.
cbs_h266_write_sps:
✓ Branch 780 → 781 taken 335 times.
✗ Branch 780 → 801 not taken.
1308 if (current->sps_ptl_dpb_hrd_params_present_flag) {
1612
2/4
cbs_h266_read_sps:
✗ Branch 630 → 631 not taken.
✓ Branch 630 → 632 taken 973 times.
cbs_h266_write_sps:
✗ Branch 782 → 783 not taken.
✓ Branch 782 → 784 taken 335 times.
1308 flag(sps_timing_hrd_params_present_flag);
1613
4/4
cbs_h266_read_sps:
✓ Branch 632 → 633 taken 33 times.
✓ Branch 632 → 648 taken 940 times.
cbs_h266_write_sps:
✓ Branch 784 → 785 taken 3 times.
✓ Branch 784 → 801 taken 332 times.
1308 if (current->sps_timing_hrd_params_present_flag) {
1614 uint8_t first_sublayer;
1615
2/4
cbs_h266_read_sps:
✗ Branch 634 → 635 not taken.
✓ Branch 634 → 636 taken 33 times.
cbs_h266_write_sps:
✗ Branch 786 → 787 not taken.
✓ Branch 786 → 788 taken 3 times.
36 CHECK(FUNC(general_timing_hrd_parameters) (ctx, rw,
1616 &current->sps_general_timing_hrd_parameters));
1617
3/4
cbs_h266_read_sps:
✓ Branch 636 → 637 taken 14 times.
✓ Branch 636 → 641 taken 19 times.
cbs_h266_write_sps:
✓ Branch 788 → 789 taken 3 times.
✗ Branch 788 → 792 not taken.
36 if (current->sps_max_sublayers_minus1 > 0)
1618
2/4
cbs_h266_read_sps:
✗ Branch 638 → 639 not taken.
✓ Branch 638 → 640 taken 14 times.
cbs_h266_write_sps:
✗ Branch 790 → 791 not taken.
✓ Branch 790 → 795 taken 3 times.
17 flag(sps_sublayer_cpb_params_present_flag);
1619 else
1620
0/2
✗ Branch 792 → 793 not taken.
✗ Branch 792 → 795 not taken.
19 infer(sps_sublayer_cpb_params_present_flag, 0);
1621
3/4
cbs_h266_read_sps:
✓ Branch 642 → 643 taken 19 times.
✓ Branch 642 → 644 taken 14 times.
cbs_h266_write_sps:
✗ Branch 795 → 796 not taken.
✓ Branch 795 → 797 taken 3 times.
36 first_sublayer = current->sps_sublayer_cpb_params_present_flag ?
1622 0 : current->sps_max_sublayers_minus1;
1623
2/4
cbs_h266_read_sps:
✗ Branch 646 → 647 not taken.
✓ Branch 646 → 648 taken 33 times.
cbs_h266_write_sps:
✗ Branch 799 → 800 not taken.
✓ Branch 799 → 801 taken 3 times.
36 CHECK(FUNC(ols_timing_hrd_parameters) (ctx, rw,
1624 &current->sps_ols_timing_hrd_parameters, first_sublayer,
1625 current->sps_max_sublayers_minus1,
1626 &current->sps_general_timing_hrd_parameters));
1627 }
1628 }
1629
1630
2/4
cbs_h266_read_sps:
✗ Branch 649 → 650 not taken.
✓ Branch 649 → 651 taken 973 times.
cbs_h266_write_sps:
✗ Branch 802 → 803 not taken.
✓ Branch 802 → 804 taken 335 times.
1308 flag(sps_field_seq_flag);
1631
2/4
cbs_h266_read_sps:
✗ Branch 652 → 653 not taken.
✓ Branch 652 → 654 taken 973 times.
cbs_h266_write_sps:
✗ Branch 805 → 806 not taken.
✓ Branch 805 → 807 taken 335 times.
1308 flag(sps_vui_parameters_present_flag);
1632
4/4
cbs_h266_read_sps:
✓ Branch 654 → 655 taken 28 times.
✓ Branch 654 → 668 taken 945 times.
cbs_h266_write_sps:
✓ Branch 807 → 808 taken 3 times.
✓ Branch 807 → 821 taken 332 times.
1308 if (current->sps_vui_parameters_present_flag) {
1633
2/4
cbs_h266_read_sps:
✗ Branch 656 → 657 not taken.
✓ Branch 656 → 658 taken 28 times.
cbs_h266_write_sps:
✗ Branch 809 → 810 not taken.
✓ Branch 809 → 811 taken 3 times.
31 ue(sps_vui_payload_size_minus1, 0, 1023);
1634
4/4
cbs_h266_read_sps:
✓ Branch 664 → 659 taken 122 times.
✓ Branch 664 → 665 taken 28 times.
cbs_h266_write_sps:
✓ Branch 817 → 812 taken 9 times.
✓ Branch 817 → 818 taken 3 times.
162 while (byte_alignment(rw) != 0)
1635
2/4
cbs_h266_read_sps:
✗ Branch 660 → 661 not taken.
✓ Branch 660 → 662 taken 122 times.
cbs_h266_write_sps:
✗ Branch 813 → 814 not taken.
✓ Branch 813 → 815 taken 9 times.
131 fixed(1, sps_vui_alignment_zero_bit, 0);
1636
2/4
cbs_h266_read_sps:
✗ Branch 666 → 667 not taken.
✓ Branch 666 → 671 taken 28 times.
cbs_h266_write_sps:
✗ Branch 819 → 820 not taken.
✓ Branch 819 → 824 taken 3 times.
31 CHECK(FUNC(vui_payload) (ctx, rw, &current->vui,
1637 current->sps_vui_payload_size_minus1 + 1,
1638 current->sps_chroma_format_idc));
1639 } else {
1640
2/4
cbs_h266_read_sps:
✗ Branch 669 → 670 not taken.
✓ Branch 669 → 671 taken 945 times.
cbs_h266_write_sps:
✗ Branch 822 → 823 not taken.
✓ Branch 822 → 824 taken 332 times.
1277 CHECK(FUNC(vui_parameters_default) (ctx, rw, &current->vui));
1641 }
1642
1643
2/4
cbs_h266_read_sps:
✗ Branch 672 → 673 not taken.
✓ Branch 672 → 674 taken 973 times.
cbs_h266_write_sps:
✗ Branch 825 → 826 not taken.
✓ Branch 825 → 827 taken 335 times.
1308 flag(sps_extension_flag);
1644
2/4
cbs_h266_read_sps:
✗ Branch 674 → 675 not taken.
✓ Branch 674 → 688 taken 973 times.
cbs_h266_write_sps:
✗ Branch 827 → 828 not taken.
✓ Branch 827 → 855 taken 335 times.
1308 if (current->sps_extension_flag) {
1645
0/4
cbs_h266_read_sps:
✗ Branch 676 → 677 not taken.
✗ Branch 676 → 678 not taken.
cbs_h266_write_sps:
✗ Branch 829 → 830 not taken.
✗ Branch 829 → 831 not taken.
✗ flag(sps_range_extension_flag);
1646
0/4
cbs_h266_read_sps:
✗ Branch 679 → 680 not taken.
✗ Branch 679 → 681 not taken.
cbs_h266_write_sps:
✗ Branch 832 → 833 not taken.
✗ Branch 832 → 834 not taken.
✗ ub(7, sps_extension_7bits);
1647
1648
0/4
cbs_h266_read_sps:
✗ Branch 681 → 682 not taken.
✗ Branch 681 → 687 not taken.
cbs_h266_write_sps:
✗ Branch 834 → 835 not taken.
✗ Branch 834 → 840 not taken.
✗ if (current->sps_range_extension_flag) {
1649
0/4
cbs_h266_read_sps:
✗ Branch 682 → 683 not taken.
✗ Branch 682 → 684 not taken.
cbs_h266_write_sps:
✗ Branch 835 → 836 not taken.
✗ Branch 835 → 837 not taken.
✗ if (current->sps_bitdepth_minus8 <= 10 - 8)
1650 ✗ return AVERROR_INVALIDDATA;
1651
0/4
cbs_h266_read_sps:
✗ Branch 685 → 686 not taken.
✗ Branch 685 → 689 not taken.
cbs_h266_write_sps:
✗ Branch 838 → 839 not taken.
✗ Branch 838 → 876 not taken.
✗ CHECK(FUNC(sps_range_extension)(ctx, rw, current));
1652 } else {
1653
0/2
✗ Branch 840 → 841 not taken.
✗ Branch 840 → 843 not taken.
✗ infer(sps_extended_precision_flag, 0);
1654
0/2
✗ Branch 843 → 844 not taken.
✗ Branch 843 → 846 not taken.
✗ infer(sps_ts_residual_coding_rice_present_in_sh_flag, 0);
1655
0/2
✗ Branch 846 → 847 not taken.
✗ Branch 846 → 849 not taken.
✗ infer(sps_rrc_rice_extension_flag, 0);
1656
0/2
✗ Branch 849 → 850 not taken.
✗ Branch 849 → 852 not taken.
✗ infer(sps_persistent_rice_adaptation_enabled_flag, 0);
1657
0/2
✗ Branch 852 → 853 not taken.
✗ Branch 852 → 876 not taken.
✗ infer(sps_reverse_last_sig_coeff_enabled_flag, 0);
1658 }
1659 } else {
1660
1/2
✗ Branch 855 → 856 not taken.
✓ Branch 855 → 858 taken 335 times.
1308 infer(sps_range_extension_flag, 0);
1661
1/2
✗ Branch 858 → 859 not taken.
✓ Branch 858 → 861 taken 335 times.
1308 infer(sps_extension_7bits, 0);
1662
1/2
✗ Branch 861 → 862 not taken.
✓ Branch 861 → 864 taken 335 times.
1308 infer(sps_extended_precision_flag, 0);
1663
1/2
✗ Branch 864 → 865 not taken.
✓ Branch 864 → 867 taken 335 times.
1308 infer(sps_ts_residual_coding_rice_present_in_sh_flag, 0);
1664
1/2
✗ Branch 867 → 868 not taken.
✓ Branch 867 → 870 taken 335 times.
1308 infer(sps_rrc_rice_extension_flag, 0);
1665
1/2
✗ Branch 870 → 871 not taken.
✓ Branch 870 → 873 taken 335 times.
1308 infer(sps_persistent_rice_adaptation_enabled_flag, 0);
1666
1/2
✗ Branch 873 → 874 not taken.
✓ Branch 873 → 876 taken 335 times.
1308 infer(sps_reverse_last_sig_coeff_enabled_flag, 0);
1667 }
1668
1669
2/4
cbs_h266_read_sps:
✗ Branch 689 → 690 not taken.
✓ Branch 689 → 693 taken 973 times.
cbs_h266_write_sps:
✗ Branch 876 → 877 not taken.
✓ Branch 876 → 880 taken 335 times.
1308 if (current->sps_extension_7bits)
1670
0/4
cbs_h266_read_sps:
✗ Branch 691 → 692 not taken.
✗ Branch 691 → 693 not taken.
cbs_h266_write_sps:
✗ Branch 878 → 879 not taken.
✗ Branch 878 → 880 not taken.
✗ CHECK(FUNC(extension_data)(ctx, rw, &current->extension_data));
1671
1672
2/4
cbs_h266_read_sps:
✗ Branch 694 → 695 not taken.
✓ Branch 694 → 696 taken 973 times.
cbs_h266_write_sps:
✗ Branch 881 → 882 not taken.
✓ Branch 881 → 883 taken 335 times.
1308 CHECK(FUNC(rbsp_trailing_bits) (ctx, rw));
1673
1674 1308 return 0;
1675 }
1676
1677 1941 static int FUNC(pps) (CodedBitstreamContext *ctx, RWContext *rw,
1678 H266RawPPS *current)
1679 {
1680 1941 CodedBitstreamH266Context *h266 = ctx->priv_data;
1681 const H266RawSPS *sps;
1682 int err, i;
1683 unsigned int min_cb_size_y, divisor, ctb_size_y,
1684 pic_width_in_ctbs_y, pic_height_in_ctbs_y;
1685 uint8_t sub_width_c, sub_height_c, qp_bd_offset;
1686
1687 static const uint8_t h266_sub_width_c[] = {
1688 1, 2, 2, 1
1689 };
1690 static const uint8_t h266_sub_height_c[] = {
1691 1, 2, 1, 1
1692 };
1693
1694 1941 HEADER("Picture Parameter Set");
1695
1696
2/4
cbs_h266_read_pps:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 391 times.
1941 CHECK(FUNC(nal_unit_header) (ctx, rw,
1697 &current->nal_unit_header, VVC_PPS_NUT));
1698
1699
2/4
cbs_h266_read_pps:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 391 times.
1941 ub(6, pps_pic_parameter_set_id);
1700
2/4
cbs_h266_read_pps:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 391 times.
1941 ub(4, pps_seq_parameter_set_id);
1701 1941 sps = h266->sps[current->pps_seq_parameter_set_id];
1702
2/4
cbs_h266_read_pps:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 15 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 15 taken 391 times.
1941 if (!sps) {
1703 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR, "SPS id %d not available.\n",
1704 ✗ current->pps_seq_parameter_set_id);
1705 ✗ return AVERROR_INVALIDDATA;
1706 }
1707
1708
2/4
cbs_h266_read_pps:
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 18 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 18 taken 391 times.
1941 flag(pps_mixed_nalu_types_in_pic_flag);
1709
2/4
cbs_h266_read_pps:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 391 times.
1941 ue(pps_pic_width_in_luma_samples,
1710 1, sps->sps_pic_width_max_in_luma_samples);
1711
2/4
cbs_h266_read_pps:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 24 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 24 taken 391 times.
1941 ue(pps_pic_height_in_luma_samples,
1712 1, sps->sps_pic_height_max_in_luma_samples);
1713
1714 1941 min_cb_size_y = 1 << (sps->sps_log2_min_luma_coding_block_size_minus2 + 2);
1715 1941 divisor = FFMAX(min_cb_size_y, 8);
1716
2/4
cbs_h266_read_pps:
✓ Branch 24 → 25 taken 1550 times.
✗ Branch 24 → 26 not taken.
cbs_h266_write_pps:
✓ Branch 24 → 25 taken 391 times.
✗ Branch 24 → 26 not taken.
1941 if (current->pps_pic_width_in_luma_samples % divisor ||
1717
2/4
cbs_h266_read_pps:
✗ Branch 25 → 26 not taken.
✓ Branch 25 → 28 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 25 → 26 not taken.
✓ Branch 25 → 28 taken 391 times.
1941 current->pps_pic_height_in_luma_samples % divisor) {
1718 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
1719 "Invalid dimensions: %ux%u not divisible "
1720 "by %u, MinCbSizeY = %u.\n",
1721 ✗ current->pps_pic_width_in_luma_samples,
1722 ✗ current->pps_pic_height_in_luma_samples, divisor, min_cb_size_y);
1723 ✗ return AVERROR_INVALIDDATA;
1724 }
1725
3/4
cbs_h266_read_pps:
✓ Branch 28 → 29 taken 1536 times.
✓ Branch 28 → 33 taken 14 times.
cbs_h266_write_pps:
✓ Branch 28 → 29 taken 391 times.
✗ Branch 28 → 33 not taken.
1941 if (!sps->sps_res_change_in_clvs_allowed_flag &&
1726 1927 (current->pps_pic_width_in_luma_samples !=
1727
2/4
cbs_h266_read_pps:
✓ Branch 29 → 30 taken 1536 times.
✗ Branch 29 → 31 not taken.
cbs_h266_write_pps:
✓ Branch 29 → 30 taken 391 times.
✗ Branch 29 → 31 not taken.
1927 sps->sps_pic_width_max_in_luma_samples ||
1728 1927 current->pps_pic_height_in_luma_samples !=
1729
2/4
cbs_h266_read_pps:
✗ Branch 30 → 31 not taken.
✓ Branch 30 → 33 taken 1536 times.
cbs_h266_write_pps:
✗ Branch 30 → 31 not taken.
✓ Branch 30 → 33 taken 391 times.
1927 sps->sps_pic_height_max_in_luma_samples)) {
1730 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
1731 "Resolution change is not allowed, "
1732 "in max resolution (%ux%u) mismatched with pps(%ux%u).\n",
1733 ✗ sps->sps_pic_width_max_in_luma_samples,
1734 ✗ sps->sps_pic_height_max_in_luma_samples,
1735 ✗ current->pps_pic_width_in_luma_samples,
1736 ✗ current->pps_pic_height_in_luma_samples);
1737 ✗ return AVERROR_INVALIDDATA;
1738 }
1739
1740 1941 ctb_size_y = 1 << (sps->sps_log2_ctu_size_minus5 + 5);
1741
4/4
cbs_h266_read_pps:
✓ Branch 33 → 34 taken 10 times.
✓ Branch 33 → 37 taken 1540 times.
cbs_h266_write_pps:
✓ Branch 33 → 34 taken 2 times.
✓ Branch 33 → 37 taken 389 times.
1941 if (sps->sps_ref_wraparound_enabled_flag) {
1742 12 if ((ctb_size_y / min_cb_size_y + 1) >
1743
2/4
cbs_h266_read_pps:
✗ Branch 34 → 35 not taken.
✓ Branch 34 → 37 taken 10 times.
cbs_h266_write_pps:
✗ Branch 34 → 35 not taken.
✓ Branch 34 → 37 taken 2 times.
12 (current->pps_pic_width_in_luma_samples / min_cb_size_y - 1)) {
1744 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
1745 "Invalid width(%u), ctb_size_y = %u, min_cb_size_y = %u.\n",
1746 ✗ current->pps_pic_width_in_luma_samples,
1747 ctb_size_y, min_cb_size_y);
1748 ✗ return AVERROR_INVALIDDATA;
1749 }
1750 }
1751
1752
2/4
cbs_h266_read_pps:
✗ Branch 38 → 39 not taken.
✓ Branch 38 → 40 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 38 → 39 not taken.
✓ Branch 38 → 40 taken 391 times.
1941 flag(pps_conformance_window_flag);
1753 1941 if (current->pps_pic_width_in_luma_samples ==
1754
3/4
cbs_h266_read_pps:
✓ Branch 40 → 41 taken 1543 times.
✓ Branch 40 → 45 taken 7 times.
cbs_h266_write_pps:
✓ Branch 40 → 41 taken 391 times.
✗ Branch 40 → 45 not taken.
1941 sps->sps_pic_width_max_in_luma_samples &&
1755 1934 current->pps_pic_height_in_luma_samples ==
1756
2/4
cbs_h266_read_pps:
✓ Branch 41 → 42 taken 1543 times.
✗ Branch 41 → 45 not taken.
cbs_h266_write_pps:
✓ Branch 41 → 42 taken 391 times.
✗ Branch 41 → 45 not taken.
1934 sps->sps_pic_height_max_in_luma_samples &&
1757
2/4
cbs_h266_read_pps:
✗ Branch 42 → 43 not taken.
✓ Branch 42 → 45 taken 1543 times.
cbs_h266_write_pps:
✗ Branch 42 → 43 not taken.
✓ Branch 42 → 45 taken 391 times.
1934 current->pps_conformance_window_flag) {
1758 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
1759 "Conformance window flag should not true.\n");
1760 ✗ return AVERROR_INVALIDDATA;
1761 }
1762
1763 1941 sub_width_c = h266_sub_width_c[sps->sps_chroma_format_idc];
1764 1941 sub_height_c = h266_sub_height_c[sps->sps_chroma_format_idc];
1765
2/4
cbs_h266_read_pps:
✗ Branch 45 → 46 not taken.
✓ Branch 45 → 62 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 45 → 46 not taken.
✓ Branch 45 → 62 taken 391 times.
1941 if (current->pps_conformance_window_flag) {
1766
0/4
cbs_h266_read_pps:
✗ Branch 47 → 48 not taken.
✗ Branch 47 → 49 not taken.
cbs_h266_write_pps:
✗ Branch 47 → 48 not taken.
✗ Branch 47 → 49 not taken.
✗ ue(pps_conf_win_left_offset, 0, current->pps_pic_width_in_luma_samples);
1767
0/4
cbs_h266_read_pps:
✗ Branch 50 → 51 not taken.
✗ Branch 50 → 52 not taken.
cbs_h266_write_pps:
✗ Branch 50 → 51 not taken.
✗ Branch 50 → 52 not taken.
✗ ue(pps_conf_win_right_offset,
1768 0, current->pps_pic_width_in_luma_samples);
1769
0/4
cbs_h266_read_pps:
✗ Branch 53 → 54 not taken.
✗ Branch 53 → 55 not taken.
cbs_h266_write_pps:
✗ Branch 53 → 54 not taken.
✗ Branch 53 → 55 not taken.
✗ ue(pps_conf_win_top_offset, 0, current->pps_pic_height_in_luma_samples);
1770
0/4
cbs_h266_read_pps:
✗ Branch 56 → 57 not taken.
✗ Branch 56 → 58 not taken.
cbs_h266_write_pps:
✗ Branch 56 → 57 not taken.
✗ Branch 56 → 58 not taken.
✗ ue(pps_conf_win_bottom_offset,
1771 0, current->pps_pic_height_in_luma_samples);
1772 ✗ if (sub_width_c *
1773 ✗ (current->pps_conf_win_left_offset +
1774 ✗ current->pps_conf_win_right_offset) >=
1775
0/4
cbs_h266_read_pps:
✗ Branch 58 → 59 not taken.
✗ Branch 58 → 60 not taken.
cbs_h266_write_pps:
✗ Branch 58 → 59 not taken.
✗ Branch 58 → 60 not taken.
✗ current->pps_pic_width_in_luma_samples ||
1776 ✗ sub_height_c *
1777 ✗ (current->pps_conf_win_top_offset +
1778 ✗ current->pps_conf_win_bottom_offset) >=
1779
0/4
cbs_h266_read_pps:
✗ Branch 59 → 60 not taken.
✗ Branch 59 → 66 not taken.
cbs_h266_write_pps:
✗ Branch 59 → 60 not taken.
✗ Branch 59 → 89 not taken.
✗ current->pps_pic_height_in_luma_samples) {
1780 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
1781 "Invalid pps conformance window: (%u, %u, %u, %u), "
1782 "resolution is %ux%u, sub wxh is %ux%u.\n",
1783 ✗ current->pps_conf_win_left_offset,
1784 ✗ current->pps_conf_win_right_offset,
1785 ✗ current->pps_conf_win_top_offset,
1786 ✗ current->pps_conf_win_bottom_offset,
1787 ✗ current->pps_pic_width_in_luma_samples,
1788 ✗ current->pps_pic_height_in_luma_samples,
1789 sub_width_c, sub_height_c);
1790 ✗ return AVERROR_INVALIDDATA;
1791 }
1792 } else {
1793 1941 if (current->pps_pic_width_in_luma_samples ==
1794
3/4
cbs_h266_read_pps:
✓ Branch 62 → 63 taken 1543 times.
✓ Branch 62 → 65 taken 7 times.
cbs_h266_write_pps:
✓ Branch 62 → 63 taken 391 times.
✗ Branch 62 → 77 not taken.
1941 sps->sps_pic_width_max_in_luma_samples &&
1795 1934 current->pps_pic_height_in_luma_samples ==
1796
2/4
cbs_h266_read_pps:
✓ Branch 63 → 64 taken 1543 times.
✗ Branch 63 → 65 not taken.
cbs_h266_write_pps:
✓ Branch 63 → 64 taken 391 times.
✗ Branch 63 → 77 not taken.
1934 sps->sps_pic_height_max_in_luma_samples) {
1797
1/2
✗ Branch 64 → 65 not taken.
✓ Branch 64 → 67 taken 391 times.
1934 infer(pps_conf_win_left_offset, sps->sps_conf_win_left_offset);
1798
1/2
✗ Branch 67 → 68 not taken.
✓ Branch 67 → 70 taken 391 times.
1934 infer(pps_conf_win_right_offset, sps->sps_conf_win_right_offset);
1799
1/2
✗ Branch 70 → 71 not taken.
✓ Branch 70 → 73 taken 391 times.
1934 infer(pps_conf_win_top_offset, sps->sps_conf_win_top_offset);
1800
1/2
✗ Branch 73 → 74 not taken.
✓ Branch 73 → 76 taken 391 times.
1934 infer(pps_conf_win_bottom_offset, sps->sps_conf_win_bottom_offset);
1801 } else {
1802
0/2
✗ Branch 77 → 78 not taken.
✗ Branch 77 → 80 not taken.
7 infer(pps_conf_win_left_offset, 0);
1803
0/2
✗ Branch 80 → 81 not taken.
✗ Branch 80 → 83 not taken.
7 infer(pps_conf_win_right_offset, 0);
1804
0/2
✗ Branch 83 → 84 not taken.
✗ Branch 83 → 86 not taken.
7 infer(pps_conf_win_top_offset, 0);
1805
0/2
✗ Branch 86 → 87 not taken.
✗ Branch 86 → 89 not taken.
7 infer(pps_conf_win_bottom_offset, 0);
1806 }
1807
1808 }
1809
1810
2/4
cbs_h266_read_pps:
✗ Branch 67 → 68 not taken.
✓ Branch 67 → 69 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 90 → 91 not taken.
✓ Branch 90 → 92 taken 391 times.
1941 flag(pps_scaling_window_explicit_signalling_flag);
1811
3/4
cbs_h266_read_pps:
✓ Branch 69 → 70 taken 386 times.
✓ Branch 69 → 73 taken 1164 times.
cbs_h266_write_pps:
✗ Branch 92 → 93 not taken.
✓ Branch 92 → 96 taken 391 times.
1941 if (!sps->sps_ref_pic_resampling_enabled_flag &&
1812
1/4
cbs_h266_read_pps:
✗ Branch 70 → 71 not taken.
✓ Branch 70 → 73 taken 386 times.
cbs_h266_write_pps:
✗ Branch 93 → 94 not taken.
✗ Branch 93 → 96 not taken.
386 current->pps_scaling_window_explicit_signalling_flag) {
1813 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
1814 "Invalid data: sps_ref_pic_resampling_enabled_flag is false, "
1815 "but pps_scaling_window_explicit_signalling_flag is true.\n");
1816 ✗ return AVERROR_INVALIDDATA;
1817 }
1818
2/4
cbs_h266_read_pps:
✗ Branch 73 → 74 not taken.
✓ Branch 73 → 87 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 96 → 97 not taken.
✓ Branch 96 → 110 taken 391 times.
1941 if (current->pps_scaling_window_explicit_signalling_flag) {
1819
0/4
cbs_h266_read_pps:
✗ Branch 75 → 76 not taken.
✗ Branch 75 → 77 not taken.
cbs_h266_write_pps:
✗ Branch 98 → 99 not taken.
✗ Branch 98 → 100 not taken.
✗ se(pps_scaling_win_left_offset,
1820 -current->pps_pic_width_in_luma_samples * 15 / sub_width_c,
1821 current->pps_pic_width_in_luma_samples / sub_width_c);
1822
0/4
cbs_h266_read_pps:
✗ Branch 78 → 79 not taken.
✗ Branch 78 → 80 not taken.
cbs_h266_write_pps:
✗ Branch 101 → 102 not taken.
✗ Branch 101 → 103 not taken.
✗ se(pps_scaling_win_right_offset,
1823 -current->pps_pic_width_in_luma_samples * 15 / sub_width_c,
1824 current->pps_pic_width_in_luma_samples / sub_width_c);
1825
0/4
cbs_h266_read_pps:
✗ Branch 81 → 82 not taken.
✗ Branch 81 → 83 not taken.
cbs_h266_write_pps:
✗ Branch 104 → 105 not taken.
✗ Branch 104 → 106 not taken.
✗ se(pps_scaling_win_top_offset,
1826 -current->pps_pic_height_in_luma_samples * 15 / sub_height_c,
1827 current->pps_pic_height_in_luma_samples / sub_height_c);
1828
0/4
cbs_h266_read_pps:
✗ Branch 84 → 85 not taken.
✗ Branch 84 → 86 not taken.
cbs_h266_write_pps:
✗ Branch 107 → 108 not taken.
✗ Branch 107 → 109 not taken.
✗ se(pps_scaling_win_bottom_offset,
1829 -current->pps_pic_height_in_luma_samples * 15 / sub_height_c,
1830 current->pps_pic_height_in_luma_samples / sub_height_c);
1831 } else {
1832
1/2
✗ Branch 110 → 111 not taken.
✓ Branch 110 → 113 taken 391 times.
1941 infer(pps_scaling_win_left_offset, current->pps_conf_win_left_offset);
1833
1/2
✗ Branch 113 → 114 not taken.
✓ Branch 113 → 116 taken 391 times.
1941 infer(pps_scaling_win_right_offset, current->pps_conf_win_right_offset);
1834
1/2
✗ Branch 116 → 117 not taken.
✓ Branch 116 → 119 taken 391 times.
1941 infer(pps_scaling_win_top_offset, current->pps_conf_win_top_offset);
1835
1/2
✗ Branch 119 → 120 not taken.
✓ Branch 119 → 122 taken 391 times.
1941 infer(pps_scaling_win_bottom_offset, current->pps_conf_win_bottom_offset);
1836 }
1837
1838
2/4
cbs_h266_read_pps:
✗ Branch 89 → 90 not taken.
✓ Branch 89 → 91 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 123 → 124 not taken.
✓ Branch 123 → 125 taken 391 times.
1941 flag(pps_output_flag_present_flag);
1839
2/4
cbs_h266_read_pps:
✗ Branch 92 → 93 not taken.
✓ Branch 92 → 94 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 126 → 127 not taken.
✓ Branch 126 → 128 taken 391 times.
1941 flag(pps_no_pic_partition_flag);
1840
2/4
cbs_h266_read_pps:
✗ Branch 95 → 96 not taken.
✓ Branch 95 → 97 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 129 → 130 not taken.
✓ Branch 129 → 131 taken 391 times.
1941 flag(pps_subpic_id_mapping_present_flag);
1841
1842
4/4
cbs_h266_read_pps:
✓ Branch 97 → 98 taken 14 times.
✓ Branch 97 → 113 taken 1536 times.
cbs_h266_write_pps:
✓ Branch 131 → 132 taken 3 times.
✓ Branch 131 → 149 taken 388 times.
1941 if (current->pps_subpic_id_mapping_present_flag) {
1843
2/4
cbs_h266_read_pps:
✓ Branch 98 → 99 taken 14 times.
✗ Branch 98 → 103 not taken.
cbs_h266_write_pps:
✓ Branch 132 → 133 taken 3 times.
✗ Branch 132 → 137 not taken.
17 if (!current->pps_no_pic_partition_flag) {
1844
2/4
cbs_h266_read_pps:
✗ Branch 100 → 101 not taken.
✓ Branch 100 → 102 taken 14 times.
cbs_h266_write_pps:
✗ Branch 134 → 135 not taken.
✓ Branch 134 → 136 taken 3 times.
17 ue(pps_num_subpics_minus1,
1845 sps->sps_num_subpics_minus1, sps->sps_num_subpics_minus1);
1846 } else {
1847
0/2
✗ Branch 137 → 138 not taken.
✗ Branch 137 → 140 not taken.
✗ infer(pps_num_subpics_minus1, 0);
1848 }
1849
2/4
cbs_h266_read_pps:
✗ Branch 105 → 106 not taken.
✓ Branch 105 → 107 taken 14 times.
cbs_h266_write_pps:
✗ Branch 141 → 142 not taken.
✓ Branch 141 → 143 taken 3 times.
17 ue(pps_subpic_id_len_minus1, sps->sps_subpic_id_len_minus1,
1850 sps->sps_subpic_id_len_minus1);
1851
4/4
cbs_h266_read_pps:
✓ Branch 112 → 108 taken 70 times.
✓ Branch 112 → 113 taken 14 times.
cbs_h266_write_pps:
✓ Branch 148 → 144 taken 15 times.
✓ Branch 148 → 149 taken 3 times.
102 for (i = 0; i <= current->pps_num_subpics_minus1; i++) {
1852
2/4
cbs_h266_read_pps:
✗ Branch 109 → 110 not taken.
✓ Branch 109 → 111 taken 70 times.
cbs_h266_write_pps:
✗ Branch 145 → 146 not taken.
✓ Branch 145 → 147 taken 15 times.
85 ubs(sps->sps_subpic_id_len_minus1 + 1, pps_subpic_id[i], 1, i);
1853 }
1854 }
1855
1856
4/4
cbs_h266_read_pps:
✓ Branch 121 → 114 taken 2389 times.
✓ Branch 121 → 122 taken 1550 times.
cbs_h266_write_pps:
✓ Branch 157 → 150 taken 411 times.
✓ Branch 157 → 158 taken 391 times.
4741 for (i = 0; i <= sps->sps_num_subpics_minus1; i++) {
1857
4/4
cbs_h266_read_pps:
✓ Branch 114 → 115 taken 110 times.
✓ Branch 114 → 119 taken 2279 times.
cbs_h266_write_pps:
✓ Branch 150 → 151 taken 25 times.
✓ Branch 150 → 155 taken 386 times.
2800 if (sps->sps_subpic_id_mapping_explicitly_signalled_flag)
1858
4/4
cbs_h266_read_pps:
✓ Branch 115 → 116 taken 70 times.
✓ Branch 115 → 117 taken 40 times.
cbs_h266_write_pps:
✓ Branch 151 → 152 taken 15 times.
✓ Branch 151 → 153 taken 10 times.
185 current->sub_pic_id_val[i] = current->pps_subpic_id_mapping_present_flag
1859 ? current->pps_subpic_id[i]
1860 50 : sps->sps_subpic_id[i];
1861 else
1862 2665 current->sub_pic_id_val[i] = i;
1863 }
1864
1865 1941 pic_width_in_ctbs_y = AV_CEIL_RSHIFT
1866 (current->pps_pic_width_in_luma_samples, (sps->sps_log2_ctu_size_minus5 + 5));
1867 1941 pic_height_in_ctbs_y = AV_CEIL_RSHIFT(
1868 current->pps_pic_height_in_luma_samples,(sps->sps_log2_ctu_size_minus5 + 5));
1869
4/4
cbs_h266_read_pps:
✓ Branch 122 → 123 taken 434 times.
✓ Branch 122 → 318 taken 1116 times.
cbs_h266_write_pps:
✓ Branch 158 → 159 taken 11 times.
✓ Branch 158 → 380 taken 380 times.
1941 if (!current->pps_no_pic_partition_flag) {
1870 445 unsigned int exp_tile_width = 0, exp_tile_height = 0;
1871 unsigned int unified_size, remaining_size;
1872
1873
2/4
cbs_h266_read_pps:
✗ Branch 124 → 125 not taken.
✓ Branch 124 → 126 taken 434 times.
cbs_h266_write_pps:
✗ Branch 160 → 161 not taken.
✓ Branch 160 → 162 taken 11 times.
445 u(2, pps_log2_ctu_size_minus5,
1874 sps->sps_log2_ctu_size_minus5, sps->sps_log2_ctu_size_minus5);
1875
2/4
cbs_h266_read_pps:
✗ Branch 127 → 128 not taken.
✓ Branch 127 → 129 taken 434 times.
cbs_h266_write_pps:
✗ Branch 163 → 164 not taken.
✓ Branch 163 → 165 taken 11 times.
445 ue(pps_num_exp_tile_columns_minus1,
1876 0, FFMIN(pic_width_in_ctbs_y - 1, VVC_MAX_TILE_COLUMNS - 1));
1877
2/4
cbs_h266_read_pps:
✗ Branch 130 → 131 not taken.
✓ Branch 130 → 132 taken 434 times.
cbs_h266_write_pps:
✗ Branch 166 → 167 not taken.
✓ Branch 166 → 168 taken 11 times.
445 ue(pps_num_exp_tile_rows_minus1,
1878 0, FFMIN(pic_height_in_ctbs_y - 1, VVC_MAX_TILE_ROWS - 1));
1879
1880
4/4
cbs_h266_read_pps:
✓ Branch 137 → 133 taken 889 times.
✓ Branch 137 → 138 taken 434 times.
cbs_h266_write_pps:
✓ Branch 173 → 169 taken 28 times.
✓ Branch 173 → 174 taken 11 times.
1362 for (i = 0; i <= current->pps_num_exp_tile_columns_minus1; i++) {
1881
2/4
cbs_h266_read_pps:
✗ Branch 134 → 135 not taken.
✓ Branch 134 → 136 taken 889 times.
cbs_h266_write_pps:
✗ Branch 170 → 171 not taken.
✓ Branch 170 → 172 taken 28 times.
917 ues(pps_tile_column_width_minus1[i],
1882 0, pic_width_in_ctbs_y - exp_tile_width - 1, 1, i);
1883 917 exp_tile_width += current->pps_tile_column_width_minus1[i] + 1;
1884 }
1885
4/4
cbs_h266_read_pps:
✓ Branch 143 → 139 taken 1206 times.
✓ Branch 143 → 144 taken 434 times.
cbs_h266_write_pps:
✓ Branch 179 → 175 taken 23 times.
✓ Branch 179 → 180 taken 11 times.
1674 for (i = 0; i <= current->pps_num_exp_tile_rows_minus1; i++) {
1886
2/4
cbs_h266_read_pps:
✗ Branch 140 → 141 not taken.
✓ Branch 140 → 142 taken 1206 times.
cbs_h266_write_pps:
✗ Branch 176 → 177 not taken.
✓ Branch 176 → 178 taken 23 times.
1229 ues(pps_tile_row_height_minus1[i],
1887 0, pic_height_in_ctbs_y - exp_tile_height - 1, 1, i);
1888 1229 exp_tile_height += current->pps_tile_row_height_minus1[i] + 1;
1889 }
1890
1891 445 remaining_size = pic_width_in_ctbs_y;
1892
4/4
cbs_h266_read_pps:
✓ Branch 149 → 145 taken 889 times.
✓ Branch 149 → 150 taken 434 times.
cbs_h266_write_pps:
✓ Branch 185 → 181 taken 28 times.
✓ Branch 185 → 186 taken 11 times.
1362 for (i = 0; i <= current->pps_num_exp_tile_columns_minus1; i++) {
1893
2/4
cbs_h266_read_pps:
✗ Branch 145 → 146 not taken.
✓ Branch 145 → 148 taken 889 times.
cbs_h266_write_pps:
✗ Branch 181 → 182 not taken.
✓ Branch 181 → 184 taken 28 times.
917 if (current->pps_tile_column_width_minus1[i] >= remaining_size) {
1894 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
1895 "Tile column width(%d) exceeds picture width\n",i);
1896 ✗ return AVERROR_INVALIDDATA;
1897 }
1898 917 current->col_width_val[i] = current->pps_tile_column_width_minus1[i] + 1;
1899 917 remaining_size -= (current->pps_tile_column_width_minus1[i] + 1);
1900 }
1901 445 unified_size = current->pps_tile_column_width_minus1[i - 1] + 1;
1902
4/4
cbs_h266_read_pps:
✓ Branch 155 → 151 taken 811 times.
✓ Branch 155 → 156 taken 434 times.
cbs_h266_write_pps:
✓ Branch 191 → 187 taken 18 times.
✓ Branch 191 → 192 taken 11 times.
1274 while (remaining_size > 0) {
1903
2/4
cbs_h266_read_pps:
✗ Branch 151 → 152 not taken.
✓ Branch 151 → 154 taken 811 times.
cbs_h266_write_pps:
✗ Branch 187 → 188 not taken.
✓ Branch 187 → 190 taken 18 times.
829 if (i == VVC_MAX_TILE_COLUMNS) {
1904 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
1905 "Exceeded maximum tile columns (%d) (remaining size: %u)\n",
1906 VVC_MAX_TILE_COLUMNS, remaining_size);
1907 ✗ return AVERROR_INVALIDDATA;
1908 }
1909 829 unified_size = FFMIN(remaining_size, unified_size);
1910 829 current->col_width_val[i] = unified_size;
1911 829 remaining_size -= unified_size;
1912 829 i++;
1913 }
1914 445 current->num_tile_columns = i;
1915
1916 445 remaining_size = pic_height_in_ctbs_y;
1917
4/4
cbs_h266_read_pps:
✓ Branch 161 → 157 taken 1206 times.
✓ Branch 161 → 162 taken 434 times.
cbs_h266_write_pps:
✓ Branch 197 → 193 taken 23 times.
✓ Branch 197 → 198 taken 11 times.
1674 for (i = 0; i <= current->pps_num_exp_tile_rows_minus1; i++) {
1918
2/4
cbs_h266_read_pps:
✗ Branch 157 → 158 not taken.
✓ Branch 157 → 160 taken 1206 times.
cbs_h266_write_pps:
✗ Branch 193 → 194 not taken.
✓ Branch 193 → 196 taken 23 times.
1229 if (current->pps_tile_row_height_minus1[i] >= remaining_size) {
1919 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
1920 "Tile row height(%d) exceeds picture height\n",i);
1921 ✗ return AVERROR_INVALIDDATA;
1922 }
1923 1229 current->row_height_val[i] = current->pps_tile_row_height_minus1[i] + 1;
1924 1229 remaining_size -= (current->pps_tile_row_height_minus1[i] + 1);
1925 }
1926 445 unified_size = current->pps_tile_row_height_minus1[i - 1] + 1;
1927
1928
4/4
cbs_h266_read_pps:
✓ Branch 167 → 163 taken 443 times.
✓ Branch 167 → 168 taken 434 times.
cbs_h266_write_pps:
✓ Branch 203 → 199 taken 18 times.
✓ Branch 203 → 204 taken 11 times.
906 while (remaining_size > 0) {
1929
2/4
cbs_h266_read_pps:
✗ Branch 163 → 164 not taken.
✓ Branch 163 → 166 taken 443 times.
cbs_h266_write_pps:
✗ Branch 199 → 200 not taken.
✓ Branch 199 → 202 taken 18 times.
461 if (i == VVC_MAX_TILE_ROWS) {
1930 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
1931 "Exceeded maximum tile rows (%d) (remaining size: %u)\n",
1932 VVC_MAX_TILE_ROWS, remaining_size);
1933 ✗ return AVERROR_INVALIDDATA;
1934 }
1935 461 unified_size = FFMIN(remaining_size, unified_size);
1936 461 current->row_height_val[i] = unified_size;
1937 461 remaining_size -= unified_size;
1938 461 i++;
1939 }
1940 445 current->num_tile_rows=i;
1941
1942 445 current->num_tiles_in_pic = current->num_tile_columns *
1943 445 current->num_tile_rows;
1944
2/4
cbs_h266_read_pps:
✗ Branch 168 → 169 not taken.
✓ Branch 168 → 171 taken 434 times.
cbs_h266_write_pps:
✗ Branch 204 → 205 not taken.
✓ Branch 204 → 207 taken 11 times.
445 if (current->num_tiles_in_pic > VVC_MAX_TILES_PER_AU) {
1945 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
1946 "NumTilesInPic(%d) > than VVC_MAX_TILES_PER_AU(%d)\n",
1947 ✗ current->num_tiles_in_pic, VVC_MAX_TILES_PER_AU);
1948 ✗ return AVERROR_INVALIDDATA;
1949 }
1950
1951
4/4
cbs_h266_read_pps:
✓ Branch 171 → 172 taken 430 times.
✓ Branch 171 → 179 taken 4 times.
cbs_h266_write_pps:
✓ Branch 207 → 208 taken 10 times.
✓ Branch 207 → 214 taken 1 time.
445 if (current->num_tiles_in_pic > 1) {
1952
2/4
cbs_h266_read_pps:
✗ Branch 173 → 174 not taken.
✓ Branch 173 → 175 taken 430 times.
cbs_h266_write_pps:
✗ Branch 209 → 210 not taken.
✓ Branch 209 → 211 taken 10 times.
440 flag(pps_loop_filter_across_tiles_enabled_flag);
1953
2/4
cbs_h266_read_pps:
✗ Branch 176 → 177 not taken.
✓ Branch 176 → 178 taken 430 times.
cbs_h266_write_pps:
✗ Branch 212 → 213 not taken.
✓ Branch 212 → 220 taken 10 times.
440 flag(pps_rect_slice_flag);
1954 } else {
1955
1/2
✗ Branch 214 → 215 not taken.
✓ Branch 214 → 217 taken 1 time.
5 infer(pps_loop_filter_across_tiles_enabled_flag, 0);
1956
1/2
✗ Branch 217 → 218 not taken.
✓ Branch 217 → 220 taken 1 time.
5 infer(pps_rect_slice_flag, 1);
1957 }
1958
4/4
cbs_h266_read_pps:
✓ Branch 180 → 181 taken 426 times.
✓ Branch 180 → 185 taken 8 times.
cbs_h266_write_pps:
✓ Branch 220 → 221 taken 9 times.
✓ Branch 220 → 224 taken 2 times.
445 if (current->pps_rect_slice_flag)
1959
2/4
cbs_h266_read_pps:
✗ Branch 182 → 183 not taken.
✓ Branch 182 → 184 taken 426 times.
cbs_h266_write_pps:
✗ Branch 222 → 223 not taken.
✓ Branch 222 → 227 taken 9 times.
435 flag(pps_single_slice_per_subpic_flag);
1960 else
1961
1/2
✗ Branch 224 → 225 not taken.
✓ Branch 224 → 227 taken 2 times.
10 infer(pps_single_slice_per_subpic_flag, 1);
1962
4/4
cbs_h266_read_pps:
✓ Branch 186 → 187 taken 426 times.
✓ Branch 186 → 302 taken 8 times.
cbs_h266_write_pps:
✓ Branch 227 → 228 taken 9 times.
✓ Branch 227 → 358 taken 2 times.
445 if (current->pps_rect_slice_flag &&
1963
3/4
cbs_h266_read_pps:
✓ Branch 187 → 188 taken 417 times.
✓ Branch 187 → 302 taken 9 times.
cbs_h266_write_pps:
✓ Branch 228 → 229 taken 9 times.
✗ Branch 228 → 358 not taken.
861 !current->pps_single_slice_per_subpic_flag) {
1964 426 int j, num_slices = 0;
1965 426 uint16_t tile_idx = 0, tile_x, tile_y, ctu_x, ctu_y;
1966 uint16_t slice_top_left_ctu_x[VVC_MAX_SLICES];
1967 uint16_t slice_top_left_ctu_y[VVC_MAX_SLICES];
1968
2/4
cbs_h266_read_pps:
✗ Branch 189 → 190 not taken.
✓ Branch 189 → 191 taken 417 times.
cbs_h266_write_pps:
✗ Branch 230 → 231 not taken.
✓ Branch 230 → 232 taken 9 times.
426 ue(pps_num_slices_in_pic_minus1, 0, VVC_MAX_SLICES - 1);
1969
4/4
cbs_h266_read_pps:
✓ Branch 191 → 192 taken 394 times.
✓ Branch 191 → 196 taken 23 times.
cbs_h266_write_pps:
✓ Branch 232 → 233 taken 8 times.
✓ Branch 232 → 236 taken 1 time.
426 if (current->pps_num_slices_in_pic_minus1 > 1)
1970
2/4
cbs_h266_read_pps:
✗ Branch 193 → 194 not taken.
✓ Branch 193 → 195 taken 394 times.
cbs_h266_write_pps:
✗ Branch 234 → 235 not taken.
✓ Branch 234 → 239 taken 8 times.
402 flag(pps_tile_idx_delta_present_flag);
1971 else
1972
1/2
✗ Branch 236 → 237 not taken.
✓ Branch 236 → 239 taken 1 time.
24 infer(pps_tile_idx_delta_present_flag, 0);
1973
4/4
cbs_h266_read_pps:
✓ Branch 271 → 198 taken 1022 times.
✓ Branch 271 → 272 taken 417 times.
cbs_h266_write_pps:
✓ Branch 325 → 240 taken 69 times.
✓ Branch 325 → 326 taken 9 times.
1517 for (i = 0; i < current->pps_num_slices_in_pic_minus1; i++) {
1974 1091 current->slice_top_left_tile_idx[i] = tile_idx;
1975 1091 tile_x = tile_idx % current->num_tile_columns;
1976 1091 tile_y = tile_idx / current->num_tile_columns;
1977
2/4
cbs_h266_read_pps:
✗ Branch 198 → 199 not taken.
✓ Branch 198 → 200 taken 1022 times.
cbs_h266_write_pps:
✗ Branch 240 → 241 not taken.
✓ Branch 240 → 242 taken 69 times.
1091 if (tile_y >= current->num_tile_rows)
1978 ✗ return AVERROR_INVALIDDATA;
1979
4/4
cbs_h266_read_pps:
✓ Branch 200 → 201 taken 974 times.
✓ Branch 200 → 205 taken 48 times.
cbs_h266_write_pps:
✓ Branch 242 → 243 taken 58 times.
✓ Branch 242 → 247 taken 11 times.
1091 if (tile_x != current->num_tile_columns - 1) {
1980
2/4
cbs_h266_read_pps:
✗ Branch 202 → 203 not taken.
✓ Branch 202 → 204 taken 974 times.
cbs_h266_write_pps:
✗ Branch 244 → 245 not taken.
✓ Branch 244 → 246 taken 58 times.
1032 ues(pps_slice_width_in_tiles_minus1[i],
1981 0, current->num_tile_columns - 1 - tile_x, 1, i);
1982 } else {
1983
1/2
✗ Branch 247 → 248 not taken.
✓ Branch 247 → 250 taken 11 times.
59 infer(pps_slice_width_in_tiles_minus1[i], 0);
1984 }
1985
4/4
cbs_h266_read_pps:
✓ Branch 206 → 207 taken 944 times.
✓ Branch 206 → 213 taken 78 times.
cbs_h266_write_pps:
✓ Branch 250 → 251 taken 52 times.
✓ Branch 250 → 257 taken 17 times.
1091 if (tile_y != current->num_tile_rows - 1 &&
1986
8/8
cbs_h266_read_pps:
✓ Branch 207 → 208 taken 776 times.
✓ Branch 207 → 209 taken 168 times.
✓ Branch 208 → 209 taken 378 times.
✓ Branch 208 → 213 taken 398 times.
cbs_h266_write_pps:
✓ Branch 251 → 252 taken 12 times.
✓ Branch 251 → 253 taken 40 times.
✓ Branch 252 → 253 taken 4 times.
✓ Branch 252 → 257 taken 8 times.
996 (current->pps_tile_idx_delta_present_flag || tile_x == 0)) {
1987
2/4
cbs_h266_read_pps:
✗ Branch 210 → 211 not taken.
✓ Branch 210 → 212 taken 546 times.
cbs_h266_write_pps:
✗ Branch 254 → 255 not taken.
✓ Branch 254 → 256 taken 44 times.
590 ues(pps_slice_height_in_tiles_minus1[i],
1988 0, current->num_tile_rows - 1 - tile_y, 1, i);
1989 } else {
1990
4/4
cbs_h266_read_pps:
✓ Branch 213 → 214 taken 78 times.
✓ Branch 213 → 215 taken 398 times.
cbs_h266_write_pps:
✓ Branch 257 → 258 taken 17 times.
✓ Branch 257 → 261 taken 8 times.
501 if (tile_y == current->num_tile_rows - 1)
1991
1/2
✗ Branch 258 → 259 not taken.
✓ Branch 258 → 264 taken 17 times.
95 infer(pps_slice_height_in_tiles_minus1[i], 0);
1992 else
1993
1/2
✗ Branch 261 → 262 not taken.
✓ Branch 261 → 264 taken 8 times.
406 infer(pps_slice_height_in_tiles_minus1[i],
1994 current->pps_slice_height_in_tiles_minus1[i - 1]);
1995 }
1996
1997 1091 ctu_x = ctu_y = 0;
1998
4/4
cbs_h266_read_pps:
✓ Branch 218 → 217 taken 790 times.
✓ Branch 218 → 219 taken 1022 times.
cbs_h266_write_pps:
✓ Branch 266 → 265 taken 98 times.
✓ Branch 266 → 267 taken 69 times.
1979 for (j = 0; j < tile_x; j++) {
1999 888 ctu_x += current->col_width_val[j];
2000 }
2001
4/4
cbs_h266_read_pps:
✓ Branch 221 → 220 taken 420 times.
✓ Branch 221 → 222 taken 1022 times.
cbs_h266_write_pps:
✓ Branch 269 → 268 taken 95 times.
✓ Branch 269 → 270 taken 69 times.
1606 for (j = 0; j < tile_y; j++) {
2002 515 ctu_y += current->row_height_val[j];
2003 }
2004
4/4
cbs_h266_read_pps:
✓ Branch 222 → 223 taken 610 times.
✓ Branch 222 → 253 taken 412 times.
cbs_h266_write_pps:
✓ Branch 270 → 271 taken 57 times.
✓ Branch 270 → 301 taken 12 times.
1091 if (current->pps_slice_width_in_tiles_minus1[i] == 0 &&
2005
4/4
cbs_h266_read_pps:
✓ Branch 223 → 224 taken 588 times.
✓ Branch 223 → 253 taken 22 times.
cbs_h266_write_pps:
✓ Branch 271 → 272 taken 52 times.
✓ Branch 271 → 301 taken 5 times.
667 current->pps_slice_height_in_tiles_minus1[i] == 0 &&
2006
4/4
cbs_h266_read_pps:
✓ Branch 224 → 225 taken 124 times.
✓ Branch 224 → 253 taken 464 times.
cbs_h266_write_pps:
✓ Branch 272 → 273 taken 30 times.
✓ Branch 272 → 301 taken 22 times.
640 current->row_height_val[tile_y] > 1) {
2007 int uniform_slice_height, remaining_height_in_ctbs_y;
2008 154 remaining_height_in_ctbs_y =
2009 154 current->row_height_val[tile_y];
2010
2/4
cbs_h266_read_pps:
✗ Branch 226 → 227 not taken.
✓ Branch 226 → 228 taken 124 times.
cbs_h266_write_pps:
✗ Branch 274 → 275 not taken.
✓ Branch 274 → 276 taken 30 times.
154 ues(pps_num_exp_slices_in_tile[i],
2011 0, current->row_height_val[tile_y] - 1, 1, i);
2012
2/4
cbs_h266_read_pps:
✗ Branch 228 → 229 not taken.
✓ Branch 228 → 230 taken 124 times.
cbs_h266_write_pps:
✗ Branch 276 → 277 not taken.
✓ Branch 276 → 278 taken 30 times.
154 if (current->pps_num_exp_slices_in_tile[i] == 0) {
2013 ✗ current->num_slices_in_tile[i] = 1;
2014 ✗ current->slice_height_in_ctus[i] = current->row_height_val[tile_y];
2015 ✗ slice_top_left_ctu_x[i] = ctu_x;
2016 ✗ slice_top_left_ctu_y[i] = ctu_y;
2017 } else {
2018 uint16_t slice_height_in_ctus;
2019 int num_uniform_slices;
2020
2021 154 if (i + current->pps_num_exp_slices_in_tile[i] >
2022
2/4
cbs_h266_read_pps:
✗ Branch 230 → 231 not taken.
✓ Branch 230 → 232 taken 124 times.
cbs_h266_write_pps:
✗ Branch 278 → 279 not taken.
✓ Branch 278 → 280 taken 30 times.
154 current->pps_num_slices_in_pic_minus1 + 1)
2023 ✗ return AVERROR_INVALIDDATA;
2024
2025
4/4
cbs_h266_read_pps:
✓ Branch 237 → 233 taken 168 times.
✓ Branch 237 → 238 taken 124 times.
cbs_h266_write_pps:
✓ Branch 285 → 281 taken 40 times.
✓ Branch 285 → 286 taken 30 times.
362 for (j = 0; j < current->pps_num_exp_slices_in_tile[i];
2026 208 j++) {
2027
2/4
cbs_h266_read_pps:
✗ Branch 234 → 235 not taken.
✓ Branch 234 → 236 taken 168 times.
cbs_h266_write_pps:
✗ Branch 282 → 283 not taken.
✓ Branch 282 → 284 taken 40 times.
208 xue(pps_exp_slice_height_in_ctus_minus1[i][j],
2028 current->pps_exp_slice_height_in_ctus_minus1[i + j], 0,
2029 remaining_height_in_ctbs_y - (current->pps_num_exp_slices_in_tile[i] - j), 2,
2030 i, j);
2031 208 slice_height_in_ctus =
2032 current->
2033 208 pps_exp_slice_height_in_ctus_minus1[i + j] + 1;
2034
2035 208 current->slice_height_in_ctus[i + j] =
2036 slice_height_in_ctus;
2037 208 slice_top_left_ctu_x[i + j] = ctu_x;
2038 208 slice_top_left_ctu_y[i + j] = ctu_y;
2039 208 ctu_y += slice_height_in_ctus;
2040
2041 208 remaining_height_in_ctbs_y -= slice_height_in_ctus;
2042 }
2043
2/4
cbs_h266_read_pps:
✗ Branch 238 → 239 not taken.
✓ Branch 238 → 240 taken 124 times.
cbs_h266_write_pps:
✗ Branch 286 → 287 not taken.
✓ Branch 286 → 288 taken 30 times.
154 uniform_slice_height = 1 +
2044 ✗ (j == 0 ? current->row_height_val[tile_y] - 1:
2045 154 current->pps_exp_slice_height_in_ctus_minus1[i + j - 1]);
2046
2047 154 num_uniform_slices = (remaining_height_in_ctbs_y + uniform_slice_height - 1)
2048 / uniform_slice_height;
2049 154 if (i + current->pps_num_exp_slices_in_tile[i] + num_uniform_slices >
2050
2/4
cbs_h266_read_pps:
✗ Branch 241 → 242 not taken.
✓ Branch 241 → 243 taken 124 times.
cbs_h266_write_pps:
✗ Branch 289 → 290 not taken.
✓ Branch 289 → 291 taken 30 times.
154 current->pps_num_slices_in_pic_minus1 + 1)
2051 ✗ return AVERROR_INVALIDDATA;
2052
2053
2/4
cbs_h266_read_pps:
✗ Branch 245 → 244 not taken.
✓ Branch 245 → 246 taken 124 times.
cbs_h266_write_pps:
✗ Branch 293 → 292 not taken.
✓ Branch 293 → 294 taken 30 times.
154 while (remaining_height_in_ctbs_y > uniform_slice_height) {
2054 ✗ current->slice_height_in_ctus[i + j] =
2055 uniform_slice_height;
2056 ✗ slice_top_left_ctu_x[i + j] = ctu_x;
2057 ✗ slice_top_left_ctu_y[i + j] = ctu_y;
2058 ✗ ctu_y += uniform_slice_height;
2059
2060 ✗ remaining_height_in_ctbs_y -= uniform_slice_height;
2061 ✗ j++;
2062 }
2063
4/4
cbs_h266_read_pps:
✓ Branch 246 → 247 taken 80 times.
✓ Branch 246 → 248 taken 44 times.
cbs_h266_write_pps:
✓ Branch 294 → 295 taken 20 times.
✓ Branch 294 → 296 taken 10 times.
154 if (remaining_height_in_ctbs_y > 0) {
2064 100 current->slice_height_in_ctus[i + j] =
2065 remaining_height_in_ctbs_y;
2066 100 slice_top_left_ctu_x[i + j] = ctu_x;
2067 100 slice_top_left_ctu_y[i + j] = ctu_y;
2068 100 j++;
2069 }
2070 154 current->num_slices_in_tile[i] = j;
2071 }
2072
4/4
cbs_h266_read_pps:
✓ Branch 251 → 250 taken 248 times.
✓ Branch 251 → 252 taken 124 times.
cbs_h266_write_pps:
✓ Branch 299 → 298 taken 60 times.
✓ Branch 299 → 300 taken 30 times.
462 for (int k = 0; k < current->num_slices_in_tile[i]; k++)
2073 308 current->slice_top_left_tile_idx[i + k] = tile_idx;
2074 154 i += current->num_slices_in_tile[i] - 1;
2075 } else {
2076 937 uint16_t height = 0;
2077
1/2
✗ Branch 301 → 302 not taken.
✓ Branch 301 → 304 taken 39 times.
937 infer(pps_num_exp_slices_in_tile[i], 0);
2078
4/4
cbs_h266_read_pps:
✓ Branch 253 → 254 taken 486 times.
✓ Branch 253 → 256 taken 412 times.
cbs_h266_write_pps:
✓ Branch 304 → 305 taken 27 times.
✓ Branch 304 → 307 taken 12 times.
937 if (current->pps_slice_width_in_tiles_minus1[i] == 0 &&
2079
4/4
cbs_h266_read_pps:
✓ Branch 254 → 255 taken 464 times.
✓ Branch 254 → 256 taken 22 times.
cbs_h266_write_pps:
✓ Branch 305 → 306 taken 22 times.
✓ Branch 305 → 307 taken 5 times.
513 current->pps_slice_height_in_tiles_minus1[i] == 0)
2080 486 current->num_slices_in_tile[i] = 1;
2081
2082 937 for (j = 0;
2083
4/4
cbs_h266_read_pps:
✓ Branch 258 → 257 taken 962 times.
✓ Branch 258 → 259 taken 898 times.
cbs_h266_write_pps:
✓ Branch 309 → 308 taken 53 times.
✓ Branch 309 → 310 taken 39 times.
1952 j <= current->pps_slice_height_in_tiles_minus1[i];
2084 1015 j++) {
2085 1015 height +=
2086 1015 current->row_height_val[tile_y + j];
2087 }
2088 937 current->slice_height_in_ctus[i] = height;
2089
2090 937 slice_top_left_ctu_x[i] = ctu_x;
2091 937 slice_top_left_ctu_y[i] = ctu_y;
2092 }
2093
2/4
cbs_h266_read_pps:
✓ Branch 260 → 261 taken 1022 times.
✗ Branch 260 → 270 not taken.
cbs_h266_write_pps:
✓ Branch 311 → 312 taken 69 times.
✗ Branch 311 → 324 not taken.
1091 if (i < current->pps_num_slices_in_pic_minus1) {
2094
4/4
cbs_h266_read_pps:
✓ Branch 261 → 262 taken 206 times.
✓ Branch 261 → 268 taken 816 times.
cbs_h266_write_pps:
✓ Branch 312 → 313 taken 49 times.
✓ Branch 312 → 319 taken 20 times.
1091 if (current->pps_tile_idx_delta_present_flag) {
2095 // Two conditions must be met:
2096 // 1. −NumTilesInPic + 1 <= pps_tile_idx_delta_val[i] <= NumTilesInPic − 1
2097 // 2. 0 <= tile_idx + pps_tile_idx_delta_val[i] <= NumTilesInPic − 1
2098 // Combining these conditions yields: -tile_idx <= pps_tile_idx_delta_val[i] <= NumTilesInPic - 1 - tile_idx
2099
2/4
cbs_h266_read_pps:
✗ Branch 263 → 264 not taken.
✓ Branch 263 → 265 taken 206 times.
cbs_h266_write_pps:
✗ Branch 314 → 315 not taken.
✓ Branch 314 → 316 taken 49 times.
255 ses(pps_tile_idx_delta_val[i],
2100 -tile_idx, current->num_tiles_in_pic - 1 - tile_idx, 1, i);
2101
2/4
cbs_h266_read_pps:
✗ Branch 265 → 266 not taken.
✓ Branch 265 → 267 taken 206 times.
cbs_h266_write_pps:
✗ Branch 316 → 317 not taken.
✓ Branch 316 → 318 taken 49 times.
255 if (current->pps_tile_idx_delta_val[i] == 0) {
2102 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
2103 "pps_tile_idx_delta_val[i] shall not be equal to 0.\n");
2104 }
2105 255 tile_idx += current->pps_tile_idx_delta_val[i];
2106 } else {
2107
1/2
✗ Branch 319 → 320 not taken.
✓ Branch 319 → 322 taken 20 times.
836 infer(pps_tile_idx_delta_val[i], 0);
2108 836 tile_idx +=
2109 836 current->pps_slice_width_in_tiles_minus1[i] + 1;
2110
4/4
cbs_h266_read_pps:
✓ Branch 268 → 269 taken 378 times.
✓ Branch 268 → 270 taken 438 times.
cbs_h266_write_pps:
✓ Branch 322 → 323 taken 4 times.
✓ Branch 322 → 324 taken 16 times.
836 if (tile_idx % current->num_tile_columns == 0) {
2111 382 tile_idx +=
2112 382 current->pps_slice_height_in_tiles_minus1[i] *
2113 382 current->num_tile_columns;
2114 }
2115 }
2116 }
2117 }
2118
2/4
cbs_h266_read_pps:
✓ Branch 272 → 273 taken 417 times.
✗ Branch 272 → 285 not taken.
cbs_h266_write_pps:
✓ Branch 326 → 327 taken 9 times.
✗ Branch 326 → 341 not taken.
426 if (i == current->pps_num_slices_in_pic_minus1) {
2119 426 uint16_t height = 0;
2120
2121 426 current->slice_top_left_tile_idx[i] = tile_idx;
2122 426 current->num_slices_in_tile[i] = 1;
2123 426 tile_x = tile_idx % current->num_tile_columns;
2124 426 tile_y = tile_idx / current->num_tile_columns;
2125
2/4
cbs_h266_read_pps:
✗ Branch 273 → 274 not taken.
✓ Branch 273 → 275 taken 417 times.
cbs_h266_write_pps:
✗ Branch 327 → 328 not taken.
✓ Branch 327 → 329 taken 9 times.
426 if (tile_y >= current->num_tile_rows)
2126 ✗ return AVERROR_INVALIDDATA;
2127
2128 426 ctu_x = 0, ctu_y = 0;
2129
4/4
cbs_h266_read_pps:
✓ Branch 277 → 276 taken 122 times.
✓ Branch 277 → 278 taken 417 times.
cbs_h266_write_pps:
✓ Branch 331 → 330 taken 27 times.
✓ Branch 331 → 332 taken 9 times.
575 for (j = 0; j < tile_x; j++) {
2130 149 ctu_x += current->col_width_val[j];
2131 }
2132
4/4
cbs_h266_read_pps:
✓ Branch 280 → 279 taken 458 times.
✓ Branch 280 → 281 taken 417 times.
cbs_h266_write_pps:
✓ Branch 334 → 333 taken 22 times.
✓ Branch 334 → 335 taken 9 times.
906 for (j = 0; j < tile_y; j++) {
2133 480 ctu_y += current->row_height_val[j];
2134 }
2135 426 slice_top_left_ctu_x[i] = ctu_x;
2136 426 slice_top_left_ctu_y[i] = ctu_y;
2137
2138 426 current->pps_slice_width_in_tiles_minus1[i] =
2139 426 current->num_tile_columns - tile_x - 1;
2140 426 current->pps_slice_height_in_tiles_minus1[i] =
2141 426 current->num_tile_rows - tile_y - 1;
2142
2143
4/4
cbs_h266_read_pps:
✓ Branch 283 → 282 taken 1133 times.
✓ Branch 283 → 284 taken 417 times.
cbs_h266_write_pps:
✓ Branch 337 → 336 taken 9 times.
✓ Branch 337 → 338 taken 9 times.
1568 for (j = 0; j <= current->pps_slice_height_in_tiles_minus1[i];
2144 1142 j++) {
2145 1142 height +=
2146 1142 current->row_height_val[tile_y + j];
2147 }
2148 426 current->slice_height_in_ctus[i] = height;
2149
2150
1/2
✗ Branch 338 → 339 not taken.
✓ Branch 338 → 341 taken 9 times.
426 infer(pps_num_exp_slices_in_tile[i], 0);
2151 }
2152 //now, we got all slice information, let's resolve NumSlicesInSubpic
2153
4/4
cbs_h266_read_pps:
✓ Branch 297 → 286 taken 1221 times.
✓ Branch 297 → 298 taken 417 times.
cbs_h266_write_pps:
✓ Branch 353 → 342 taken 29 times.
✓ Branch 353 → 354 taken 9 times.
1676 for (i = 0; i <= sps->sps_num_subpics_minus1; i++) {
2154 1250 current->num_slices_in_subpic[i] = 0;
2155
4/4
cbs_h266_read_pps:
✓ Branch 293 → 287 taken 4415 times.
✓ Branch 293 → 294 taken 1221 times.
cbs_h266_write_pps:
✓ Branch 349 → 343 taken 268 times.
✓ Branch 349 → 350 taken 29 times.
5933 for (j = 0; j <= current->pps_num_slices_in_pic_minus1; j++) {
2156 4683 uint16_t pos_x = 0, pos_y = 0;
2157 4683 pos_x = slice_top_left_ctu_x[j];
2158 4683 pos_y = slice_top_left_ctu_y[j];
2159
4/4
cbs_h266_read_pps:
✓ Branch 287 → 288 taken 3325 times.
✓ Branch 287 → 292 taken 1090 times.
cbs_h266_write_pps:
✓ Branch 343 → 344 taken 183 times.
✓ Branch 343 → 348 taken 85 times.
4683 if ((pos_x >= sps->sps_subpic_ctu_top_left_x[i]) &&
2160 3508 (pos_x <
2161 3508 sps->sps_subpic_ctu_top_left_x[i] +
2162
4/4
cbs_h266_read_pps:
✓ Branch 288 → 289 taken 2813 times.
✓ Branch 288 → 292 taken 512 times.
cbs_h266_write_pps:
✓ Branch 344 → 345 taken 148 times.
✓ Branch 344 → 348 taken 35 times.
3508 sps->sps_subpic_width_minus1[i] + 1) &&
2163
4/4
cbs_h266_read_pps:
✓ Branch 289 → 290 taken 1965 times.
✓ Branch 289 → 292 taken 848 times.
cbs_h266_write_pps:
✓ Branch 345 → 346 taken 118 times.
✓ Branch 345 → 348 taken 30 times.
2961 (pos_y >= sps->sps_subpic_ctu_top_left_y[i]) &&
2164 2083 (pos_y < sps->sps_subpic_ctu_top_left_y[i] +
2165
4/4
cbs_h266_read_pps:
✓ Branch 290 → 291 taken 1563 times.
✓ Branch 290 → 292 taken 402 times.
cbs_h266_write_pps:
✓ Branch 346 → 347 taken 108 times.
✓ Branch 346 → 348 taken 10 times.
2083 sps->sps_subpic_height_minus1[i] + 1)) {
2166 1671 current->num_slices_in_subpic[i]++;
2167 }
2168 }
2169
2/4
cbs_h266_read_pps:
✗ Branch 294 → 295 not taken.
✓ Branch 294 → 296 taken 1221 times.
cbs_h266_write_pps:
✗ Branch 350 → 351 not taken.
✓ Branch 350 → 352 taken 29 times.
1250 if (!current->num_slices_in_subpic[i])
2170 ✗ return AVERROR_INVALIDDATA;
2171 1250 num_slices += current->num_slices_in_subpic[i];
2172 }
2173
2/4
cbs_h266_read_pps:
✗ Branch 298 → 299 not taken.
✓ Branch 298 → 300 taken 417 times.
cbs_h266_write_pps:
✗ Branch 354 → 355 not taken.
✓ Branch 354 → 356 taken 9 times.
426 if (current->pps_num_slices_in_pic_minus1 + 1 != num_slices)
2174 ✗ return AVERROR_INVALIDDATA;
2175 } else {
2176
2/4
cbs_h266_read_pps:
✗ Branch 302 → 303 not taken.
✓ Branch 302 → 304 taken 17 times.
cbs_h266_write_pps:
✗ Branch 358 → 359 not taken.
✓ Branch 358 → 362 taken 2 times.
19 if (current->pps_no_pic_partition_flag)
2177
0/2
✗ Branch 359 → 360 not taken.
✗ Branch 359 → 369 not taken.
✗ infer(pps_num_slices_in_pic_minus1, 0);
2178
2/4
cbs_h266_read_pps:
✓ Branch 304 → 305 taken 17 times.
✗ Branch 304 → 309 not taken.
cbs_h266_write_pps:
✓ Branch 362 → 363 taken 2 times.
✗ Branch 362 → 369 not taken.
19 else if (current->pps_single_slice_per_subpic_flag) {
2179
4/4
cbs_h266_read_pps:
✓ Branch 307 → 306 taken 52 times.
✓ Branch 307 → 308 taken 17 times.
cbs_h266_write_pps:
✓ Branch 365 → 364 taken 2 times.
✓ Branch 365 → 366 taken 2 times.
73 for (i = 0; i <= sps->sps_num_subpics_minus1; i++)
2180 54 current->num_slices_in_subpic[i] = 1;
2181
1/2
✗ Branch 366 → 367 not taken.
✓ Branch 366 → 369 taken 2 times.
19 infer(pps_num_slices_in_pic_minus1,
2182 sps->sps_num_subpics_minus1);
2183 }
2184 // else?
2185 }
2186
4/4
cbs_h266_read_pps:
✓ Branch 309 → 310 taken 426 times.
✓ Branch 309 → 312 taken 8 times.
cbs_h266_write_pps:
✓ Branch 369 → 370 taken 9 times.
✓ Branch 369 → 372 taken 2 times.
445 if (!current->pps_rect_slice_flag ||
2187
3/4
cbs_h266_read_pps:
✓ Branch 310 → 311 taken 417 times.
✓ Branch 310 → 312 taken 9 times.
cbs_h266_write_pps:
✓ Branch 370 → 371 taken 9 times.
✗ Branch 370 → 372 not taken.
435 current->pps_single_slice_per_subpic_flag ||
2188
4/4
cbs_h266_read_pps:
✓ Branch 311 → 312 taken 394 times.
✓ Branch 311 → 316 taken 23 times.
cbs_h266_write_pps:
✓ Branch 371 → 372 taken 8 times.
✓ Branch 371 → 376 taken 1 time.
426 current->pps_num_slices_in_pic_minus1 > 0)
2189
2/4
cbs_h266_read_pps:
✗ Branch 313 → 314 not taken.
✓ Branch 313 → 315 taken 411 times.
cbs_h266_write_pps:
✗ Branch 373 → 374 not taken.
✓ Branch 373 → 375 taken 10 times.
421 flag(pps_loop_filter_across_slices_enabled_flag);
2190 else
2191
1/2
✗ Branch 376 → 377 not taken.
✓ Branch 376 → 379 taken 1 time.
24 infer(pps_loop_filter_across_slices_enabled_flag, 0);
2192 } else {
2193
1/2
✗ Branch 380 → 381 not taken.
✓ Branch 380 → 383 taken 380 times.
1496 infer(pps_num_exp_tile_columns_minus1, 0);
2194
1/2
✗ Branch 383 → 384 not taken.
✓ Branch 383 → 386 taken 380 times.
1496 infer(pps_tile_column_width_minus1[0], pic_width_in_ctbs_y - 1);
2195
1/2
✗ Branch 386 → 387 not taken.
✓ Branch 386 → 389 taken 380 times.
1496 infer(pps_num_exp_tile_rows_minus1, 0);
2196
1/2
✗ Branch 389 → 390 not taken.
✓ Branch 389 → 392 taken 380 times.
1496 infer(pps_tile_row_height_minus1[0], pic_height_in_ctbs_y - 1);
2197 1496 current->col_width_val[0] = pic_width_in_ctbs_y;
2198 1496 current->row_height_val[0] = pic_height_in_ctbs_y;
2199 1496 current->num_tile_columns = 1;
2200 1496 current->num_tile_rows = 1;
2201 1496 current->num_tiles_in_pic = 1;
2202 }
2203
2204
2/4
cbs_h266_read_pps:
✗ Branch 320 → 321 not taken.
✓ Branch 320 → 322 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 394 → 395 not taken.
✓ Branch 394 → 396 taken 391 times.
1941 flag(pps_cabac_init_present_flag);
2205
4/4
cbs_h266_read_pps:
✓ Branch 327 → 323 taken 3100 times.
✓ Branch 327 → 328 taken 1550 times.
cbs_h266_write_pps:
✓ Branch 401 → 397 taken 782 times.
✓ Branch 401 → 402 taken 391 times.
5823 for (i = 0; i < 2; i++)
2206
2/4
cbs_h266_read_pps:
✗ Branch 324 → 325 not taken.
✓ Branch 324 → 326 taken 3100 times.
cbs_h266_write_pps:
✗ Branch 398 → 399 not taken.
✓ Branch 398 → 400 taken 782 times.
3882 ues(pps_num_ref_idx_default_active_minus1[i], 0, 14, 1, i);
2207
2/4
cbs_h266_read_pps:
✗ Branch 329 → 330 not taken.
✓ Branch 329 → 331 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 403 → 404 not taken.
✓ Branch 403 → 405 taken 391 times.
1941 flag(pps_rpl1_idx_present_flag);
2208
2/4
cbs_h266_read_pps:
✗ Branch 332 → 333 not taken.
✓ Branch 332 → 334 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 406 → 407 not taken.
✓ Branch 406 → 408 taken 391 times.
1941 flag(pps_weighted_pred_flag);
2209
2/4
cbs_h266_read_pps:
✗ Branch 335 → 336 not taken.
✓ Branch 335 → 337 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 409 → 410 not taken.
✓ Branch 409 → 411 taken 391 times.
1941 flag(pps_weighted_bipred_flag);
2210
2/4
cbs_h266_read_pps:
✗ Branch 338 → 339 not taken.
✓ Branch 338 → 340 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 412 → 413 not taken.
✓ Branch 412 → 414 taken 391 times.
1941 flag(pps_ref_wraparound_enabled_flag);
2211
4/4
cbs_h266_read_pps:
✓ Branch 340 → 341 taken 10 times.
✓ Branch 340 → 345 taken 1540 times.
cbs_h266_write_pps:
✓ Branch 414 → 415 taken 2 times.
✓ Branch 414 → 419 taken 389 times.
1941 if (current->pps_ref_wraparound_enabled_flag) {
2212
2/4
cbs_h266_read_pps:
✗ Branch 342 → 343 not taken.
✓ Branch 342 → 344 taken 10 times.
cbs_h266_write_pps:
✗ Branch 416 → 417 not taken.
✓ Branch 416 → 418 taken 2 times.
12 ue(pps_pic_width_minus_wraparound_offset,
2213 0, (current->pps_pic_width_in_luma_samples / min_cb_size_y)
2214 - (ctb_size_y / min_cb_size_y) - 2);
2215 }
2216
2217 1941 qp_bd_offset = 6 * sps->sps_bitdepth_minus8;
2218
2/4
cbs_h266_read_pps:
✗ Branch 346 → 347 not taken.
✓ Branch 346 → 348 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 420 → 421 not taken.
✓ Branch 420 → 422 taken 391 times.
1941 se(pps_init_qp_minus26, -(26 + qp_bd_offset), 37);
2219
2/4
cbs_h266_read_pps:
✗ Branch 349 → 350 not taken.
✓ Branch 349 → 351 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 423 → 424 not taken.
✓ Branch 423 → 425 taken 391 times.
1941 flag(pps_cu_qp_delta_enabled_flag);
2220
2/4
cbs_h266_read_pps:
✗ Branch 352 → 353 not taken.
✓ Branch 352 → 354 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 426 → 427 not taken.
✓ Branch 426 → 428 taken 391 times.
1941 flag(pps_chroma_tool_offsets_present_flag);
2221
4/4
cbs_h266_read_pps:
✓ Branch 354 → 355 taken 992 times.
✓ Branch 354 → 395 taken 558 times.
cbs_h266_write_pps:
✓ Branch 428 → 429 taken 131 times.
✓ Branch 428 → 473 taken 260 times.
1941 if (current->pps_chroma_tool_offsets_present_flag) {
2222
2/4
cbs_h266_read_pps:
✗ Branch 356 → 357 not taken.
✓ Branch 356 → 358 taken 992 times.
cbs_h266_write_pps:
✗ Branch 430 → 431 not taken.
✓ Branch 430 → 432 taken 131 times.
1123 se(pps_cb_qp_offset, -12, 12);
2223
2/4
cbs_h266_read_pps:
✗ Branch 359 → 360 not taken.
✓ Branch 359 → 361 taken 992 times.
cbs_h266_write_pps:
✗ Branch 433 → 434 not taken.
✓ Branch 433 → 435 taken 131 times.
1123 se(pps_cr_qp_offset, -12, 12);
2224
2/4
cbs_h266_read_pps:
✗ Branch 362 → 363 not taken.
✓ Branch 362 → 364 taken 992 times.
cbs_h266_write_pps:
✗ Branch 436 → 437 not taken.
✓ Branch 436 → 438 taken 131 times.
1123 flag(pps_joint_cbcr_qp_offset_present_flag);
2225
3/4
cbs_h266_read_pps:
✓ Branch 364 → 365 taken 983 times.
✓ Branch 364 → 369 taken 9 times.
cbs_h266_write_pps:
✓ Branch 438 → 439 taken 131 times.
✗ Branch 438 → 443 not taken.
1123 if (current->pps_joint_cbcr_qp_offset_present_flag)
2226
2/4
cbs_h266_read_pps:
✗ Branch 366 → 367 not taken.
✓ Branch 366 → 368 taken 983 times.
cbs_h266_write_pps:
✗ Branch 440 → 441 not taken.
✓ Branch 440 → 442 taken 131 times.
1114 se(pps_joint_cbcr_qp_offset_value, -12, 12);
2227 else
2228
0/2
✗ Branch 443 → 444 not taken.
✗ Branch 443 → 446 not taken.
9 infer(pps_joint_cbcr_qp_offset_value, 0);
2229
2/4
cbs_h266_read_pps:
✗ Branch 371 → 372 not taken.
✓ Branch 371 → 373 taken 992 times.
cbs_h266_write_pps:
✗ Branch 447 → 448 not taken.
✓ Branch 447 → 449 taken 131 times.
1123 flag(pps_slice_chroma_qp_offsets_present_flag);
2230
2/4
cbs_h266_read_pps:
✗ Branch 374 → 375 not taken.
✓ Branch 374 → 376 taken 992 times.
cbs_h266_write_pps:
✗ Branch 450 → 451 not taken.
✓ Branch 450 → 452 taken 131 times.
1123 flag(pps_cu_chroma_qp_offset_list_enabled_flag);
2231
3/4
cbs_h266_read_pps:
✓ Branch 376 → 377 taken 358 times.
✓ Branch 376 → 396 taken 634 times.
cbs_h266_write_pps:
✗ Branch 452 → 453 not taken.
✓ Branch 452 → 491 taken 131 times.
1123 if (current->pps_cu_chroma_qp_offset_list_enabled_flag) {
2232
1/4
cbs_h266_read_pps:
✗ Branch 378 → 379 not taken.
✓ Branch 378 → 380 taken 358 times.
cbs_h266_write_pps:
✗ Branch 454 → 455 not taken.
✗ Branch 454 → 456 not taken.
358 ue(pps_chroma_qp_offset_list_len_minus1, 0, 5);
2233
2/4
cbs_h266_read_pps:
✓ Branch 394 → 381 taken 1202 times.
✓ Branch 394 → 396 taken 358 times.
cbs_h266_write_pps:
✗ Branch 472 → 457 not taken.
✗ Branch 472 → 491 not taken.
1560 for (i = 0; i <= current->pps_chroma_qp_offset_list_len_minus1; i++) {
2234
1/4
cbs_h266_read_pps:
✗ Branch 382 → 383 not taken.
✓ Branch 382 → 384 taken 1202 times.
cbs_h266_write_pps:
✗ Branch 458 → 459 not taken.
✗ Branch 458 → 460 not taken.
1202 ses(pps_cb_qp_offset_list[i], -12, 12, 1, i);
2235
1/4
cbs_h266_read_pps:
✗ Branch 385 → 386 not taken.
✓ Branch 385 → 387 taken 1202 times.
cbs_h266_write_pps:
✗ Branch 461 → 462 not taken.
✗ Branch 461 → 463 not taken.
1202 ses(pps_cr_qp_offset_list[i], -12, 12, 1, i);
2236
1/4
cbs_h266_read_pps:
✓ Branch 387 → 388 taken 1202 times.
✗ Branch 387 → 392 not taken.
cbs_h266_write_pps:
✗ Branch 463 → 464 not taken.
✗ Branch 463 → 468 not taken.
1202 if (current->pps_joint_cbcr_qp_offset_present_flag)
2237
1/4
cbs_h266_read_pps:
✗ Branch 389 → 390 not taken.
✓ Branch 389 → 391 taken 1202 times.
cbs_h266_write_pps:
✗ Branch 465 → 466 not taken.
✗ Branch 465 → 467 not taken.
1202 ses(pps_joint_cbcr_qp_offset_list[i], -12, 12, 1, i);
2238 else
2239
0/2
✗ Branch 468 → 469 not taken.
✗ Branch 468 → 471 not taken.
✗ infer(pps_joint_cbcr_qp_offset_list[i], 0);
2240 }
2241 }
2242 } else {
2243
1/2
✗ Branch 473 → 474 not taken.
✓ Branch 473 → 476 taken 260 times.
818 infer(pps_cb_qp_offset, 0);
2244
1/2
✗ Branch 476 → 477 not taken.
✓ Branch 476 → 479 taken 260 times.
818 infer(pps_cr_qp_offset, 0);
2245
1/2
✗ Branch 479 → 480 not taken.
✓ Branch 479 → 482 taken 260 times.
818 infer(pps_joint_cbcr_qp_offset_present_flag, 0);
2246
1/2
✗ Branch 482 → 483 not taken.
✓ Branch 482 → 485 taken 260 times.
818 infer(pps_joint_cbcr_qp_offset_value, 0);
2247
1/2
✗ Branch 485 → 486 not taken.
✓ Branch 485 → 488 taken 260 times.
818 infer(pps_slice_chroma_qp_offsets_present_flag, 0);
2248
1/2
✗ Branch 488 → 489 not taken.
✓ Branch 488 → 491 taken 260 times.
818 infer(pps_cu_chroma_qp_offset_list_enabled_flag, 0);
2249 }
2250
2/4
cbs_h266_read_pps:
✗ Branch 397 → 398 not taken.
✓ Branch 397 → 399 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 492 → 493 not taken.
✓ Branch 492 → 494 taken 391 times.
1941 flag(pps_deblocking_filter_control_present_flag);
2251
4/4
cbs_h266_read_pps:
✓ Branch 399 → 400 taken 908 times.
✓ Branch 399 → 436 taken 642 times.
cbs_h266_write_pps:
✓ Branch 494 → 495 taken 257 times.
✓ Branch 494 → 561 taken 134 times.
1941 if (current->pps_deblocking_filter_control_present_flag) {
2252
2/4
cbs_h266_read_pps:
✗ Branch 401 → 402 not taken.
✓ Branch 401 → 403 taken 908 times.
cbs_h266_write_pps:
✗ Branch 496 → 497 not taken.
✓ Branch 496 → 498 taken 257 times.
1165 flag(pps_deblocking_filter_override_enabled_flag);
2253
2/4
cbs_h266_read_pps:
✗ Branch 404 → 405 not taken.
✓ Branch 404 → 406 taken 908 times.
cbs_h266_write_pps:
✗ Branch 499 → 500 not taken.
✓ Branch 499 → 501 taken 257 times.
1165 flag(pps_deblocking_filter_disabled_flag);
2254
3/4
cbs_h266_read_pps:
✓ Branch 406 → 407 taken 381 times.
✓ Branch 406 → 412 taken 527 times.
cbs_h266_write_pps:
✗ Branch 501 → 502 not taken.
✓ Branch 501 → 507 taken 257 times.
1165 if (!current->pps_no_pic_partition_flag &&
2255
2/4
cbs_h266_read_pps:
✓ Branch 407 → 408 taken 186 times.
✓ Branch 407 → 412 taken 195 times.
cbs_h266_write_pps:
✗ Branch 502 → 503 not taken.
✗ Branch 502 → 507 not taken.
381 current->pps_deblocking_filter_override_enabled_flag)
2256
1/4
cbs_h266_read_pps:
✗ Branch 409 → 410 not taken.
✓ Branch 409 → 411 taken 186 times.
cbs_h266_write_pps:
✗ Branch 504 → 505 not taken.
✗ Branch 504 → 506 not taken.
186 flag(pps_dbf_info_in_ph_flag);
2257 else
2258
1/2
✗ Branch 507 → 508 not taken.
✓ Branch 507 → 510 taken 257 times.
979 infer(pps_dbf_info_in_ph_flag, 0);
2259
3/4
cbs_h266_read_pps:
✓ Branch 413 → 414 taken 388 times.
✓ Branch 413 → 435 taken 520 times.
cbs_h266_write_pps:
✗ Branch 510 → 511 not taken.
✓ Branch 510 → 543 taken 257 times.
1165 if (!current->pps_deblocking_filter_disabled_flag) {
2260
1/4
cbs_h266_read_pps:
✗ Branch 415 → 416 not taken.
✓ Branch 415 → 417 taken 388 times.
cbs_h266_write_pps:
✗ Branch 512 → 513 not taken.
✗ Branch 512 → 514 not taken.
388 se(pps_luma_beta_offset_div2, -12, 12);
2261
1/4
cbs_h266_read_pps:
✗ Branch 418 → 419 not taken.
✓ Branch 418 → 420 taken 388 times.
cbs_h266_write_pps:
✗ Branch 515 → 516 not taken.
✗ Branch 515 → 517 not taken.
388 se(pps_luma_tc_offset_div2, -12, 12);
2262
2/4
cbs_h266_read_pps:
✓ Branch 420 → 421 taken 369 times.
✓ Branch 420 → 434 taken 19 times.
cbs_h266_write_pps:
✗ Branch 517 → 518 not taken.
✗ Branch 517 → 531 not taken.
388 if (current->pps_chroma_tool_offsets_present_flag) {
2263
1/4
cbs_h266_read_pps:
✗ Branch 422 → 423 not taken.
✓ Branch 422 → 424 taken 369 times.
cbs_h266_write_pps:
✗ Branch 519 → 520 not taken.
✗ Branch 519 → 521 not taken.
369 se(pps_cb_beta_offset_div2, -12, 12);
2264
1/4
cbs_h266_read_pps:
✗ Branch 425 → 426 not taken.
✓ Branch 425 → 427 taken 369 times.
cbs_h266_write_pps:
✗ Branch 522 → 523 not taken.
✗ Branch 522 → 524 not taken.
369 se(pps_cb_tc_offset_div2, -12, 12);
2265
1/4
cbs_h266_read_pps:
✗ Branch 428 → 429 not taken.
✓ Branch 428 → 430 taken 369 times.
cbs_h266_write_pps:
✗ Branch 525 → 526 not taken.
✗ Branch 525 → 527 not taken.
369 se(pps_cr_beta_offset_div2, -12, 12);
2266
1/4
cbs_h266_read_pps:
✗ Branch 431 → 432 not taken.
✓ Branch 431 → 433 taken 369 times.
cbs_h266_write_pps:
✗ Branch 528 → 529 not taken.
✗ Branch 528 → 530 not taken.
369 se(pps_cr_tc_offset_div2, -12, 12);
2267 } else {
2268
0/2
✗ Branch 531 → 532 not taken.
✗ Branch 531 → 534 not taken.
19 infer(pps_cb_beta_offset_div2,
2269 current->pps_luma_beta_offset_div2);
2270
0/2
✗ Branch 534 → 535 not taken.
✗ Branch 534 → 537 not taken.
19 infer(pps_cb_tc_offset_div2, current->pps_luma_tc_offset_div2);
2271
0/2
✗ Branch 537 → 538 not taken.
✗ Branch 537 → 540 not taken.
19 infer(pps_cr_beta_offset_div2,
2272 current->pps_luma_beta_offset_div2);
2273
0/2
✗ Branch 540 → 541 not taken.
✗ Branch 540 → 588 not taken.
19 infer(pps_cr_tc_offset_div2, current->pps_luma_tc_offset_div2);
2274 }
2275 } else {
2276
1/2
✗ Branch 543 → 544 not taken.
✓ Branch 543 → 546 taken 257 times.
777 infer(pps_luma_beta_offset_div2, 0);
2277
1/2
✗ Branch 546 → 547 not taken.
✓ Branch 546 → 549 taken 257 times.
777 infer(pps_luma_tc_offset_div2, 0);
2278
1/2
✗ Branch 549 → 550 not taken.
✓ Branch 549 → 552 taken 257 times.
777 infer(pps_cb_beta_offset_div2, 0);
2279
1/2
✗ Branch 552 → 553 not taken.
✓ Branch 552 → 555 taken 257 times.
777 infer(pps_cb_tc_offset_div2, 0);
2280
1/2
✗ Branch 555 → 556 not taken.
✓ Branch 555 → 558 taken 257 times.
777 infer(pps_cr_beta_offset_div2, 0);
2281
1/2
✗ Branch 558 → 559 not taken.
✓ Branch 558 → 588 taken 257 times.
777 infer(pps_cr_tc_offset_div2, 0);
2282 }
2283 } else {
2284
1/2
✗ Branch 561 → 562 not taken.
✓ Branch 561 → 564 taken 134 times.
776 infer(pps_deblocking_filter_override_enabled_flag, 0);
2285
1/2
✗ Branch 564 → 565 not taken.
✓ Branch 564 → 567 taken 134 times.
776 infer(pps_deblocking_filter_disabled_flag, 0);
2286
1/2
✗ Branch 567 → 568 not taken.
✓ Branch 567 → 570 taken 134 times.
776 infer(pps_dbf_info_in_ph_flag, 0);
2287
1/2
✗ Branch 570 → 571 not taken.
✓ Branch 570 → 573 taken 134 times.
776 infer(pps_luma_beta_offset_div2, 0);
2288
1/2
✗ Branch 573 → 574 not taken.
✓ Branch 573 → 576 taken 134 times.
776 infer(pps_luma_tc_offset_div2, 0);
2289
1/2
✗ Branch 576 → 577 not taken.
✓ Branch 576 → 579 taken 134 times.
776 infer(pps_cb_beta_offset_div2, 0);
2290
1/2
✗ Branch 579 → 580 not taken.
✓ Branch 579 → 582 taken 134 times.
776 infer(pps_cb_tc_offset_div2, 0);
2291
1/2
✗ Branch 582 → 583 not taken.
✓ Branch 582 → 585 taken 134 times.
776 infer(pps_cr_beta_offset_div2, 0);
2292
1/2
✗ Branch 585 → 586 not taken.
✓ Branch 585 → 588 taken 134 times.
776 infer(pps_cr_tc_offset_div2, 0);
2293 }
2294
2295
4/4
cbs_h266_read_pps:
✓ Branch 437 → 438 taken 434 times.
✓ Branch 437 → 458 taken 1116 times.
cbs_h266_write_pps:
✓ Branch 588 → 589 taken 11 times.
✓ Branch 588 → 607 taken 380 times.
1941 if (!current->pps_no_pic_partition_flag) {
2296
2/4
cbs_h266_read_pps:
✗ Branch 439 → 440 not taken.
✓ Branch 439 → 441 taken 434 times.
cbs_h266_write_pps:
✗ Branch 590 → 591 not taken.
✓ Branch 590 → 592 taken 11 times.
445 flag(pps_rpl_info_in_ph_flag);
2297
2/4
cbs_h266_read_pps:
✗ Branch 442 → 443 not taken.
✓ Branch 442 → 444 taken 434 times.
cbs_h266_write_pps:
✗ Branch 593 → 594 not taken.
✓ Branch 593 → 595 taken 11 times.
445 flag(pps_sao_info_in_ph_flag);
2298
2/4
cbs_h266_read_pps:
✗ Branch 445 → 446 not taken.
✓ Branch 445 → 447 taken 434 times.
cbs_h266_write_pps:
✗ Branch 596 → 597 not taken.
✓ Branch 596 → 598 taken 11 times.
445 flag(pps_alf_info_in_ph_flag);
2299
3/4
cbs_h266_read_pps:
✓ Branch 447 → 448 taken 76 times.
✓ Branch 447 → 449 taken 358 times.
cbs_h266_write_pps:
✓ Branch 598 → 599 taken 11 times.
✗ Branch 598 → 600 not taken.
445 if ((current->pps_weighted_pred_flag ||
2300
2/4
cbs_h266_read_pps:
✗ Branch 448 → 449 not taken.
✓ Branch 448 → 454 taken 76 times.
cbs_h266_write_pps:
✗ Branch 599 → 600 not taken.
✓ Branch 599 → 604 taken 11 times.
87 current->pps_weighted_bipred_flag) &&
2301
2/4
cbs_h266_read_pps:
✓ Branch 449 → 450 taken 12 times.
✓ Branch 449 → 454 taken 346 times.
cbs_h266_write_pps:
✗ Branch 600 → 601 not taken.
✗ Branch 600 → 604 not taken.
358 current->pps_rpl_info_in_ph_flag)
2302
1/4
cbs_h266_read_pps:
✗ Branch 451 → 452 not taken.
✓ Branch 451 → 453 taken 12 times.
cbs_h266_write_pps:
✗ Branch 602 → 603 not taken.
✗ Branch 602 → 604 not taken.
12 flag(pps_wp_info_in_ph_flag);
2303
2/4
cbs_h266_read_pps:
✗ Branch 455 → 456 not taken.
✓ Branch 455 → 457 taken 434 times.
cbs_h266_write_pps:
✗ Branch 605 → 606 not taken.
✓ Branch 605 → 607 taken 11 times.
445 flag(pps_qp_delta_info_in_ph_flag);
2304 }
2305
2/4
cbs_h266_read_pps:
✗ Branch 459 → 460 not taken.
✓ Branch 459 → 461 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 608 → 609 not taken.
✓ Branch 608 → 610 taken 391 times.
1941 flag(pps_picture_header_extension_present_flag);
2306
2/4
cbs_h266_read_pps:
✗ Branch 462 → 463 not taken.
✓ Branch 462 → 464 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 611 → 612 not taken.
✓ Branch 611 → 613 taken 391 times.
1941 flag(pps_slice_header_extension_present_flag);
2307
2308
2/4
cbs_h266_read_pps:
✗ Branch 465 → 466 not taken.
✓ Branch 465 → 467 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 614 → 615 not taken.
✓ Branch 614 → 616 taken 391 times.
1941 flag(pps_extension_flag);
2309
2/4
cbs_h266_read_pps:
✗ Branch 467 → 468 not taken.
✓ Branch 467 → 471 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 616 → 617 not taken.
✓ Branch 616 → 620 taken 391 times.
1941 if (current->pps_extension_flag)
2310
0/4
cbs_h266_read_pps:
✗ Branch 469 → 470 not taken.
✗ Branch 469 → 471 not taken.
cbs_h266_write_pps:
✗ Branch 618 → 619 not taken.
✗ Branch 618 → 620 not taken.
✗ CHECK(FUNC(extension_data) (ctx, rw, &current->extension_data));
2311
2312
2/4
cbs_h266_read_pps:
✗ Branch 472 → 473 not taken.
✓ Branch 472 → 474 taken 1550 times.
cbs_h266_write_pps:
✗ Branch 621 → 622 not taken.
✓ Branch 621 → 623 taken 391 times.
1941 CHECK(FUNC(rbsp_trailing_bits) (ctx, rw));
2313 1941 return 0;
2314 }
2315
2316 690 static int FUNC(alf_data)(CodedBitstreamContext *ctx, RWContext *rw,
2317 H266RawAPS *current)
2318 {
2319 int err, j, k;
2320
2321
2/4
cbs_h266_read_alf_data:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 509 times.
cbs_h266_write_alf_data:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 181 times.
690 flag(alf_luma_filter_signal_flag);
2322
2323
4/4
cbs_h266_read_alf_data:
✓ Branch 5 → 6 taken 495 times.
✓ Branch 5 → 16 taken 14 times.
cbs_h266_write_alf_data:
✓ Branch 5 → 6 taken 175 times.
✓ Branch 5 → 15 taken 6 times.
690 if (current->aps_chroma_present_flag) {
2324
2/4
cbs_h266_read_alf_data:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 495 times.
cbs_h266_write_alf_data:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 175 times.
670 flag(alf_chroma_filter_signal_flag);
2325
2/4
cbs_h266_read_alf_data:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 495 times.
cbs_h266_write_alf_data:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 175 times.
670 flag(alf_cc_cb_filter_signal_flag);
2326
2/4
cbs_h266_read_alf_data:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 495 times.
cbs_h266_write_alf_data:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 24 taken 175 times.
670 flag(alf_cc_cr_filter_signal_flag);
2327 } else {
2328
1/2
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 18 taken 6 times.
20 infer(alf_chroma_filter_signal_flag, 0);
2329
1/2
✗ Branch 18 → 19 not taken.
✓ Branch 18 → 21 taken 6 times.
20 infer(alf_cc_cb_filter_signal_flag, 0);
2330
1/2
✗ Branch 21 → 22 not taken.
✓ Branch 21 → 24 taken 6 times.
20 infer(alf_cc_cr_filter_signal_flag, 0);
2331 }
2332
2333
4/4
cbs_h266_read_alf_data:
✓ Branch 17 → 18 taken 411 times.
✓ Branch 17 → 46 taken 98 times.
cbs_h266_write_alf_data:
✓ Branch 24 → 25 taken 134 times.
✓ Branch 24 → 55 taken 47 times.
690 if (current->alf_luma_filter_signal_flag) {
2334
2/4
cbs_h266_read_alf_data:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 411 times.
cbs_h266_write_alf_data:
✗ Branch 26 → 27 not taken.
✓ Branch 26 → 28 taken 134 times.
545 flag(alf_luma_clip_flag);
2335
2/4
cbs_h266_read_alf_data:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 24 taken 411 times.
cbs_h266_write_alf_data:
✗ Branch 29 → 30 not taken.
✓ Branch 29 → 31 taken 134 times.
545 ue(alf_luma_num_filters_signalled_minus1, 0, VVC_NUM_ALF_FILTERS - 1);
2336
4/4
cbs_h266_read_alf_data:
✓ Branch 24 → 25 taken 292 times.
✓ Branch 24 → 31 taken 119 times.
cbs_h266_write_alf_data:
✓ Branch 31 → 32 taken 80 times.
✓ Branch 31 → 38 taken 54 times.
545 if (current->alf_luma_num_filters_signalled_minus1 > 0) {
2337 372 unsigned int bits = av_ceil_log2(current->alf_luma_num_filters_signalled_minus1 + 1);
2338
4/4
cbs_h266_read_alf_data:
✓ Branch 30 → 26 taken 7300 times.
✓ Branch 30 → 31 taken 292 times.
cbs_h266_write_alf_data:
✓ Branch 37 → 33 taken 2000 times.
✓ Branch 37 → 38 taken 80 times.
9672 for (int filt_idx = 0; filt_idx < VVC_NUM_ALF_FILTERS; filt_idx++)
2339
2/4
cbs_h266_read_alf_data:
✗ Branch 27 → 28 not taken.
✓ Branch 27 → 29 taken 7300 times.
cbs_h266_write_alf_data:
✗ Branch 34 → 35 not taken.
✓ Branch 34 → 36 taken 2000 times.
9300 us(bits, alf_luma_coeff_delta_idx[filt_idx],
2340 0, current->alf_luma_num_filters_signalled_minus1,
2341 1, filt_idx);
2342 }
2343
4/4
cbs_h266_read_alf_data:
✓ Branch 45 → 32 taken 2780 times.
✓ Branch 45 → 47 taken 411 times.
cbs_h266_write_alf_data:
✓ Branch 54 → 39 taken 415 times.
✓ Branch 54 → 61 taken 134 times.
3740 for (int sf_idx = 0; sf_idx <= current->alf_luma_num_filters_signalled_minus1; sf_idx++)
2344
4/4
cbs_h266_read_alf_data:
✓ Branch 43 → 33 taken 33360 times.
✓ Branch 43 → 44 taken 2780 times.
cbs_h266_write_alf_data:
✓ Branch 52 → 40 taken 4980 times.
✓ Branch 52 → 53 taken 415 times.
41535 for (j = 0; j < 12; j++) {
2345
2/4
cbs_h266_read_alf_data:
✗ Branch 34 → 35 not taken.
✓ Branch 34 → 36 taken 33360 times.
cbs_h266_write_alf_data:
✗ Branch 41 → 42 not taken.
✓ Branch 41 → 43 taken 4980 times.
38340 ues(alf_luma_coeff_abs[sf_idx][j], 0, 128, 2, sf_idx, j);
2346
4/4
cbs_h266_read_alf_data:
✓ Branch 36 → 37 taken 32364 times.
✓ Branch 36 → 41 taken 996 times.
cbs_h266_write_alf_data:
✓ Branch 43 → 44 taken 4655 times.
✓ Branch 43 → 48 taken 325 times.
38340 if (current->alf_luma_coeff_abs[sf_idx][j])
2347
2/4
cbs_h266_read_alf_data:
✗ Branch 38 → 39 not taken.
✓ Branch 38 → 40 taken 32364 times.
cbs_h266_write_alf_data:
✗ Branch 45 → 46 not taken.
✓ Branch 45 → 47 taken 4655 times.
37019 ubs(1, alf_luma_coeff_sign[sf_idx][j], 2, sf_idx, j);
2348 else
2349
1/2
✗ Branch 48 → 49 not taken.
✓ Branch 48 → 51 taken 325 times.
1321 infer(alf_luma_coeff_sign[sf_idx][j], 0);
2350 }
2351 } else {
2352
1/2
✗ Branch 55 → 56 not taken.
✓ Branch 55 → 58 taken 47 times.
145 infer(alf_luma_clip_flag, 0);
2353
1/2
✗ Branch 58 → 59 not taken.
✓ Branch 58 → 61 taken 47 times.
145 infer(alf_luma_num_filters_signalled_minus1, 0);
2354 }
2355
4/4
cbs_h266_read_alf_data:
✓ Branch 58 → 48 taken 2878 times.
✓ Branch 58 → 59 taken 509 times.
cbs_h266_write_alf_data:
✓ Branch 74 → 62 taken 462 times.
✓ Branch 74 → 75 taken 181 times.
4030 for (int sf_idx = 0; sf_idx <= current->alf_luma_num_filters_signalled_minus1; sf_idx++) {
2356
4/4
cbs_h266_read_alf_data:
✓ Branch 56 → 49 taken 34536 times.
✓ Branch 56 → 57 taken 2878 times.
cbs_h266_write_alf_data:
✓ Branch 72 → 63 taken 5544 times.
✓ Branch 72 → 73 taken 462 times.
43420 for (j = 0; j < 12; j++) {
2357
4/4
cbs_h266_read_alf_data:
✓ Branch 49 → 50 taken 22752 times.
✓ Branch 49 → 54 taken 11784 times.
cbs_h266_write_alf_data:
✓ Branch 63 → 64 taken 4392 times.
✓ Branch 63 → 68 taken 1152 times.
40080 if (current->alf_luma_clip_flag)
2358
2/4
cbs_h266_read_alf_data:
✗ Branch 51 → 52 not taken.
✓ Branch 51 → 53 taken 22752 times.
cbs_h266_write_alf_data:
✗ Branch 65 → 66 not taken.
✓ Branch 65 → 67 taken 4392 times.
27144 ubs(2, alf_luma_clip_idx[sf_idx][j], 2, sf_idx, j);
2359 else
2360
1/2
✗ Branch 68 → 69 not taken.
✓ Branch 68 → 71 taken 1152 times.
12936 infer(alf_luma_clip_idx[sf_idx][j], 0);
2361 }
2362 }
2363
2364
4/4
cbs_h266_read_alf_data:
✓ Branch 59 → 60 taken 340 times.
✓ Branch 59 → 67 taken 169 times.
cbs_h266_write_alf_data:
✓ Branch 75 → 76 taken 102 times.
✓ Branch 75 → 83 taken 79 times.
690 if (current->alf_chroma_filter_signal_flag) {
2365
2/4
cbs_h266_read_alf_data:
✗ Branch 61 → 62 not taken.
✓ Branch 61 → 63 taken 340 times.
cbs_h266_write_alf_data:
✗ Branch 77 → 78 not taken.
✓ Branch 77 → 79 taken 102 times.
442 flag(alf_chroma_clip_flag);
2366
2/4
cbs_h266_read_alf_data:
✗ Branch 64 → 65 not taken.
✓ Branch 64 → 66 taken 340 times.
cbs_h266_write_alf_data:
✗ Branch 80 → 81 not taken.
✓ Branch 80 → 82 taken 102 times.
442 ue(alf_chroma_num_alt_filters_minus1, 0, 7);
2367 } else {
2368
1/2
✗ Branch 83 → 84 not taken.
✓ Branch 83 → 86 taken 79 times.
248 infer(alf_chroma_clip_flag, 0);
2369
1/2
✗ Branch 86 → 87 not taken.
✓ Branch 86 → 89 taken 79 times.
248 infer(alf_chroma_num_alt_filters_minus1, 0);
2370 }
2371
4/4
cbs_h266_read_alf_data:
✓ Branch 94 → 69 taken 1181 times.
✓ Branch 94 → 95 taken 509 times.
cbs_h266_write_alf_data:
✓ Branch 121 → 90 taken 351 times.
✓ Branch 121 → 122 taken 181 times.
2222 for (int alt_idx = 0; alt_idx <= current->alf_chroma_num_alt_filters_minus1; alt_idx++) {
2372
4/4
cbs_h266_read_alf_data:
✓ Branch 83 → 70 taken 7086 times.
✓ Branch 83 → 84 taken 1181 times.
cbs_h266_write_alf_data:
✓ Branch 108 → 91 taken 2106 times.
✓ Branch 108 → 109 taken 351 times.
10724 for (j = 0; j < 6; j++) {
2373
4/4
cbs_h266_read_alf_data:
✓ Branch 70 → 71 taken 6072 times.
✓ Branch 70 → 75 taken 1014 times.
cbs_h266_write_alf_data:
✓ Branch 91 → 92 taken 1632 times.
✓ Branch 91 → 96 taken 474 times.
9192 if (current->alf_chroma_filter_signal_flag)
2374
2/4
cbs_h266_read_alf_data:
✗ Branch 72 → 73 not taken.
✓ Branch 72 → 74 taken 6072 times.
cbs_h266_write_alf_data:
✗ Branch 93 → 94 not taken.
✓ Branch 93 → 95 taken 1632 times.
7704 ues(alf_chroma_coeff_abs[alt_idx][j], 0, 128, 2, alt_idx, j);
2375 else
2376
1/2
✗ Branch 96 → 97 not taken.
✓ Branch 96 → 99 taken 474 times.
1488 infer(alf_chroma_coeff_abs[alt_idx][j], 0);
2377
4/4
cbs_h266_read_alf_data:
✓ Branch 76 → 77 taken 5756 times.
✓ Branch 76 → 81 taken 1330 times.
cbs_h266_write_alf_data:
✓ Branch 99 → 100 taken 1523 times.
✓ Branch 99 → 104 taken 583 times.
9192 if (current->alf_chroma_coeff_abs[alt_idx][j] > 0)
2378
2/4
cbs_h266_read_alf_data:
✗ Branch 78 → 79 not taken.
✓ Branch 78 → 80 taken 5756 times.
cbs_h266_write_alf_data:
✗ Branch 101 → 102 not taken.
✓ Branch 101 → 103 taken 1523 times.
7279 ubs(1, alf_chroma_coeff_sign[alt_idx][j], 2, alt_idx, j);
2379 else
2380
1/2
✗ Branch 104 → 105 not taken.
✓ Branch 104 → 107 taken 583 times.
1913 infer(alf_chroma_coeff_sign[alt_idx][j], 0);
2381 }
2382
4/4
cbs_h266_read_alf_data:
✓ Branch 92 → 85 taken 7086 times.
✓ Branch 92 → 93 taken 1181 times.
cbs_h266_write_alf_data:
✓ Branch 119 → 110 taken 2106 times.
✓ Branch 119 → 120 taken 351 times.
10724 for (j = 0; j < 6; j++) {
2383
4/4
cbs_h266_read_alf_data:
✓ Branch 85 → 86 taken 4782 times.
✓ Branch 85 → 90 taken 2304 times.
cbs_h266_write_alf_data:
✓ Branch 110 → 111 taken 1440 times.
✓ Branch 110 → 115 taken 666 times.
9192 if (current->alf_chroma_clip_flag)
2384
2/4
cbs_h266_read_alf_data:
✗ Branch 87 → 88 not taken.
✓ Branch 87 → 89 taken 4782 times.
cbs_h266_write_alf_data:
✗ Branch 112 → 113 not taken.
✓ Branch 112 → 114 taken 1440 times.
6222 ubs(2, alf_chroma_clip_idx[alt_idx][j], 2, alt_idx, j);
2385 else
2386
1/2
✗ Branch 115 → 116 not taken.
✓ Branch 115 → 118 taken 666 times.
2970 infer(alf_chroma_clip_idx[alt_idx][j], 0);
2387 }
2388 }
2389
2390
4/4
cbs_h266_read_alf_data:
✓ Branch 95 → 96 taken 192 times.
✓ Branch 95 → 100 taken 317 times.
cbs_h266_write_alf_data:
✓ Branch 122 → 123 taken 49 times.
✓ Branch 122 → 127 taken 132 times.
690 if (current->alf_cc_cb_filter_signal_flag)
2391
2/4
cbs_h266_read_alf_data:
✗ Branch 97 → 98 not taken.
✓ Branch 97 → 99 taken 192 times.
cbs_h266_write_alf_data:
✗ Branch 124 → 125 not taken.
✓ Branch 124 → 126 taken 49 times.
241 ue(alf_cc_cb_filters_signalled_minus1, 0, 3);
2392 else
2393
1/2
✗ Branch 127 → 128 not taken.
✓ Branch 127 → 130 taken 132 times.
449 infer(alf_cc_cb_filters_signalled_minus1, 0);
2394
4/4
cbs_h266_read_alf_data:
✓ Branch 118 → 102 taken 925 times.
✓ Branch 118 → 119 taken 509 times.
cbs_h266_write_alf_data:
✓ Branch 151 → 131 taken 309 times.
✓ Branch 151 → 152 taken 181 times.
1924 for (k = 0; k <= current->alf_cc_cb_filters_signalled_minus1; k++) {
2395
4/4
cbs_h266_read_alf_data:
✓ Branch 116 → 103 taken 6475 times.
✓ Branch 116 → 117 taken 925 times.
cbs_h266_write_alf_data:
✓ Branch 149 → 132 taken 2163 times.
✓ Branch 149 → 150 taken 309 times.
9872 for (j = 0; j < 7; j++) {
2396
4/4
cbs_h266_read_alf_data:
✓ Branch 103 → 104 taken 4256 times.
✓ Branch 103 → 108 taken 2219 times.
cbs_h266_write_alf_data:
✓ Branch 132 → 133 taken 1239 times.
✓ Branch 132 → 137 taken 924 times.
8638 if (current->alf_cc_cb_filter_signal_flag)
2397
2/4
cbs_h266_read_alf_data:
✗ Branch 105 → 106 not taken.
✓ Branch 105 → 107 taken 4256 times.
cbs_h266_write_alf_data:
✗ Branch 134 → 135 not taken.
✓ Branch 134 → 136 taken 1239 times.
5495 ubs(3, alf_cc_cb_mapped_coeff_abs[k][j], 2, k, j);
2398 else
2399
1/2
✗ Branch 137 → 138 not taken.
✓ Branch 137 → 140 taken 924 times.
3143 infer(alf_cc_cb_mapped_coeff_abs[k][j], 0);
2400
4/4
cbs_h266_read_alf_data:
✓ Branch 109 → 110 taken 3586 times.
✓ Branch 109 → 114 taken 2889 times.
cbs_h266_write_alf_data:
✓ Branch 140 → 141 taken 1040 times.
✓ Branch 140 → 145 taken 1123 times.
8638 if (current->alf_cc_cb_mapped_coeff_abs[k][j])
2401
2/4
cbs_h266_read_alf_data:
✗ Branch 111 → 112 not taken.
✓ Branch 111 → 113 taken 3586 times.
cbs_h266_write_alf_data:
✗ Branch 142 → 143 not taken.
✓ Branch 142 → 144 taken 1040 times.
4626 ubs(1, alf_cc_cb_coeff_sign[k][j], 2, k, j);
2402 else
2403
1/2
✗ Branch 145 → 146 not taken.
✓ Branch 145 → 148 taken 1123 times.
4012 infer(alf_cc_cb_coeff_sign[k][j], 0);
2404 }
2405 }
2406
2407
4/4
cbs_h266_read_alf_data:
✓ Branch 119 → 120 taken 173 times.
✓ Branch 119 → 124 taken 336 times.
cbs_h266_write_alf_data:
✓ Branch 152 → 153 taken 40 times.
✓ Branch 152 → 157 taken 141 times.
690 if (current->alf_cc_cr_filter_signal_flag)
2408
2/4
cbs_h266_read_alf_data:
✗ Branch 121 → 122 not taken.
✓ Branch 121 → 123 taken 173 times.
cbs_h266_write_alf_data:
✗ Branch 154 → 155 not taken.
✓ Branch 154 → 156 taken 40 times.
213 ue(alf_cc_cr_filters_signalled_minus1, 0, 3);
2409 else
2410
1/2
✗ Branch 157 → 158 not taken.
✓ Branch 157 → 160 taken 141 times.
477 infer(alf_cc_cr_filters_signalled_minus1, 0);
2411
4/4
cbs_h266_read_alf_data:
✓ Branch 142 → 126 taken 879 times.
✓ Branch 142 → 143 taken 509 times.
cbs_h266_write_alf_data:
✓ Branch 181 → 161 taken 285 times.
✓ Branch 181 → 182 taken 181 times.
1854 for (k = 0; k < current->alf_cc_cr_filters_signalled_minus1 + 1; k++) {
2412
4/4
cbs_h266_read_alf_data:
✓ Branch 140 → 127 taken 6153 times.
✓ Branch 140 → 141 taken 879 times.
cbs_h266_write_alf_data:
✓ Branch 179 → 162 taken 1995 times.
✓ Branch 179 → 180 taken 285 times.
9312 for (j = 0; j < 7; j++) {
2413
4/4
cbs_h266_read_alf_data:
✓ Branch 127 → 128 taken 3801 times.
✓ Branch 127 → 132 taken 2352 times.
cbs_h266_write_alf_data:
✓ Branch 162 → 163 taken 1008 times.
✓ Branch 162 → 167 taken 987 times.
8148 if (current->alf_cc_cr_filter_signal_flag)
2414
2/4
cbs_h266_read_alf_data:
✗ Branch 129 → 130 not taken.
✓ Branch 129 → 131 taken 3801 times.
cbs_h266_write_alf_data:
✗ Branch 164 → 165 not taken.
✓ Branch 164 → 166 taken 1008 times.
4809 ubs(3, alf_cc_cr_mapped_coeff_abs[k][j], 2, k, j);
2415 else
2416
1/2
✗ Branch 167 → 168 not taken.
✓ Branch 167 → 170 taken 987 times.
3339 infer(alf_cc_cr_mapped_coeff_abs[k][j], 0);
2417
4/4
cbs_h266_read_alf_data:
✓ Branch 133 → 134 taken 3324 times.
✓ Branch 133 → 138 taken 2829 times.
cbs_h266_write_alf_data:
✓ Branch 170 → 171 taken 874 times.
✓ Branch 170 → 175 taken 1121 times.
8148 if (current->alf_cc_cr_mapped_coeff_abs[k][j])
2418
2/4
cbs_h266_read_alf_data:
✗ Branch 135 → 136 not taken.
✓ Branch 135 → 137 taken 3324 times.
cbs_h266_write_alf_data:
✗ Branch 172 → 173 not taken.
✓ Branch 172 → 174 taken 874 times.
4198 ubs(1, alf_cc_cr_coeff_sign[k][j], 2, k, j);
2419 else
2420
1/2
✗ Branch 175 → 176 not taken.
✓ Branch 175 → 178 taken 1121 times.
3950 infer(alf_cc_cr_coeff_sign[k][j], 0);
2421 }
2422 }
2423
2424 690 return 0;
2425 }
2426
2427 161 static int FUNC(lmcs_data)(CodedBitstreamContext *ctx, RWContext *rw,
2428 H266RawAPS *current)
2429 {
2430 int err, i, lmcs_max_bin_idx;
2431
2432
2/4
cbs_h266_read_lmcs_data:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 124 times.
cbs_h266_write_lmcs_data:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 37 times.
161 ue(lmcs_min_bin_idx, 0, 15);
2433
2/4
cbs_h266_read_lmcs_data:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 124 times.
cbs_h266_write_lmcs_data:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 37 times.
161 ue(lmcs_delta_max_bin_idx, 0, 15);
2434
2/4
cbs_h266_read_lmcs_data:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 124 times.
cbs_h266_write_lmcs_data:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 37 times.
161 ue(lmcs_delta_cw_prec_minus1, 0, 14);
2435
2436 161 lmcs_max_bin_idx = 15 - current->lmcs_delta_max_bin_idx;
2437
2438
2/4
cbs_h266_read_lmcs_data:
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 13 taken 124 times.
cbs_h266_write_lmcs_data:
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 13 taken 37 times.
161 if (lmcs_max_bin_idx < current->lmcs_min_bin_idx)
2439 ✗ return AVERROR_INVALIDDATA;
2440
2441
4/4
cbs_h266_read_lmcs_data:
✓ Branch 24 → 14 taken 1721 times.
✓ Branch 24 → 25 taken 124 times.
cbs_h266_write_lmcs_data:
✓ Branch 26 → 14 taken 518 times.
✓ Branch 26 → 27 taken 37 times.
2400 for (i = current->lmcs_min_bin_idx; i <= lmcs_max_bin_idx; i++) {
2442
2/4
cbs_h266_read_lmcs_data:
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 17 taken 1721 times.
cbs_h266_write_lmcs_data:
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 17 taken 518 times.
2239 ubs(current->lmcs_delta_cw_prec_minus1 + 1, lmcs_delta_abs_cw[i], 1, i);
2443
4/4
cbs_h266_read_lmcs_data:
✓ Branch 17 → 18 taken 1582 times.
✓ Branch 17 → 22 taken 139 times.
cbs_h266_write_lmcs_data:
✓ Branch 17 → 18 taken 485 times.
✓ Branch 17 → 22 taken 33 times.
2239 if (current->lmcs_delta_abs_cw[i] > 0)
2444
2/4
cbs_h266_read_lmcs_data:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 1582 times.
cbs_h266_write_lmcs_data:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 485 times.
2067 flags(lmcs_delta_sign_cw_flag[i], 1, i);
2445 else
2446
1/2
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 25 taken 33 times.
172 infer(lmcs_delta_sign_cw_flag[i], 0);
2447 }
2448
2449
2/4
cbs_h266_read_lmcs_data:
✓ Branch 25 → 26 taken 124 times.
✗ Branch 25 → 35 not taken.
cbs_h266_write_lmcs_data:
✓ Branch 27 → 28 taken 37 times.
✗ Branch 27 → 38 not taken.
161 if (current->aps_chroma_present_flag) {
2450
2/4
cbs_h266_read_lmcs_data:
✗ Branch 27 → 28 not taken.
✓ Branch 27 → 29 taken 124 times.
cbs_h266_write_lmcs_data:
✗ Branch 29 → 30 not taken.
✓ Branch 29 → 31 taken 37 times.
161 ub(3, lmcs_delta_abs_crs);
2451
3/4
cbs_h266_read_lmcs_data:
✓ Branch 29 → 30 taken 122 times.
✓ Branch 29 → 34 taken 2 times.
cbs_h266_write_lmcs_data:
✓ Branch 31 → 32 taken 37 times.
✗ Branch 31 → 35 not taken.
161 if (current->lmcs_delta_abs_crs > 0)
2452
2/4
cbs_h266_read_lmcs_data:
✗ Branch 31 → 32 not taken.
✓ Branch 31 → 33 taken 122 times.
cbs_h266_write_lmcs_data:
✗ Branch 33 → 34 not taken.
✓ Branch 33 → 44 taken 37 times.
159 flag(lmcs_delta_sign_crs_flag);
2453 else
2454
0/2
✗ Branch 35 → 36 not taken.
✗ Branch 35 → 44 not taken.
2 infer(lmcs_delta_sign_crs_flag, 0);
2455 } else {
2456
0/2
✗ Branch 38 → 39 not taken.
✗ Branch 38 → 41 not taken.
✗ infer(lmcs_delta_abs_crs, 0);
2457
0/2
✗ Branch 41 → 42 not taken.
✗ Branch 41 → 44 not taken.
✗ infer(lmcs_delta_sign_crs_flag, 0);
2458 }
2459
2460 161 return 0;
2461 }
2462
2463 36 static int FUNC(scaling_list_data)(CodedBitstreamContext *ctx, RWContext *rw,
2464 H266RawAPS *current)
2465 {
2466 // 7.4.3.4, deriving DiagScanOrder
2467 static const uint8_t diag_scan_order[64][2] = {
2468 { 0, 0, }, { 0, 1, }, { 1, 0, }, { 0, 2, }, { 1, 1, }, { 2, 0, }, { 0, 3, }, { 1, 2, },
2469 { 2, 1, }, { 3, 0, }, { 0, 4, }, { 1, 3, }, { 2, 2, }, { 3, 1, }, { 4, 0, }, { 0, 5, },
2470 { 1, 4, }, { 2, 3, }, { 3, 2, }, { 4, 1, }, { 5, 0, }, { 0, 6, }, { 1, 5, }, { 2, 4, },
2471 { 3, 3, }, { 4, 2, }, { 5, 1, }, { 6, 0, }, { 0, 7, }, { 1, 6, }, { 2, 5, }, { 3, 4, },
2472 { 4, 3, }, { 5, 2, }, { 6, 1, }, { 7, 0, }, { 1, 7, }, { 2, 6, }, { 3, 5, }, { 4, 4, },
2473 { 5, 3, }, { 6, 2, }, { 7, 1, }, { 2, 7, }, { 3, 6, }, { 4, 5, }, { 5, 4, }, { 6, 3, },
2474 { 7, 2, }, { 3, 7, }, { 4, 6, }, { 5, 5, }, { 6, 4, }, { 7, 3, }, { 4, 7, }, { 5, 6, },
2475 { 6, 5, }, { 7, 4, }, { 5, 7, }, { 6, 6, }, { 7, 5, }, { 6, 7, }, { 7, 6, }, { 7, 7, }, };
2476 int err;
2477
2478
4/4
cbs_h266_read_scaling_list_data:
✓ Branch 55 → 3 taken 728 times.
✓ Branch 55 → 56 taken 26 times.
cbs_h266_write_scaling_list_data:
✓ Branch 64 → 3 taken 280 times.
✓ Branch 64 → 65 taken 10 times.
1044 for (int id = 0; id < 28; id ++) {
2479
12/12
cbs_h266_read_scaling_list_data:
✓ Branch 3 → 4 taken 504 times.
✓ Branch 3 → 6 taken 224 times.
✓ Branch 4 → 5 taken 342 times.
✓ Branch 4 → 6 taken 162 times.
✓ Branch 5 → 6 taken 18 times.
✓ Branch 5 → 53 taken 324 times.
cbs_h266_write_scaling_list_data:
✓ Branch 3 → 4 taken 224 times.
✓ Branch 3 → 6 taken 56 times.
✓ Branch 4 → 5 taken 152 times.
✓ Branch 4 → 6 taken 72 times.
✓ Branch 5 → 6 taken 8 times.
✓ Branch 5 → 57 taken 144 times.
1008 if (current->aps_chroma_present_flag || id % 3 == 2 || id == 27) {
2480
2/4
cbs_h266_read_scaling_list_data:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 404 times.
cbs_h266_write_scaling_list_data:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 136 times.
540 flags(scaling_list_copy_mode_flag[id], 1, id);
2481
4/4
cbs_h266_read_scaling_list_data:
✓ Branch 9 → 10 taken 170 times.
✓ Branch 9 → 14 taken 234 times.
cbs_h266_write_scaling_list_data:
✓ Branch 9 → 10 taken 48 times.
✓ Branch 9 → 14 taken 88 times.
540 if (!current->scaling_list_copy_mode_flag[id])
2482
2/4
cbs_h266_read_scaling_list_data:
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 13 taken 170 times.
cbs_h266_write_scaling_list_data:
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 13 taken 48 times.
218 flags(scaling_list_pred_mode_flag[id], 1, id);
2483 else
2484
1/2
✗ Branch 14 → 15 not taken.
✓ Branch 14 → 17 taken 88 times.
322 infer(scaling_list_pred_mode_flag[id], 0);
2485
4/4
cbs_h266_read_scaling_list_data:
✓ Branch 15 → 16 taken 170 times.
✓ Branch 15 → 17 taken 234 times.
cbs_h266_write_scaling_list_data:
✓ Branch 17 → 18 taken 48 times.
✓ Branch 17 → 19 taken 88 times.
540 if ((current->scaling_list_copy_mode_flag[id] ||
2486
7/8
cbs_h266_read_scaling_list_data:
✓ Branch 16 → 17 taken 102 times.
✓ Branch 16 → 29 taken 68 times.
✓ Branch 17 → 18 taken 334 times.
✓ Branch 17 → 29 taken 2 times.
cbs_h266_write_scaling_list_data:
✓ Branch 18 → 19 taken 26 times.
✓ Branch 18 → 31 taken 22 times.
✓ Branch 19 → 20 taken 114 times.
✗ Branch 19 → 31 not taken.
540 current->scaling_list_pred_mode_flag[id]) &&
2487
8/8
cbs_h266_read_scaling_list_data:
✓ Branch 18 → 19 taken 328 times.
✓ Branch 18 → 29 taken 6 times.
✓ Branch 19 → 20 taken 320 times.
✓ Branch 19 → 29 taken 8 times.
cbs_h266_write_scaling_list_data:
✓ Branch 20 → 21 taken 111 times.
✓ Branch 20 → 31 taken 3 times.
✓ Branch 21 → 22 taken 108 times.
✓ Branch 21 → 31 taken 3 times.
448 id != 0 && id != 2 && id != 8) {
2488
8/8
cbs_h266_read_scaling_list_data:
✓ Branch 20 → 21 taken 314 times.
✓ Branch 20 → 24 taken 6 times.
✓ Branch 21 → 22 taken 54 times.
✓ Branch 21 → 23 taken 260 times.
cbs_h266_write_scaling_list_data:
✓ Branch 22 → 23 taken 106 times.
✓ Branch 22 → 26 taken 2 times.
✓ Branch 23 → 24 taken 16 times.
✓ Branch 23 → 25 taken 90 times.
428 int max_id_delta = (id < 2) ? id : ((id < 8) ? (id - 2) : (id - 8));
2489
2/4
cbs_h266_read_scaling_list_data:
✗ Branch 26 → 27 not taken.
✓ Branch 26 → 28 taken 320 times.
cbs_h266_write_scaling_list_data:
✗ Branch 28 → 29 not taken.
✓ Branch 28 → 30 taken 108 times.
428 ues(scaling_list_pred_id_delta[id], 0, max_id_delta, 1, id);
2490 }
2491
4/4
cbs_h266_read_scaling_list_data:
✓ Branch 29 → 30 taken 170 times.
✓ Branch 29 → 50 taken 234 times.
cbs_h266_write_scaling_list_data:
✓ Branch 31 → 32 taken 48 times.
✓ Branch 31 → 52 taken 88 times.
540 if (!current->scaling_list_copy_mode_flag[id]) {
2492
8/8
cbs_h266_read_scaling_list_data:
✓ Branch 30 → 31 taken 160 times.
✓ Branch 30 → 34 taken 10 times.
✓ Branch 31 → 32 taken 56 times.
✓ Branch 31 → 33 taken 104 times.
cbs_h266_write_scaling_list_data:
✓ Branch 32 → 33 taken 46 times.
✓ Branch 32 → 36 taken 2 times.
✓ Branch 33 → 34 taken 18 times.
✓ Branch 33 → 35 taken 28 times.
218 int matrix_size = id < 2 ? 2 : (id < 8 ? 4 : 8);
2493
4/4
cbs_h266_read_scaling_list_data:
✓ Branch 35 → 36 taken 44 times.
✓ Branch 35 → 40 taken 126 times.
cbs_h266_write_scaling_list_data:
✓ Branch 37 → 38 taken 8 times.
✓ Branch 37 → 42 taken 40 times.
218 if (id > 13) {
2494 52 int idx = id - 14;
2495
2/4
cbs_h266_read_scaling_list_data:
✗ Branch 37 → 38 not taken.
✓ Branch 37 → 39 taken 44 times.
cbs_h266_write_scaling_list_data:
✗ Branch 39 → 40 not taken.
✓ Branch 39 → 41 taken 8 times.
52 ses(scaling_list_dc_coef[idx], -128, 127, 1, idx);
2496 }
2497
4/4
cbs_h266_read_scaling_list_data:
✓ Branch 49 → 41 taken 7592 times.
✓ Branch 49 → 52 taken 170 times.
cbs_h266_write_scaling_list_data:
✓ Branch 51 → 43 taken 2088 times.
✓ Branch 51 → 56 taken 48 times.
9898 for (int i = 0; i < matrix_size * matrix_size; i++) {
2498 9680 int x = diag_scan_order[i][0];
2499 9680 int y = diag_scan_order[i][1];
2500
12/12
cbs_h266_read_scaling_list_data:
✓ Branch 41 → 42 taken 512 times.
✓ Branch 41 → 44 taken 7080 times.
✓ Branch 42 → 43 taken 256 times.
✓ Branch 42 → 44 taken 256 times.
✓ Branch 43 → 44 taken 128 times.
✓ Branch 43 → 48 taken 128 times.
cbs_h266_write_scaling_list_data:
✓ Branch 43 → 44 taken 128 times.
✓ Branch 43 → 46 taken 1960 times.
✓ Branch 44 → 45 taken 64 times.
✓ Branch 44 → 46 taken 64 times.
✓ Branch 45 → 46 taken 32 times.
✓ Branch 45 → 50 taken 32 times.
9680 if (!(id > 25 && x >= 4 && y >= 4))
2501
2/4
cbs_h266_read_scaling_list_data:
✗ Branch 45 → 46 not taken.
✓ Branch 45 → 47 taken 7464 times.
cbs_h266_write_scaling_list_data:
✗ Branch 47 → 48 not taken.
✓ Branch 47 → 49 taken 2056 times.
9520 ses(scaling_list_delta_coef[id][i], -128, 127, 2, id, i);
2502 }
2503
4/4
cbs_h266_read_scaling_list_data:
✓ Branch 50 → 51 taken 176 times.
✓ Branch 50 → 52 taken 58 times.
cbs_h266_write_scaling_list_data:
✓ Branch 52 → 53 taken 68 times.
✓ Branch 52 → 56 taken 20 times.
322 } else if (id > 13) {
2504 244 int idx = id - 14;
2505
1/2
✗ Branch 53 → 54 not taken.
✓ Branch 53 → 56 taken 68 times.
244 infer(scaling_list_dc_coef[idx], 0);
2506 }
2507 } else {
2508
1/2
✗ Branch 57 → 58 not taken.
✓ Branch 57 → 60 taken 144 times.
468 infer(scaling_list_copy_mode_flag[id], 1);
2509
1/2
✗ Branch 60 → 61 not taken.
✓ Branch 60 → 63 taken 144 times.
468 infer(scaling_list_pred_mode_flag[id], 0);
2510 }
2511 }
2512
2513 36 return 0;
2514 }
2515
2516 887 static int FUNC(aps)(CodedBitstreamContext *ctx, RWContext *rw,
2517 H266RawAPS *current, int prefix)
2518 {
2519 887 int aps_id_max = MAX_UINT_BITS(5);
2520 int err;
2521
2522
2/4
cbs_h266_read_aps:
✓ Branch 2 → 3 taken 659 times.
✗ Branch 2 → 4 not taken.
cbs_h266_write_aps:
✓ Branch 2 → 3 taken 228 times.
✗ Branch 2 → 4 not taken.
887 if (prefix)
2523 887 HEADER("Prefix Adaptation parameter set");
2524 else
2525 ✗ HEADER("Suffix Adaptation parameter set");
2526
2527
4/8
cbs_h266_read_aps:
✓ Branch 5 → 6 taken 659 times.
✗ Branch 5 → 7 not taken.
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 659 times.
cbs_h266_write_aps:
✓ Branch 5 → 6 taken 228 times.
✗ Branch 5 → 7 not taken.
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 228 times.
887 CHECK(FUNC(nal_unit_header)(ctx, rw, &current->nal_unit_header,
2528 prefix ? VVC_PREFIX_APS_NUT
2529 : VVC_SUFFIX_APS_NUT));
2530
2531
2/4
cbs_h266_read_aps:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 14 taken 659 times.
cbs_h266_write_aps:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 14 taken 228 times.
887 ub(3, aps_params_type);
2532
4/4
cbs_h266_read_aps:
✓ Branch 14 → 15 taken 150 times.
✓ Branch 14 → 16 taken 509 times.
cbs_h266_write_aps:
✓ Branch 14 → 15 taken 47 times.
✓ Branch 14 → 16 taken 181 times.
887 if (current->aps_params_type == VVC_ASP_TYPE_ALF ||
2533
4/4
cbs_h266_read_aps:
✓ Branch 15 → 16 taken 26 times.
✓ Branch 15 → 17 taken 124 times.
cbs_h266_write_aps:
✓ Branch 15 → 16 taken 10 times.
✓ Branch 15 → 17 taken 37 times.
197 current->aps_params_type == VVC_ASP_TYPE_SCALING)
2534 726 aps_id_max = 7;
2535
2/4
cbs_h266_read_aps:
✓ Branch 17 → 18 taken 124 times.
✗ Branch 17 → 19 not taken.
cbs_h266_write_aps:
✓ Branch 17 → 18 taken 37 times.
✗ Branch 17 → 19 not taken.
161 else if (current->aps_params_type == VVC_ASP_TYPE_LMCS)
2536 161 aps_id_max = 3;
2537
2/4
cbs_h266_read_aps:
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 22 taken 659 times.
cbs_h266_write_aps:
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 22 taken 228 times.
887 u(5, aps_adaptation_parameter_set_id, 0, aps_id_max);
2538
2/4
cbs_h266_read_aps:
✗ Branch 23 → 24 not taken.
✓ Branch 23 → 25 taken 659 times.
cbs_h266_write_aps:
✗ Branch 23 → 24 not taken.
✓ Branch 23 → 25 taken 228 times.
887 flag(aps_chroma_present_flag);
2539
4/4
cbs_h266_read_aps:
✓ Branch 25 → 26 taken 509 times.
✓ Branch 25 → 29 taken 150 times.
cbs_h266_write_aps:
✓ Branch 25 → 26 taken 181 times.
✓ Branch 25 → 29 taken 47 times.
887 if (current->aps_params_type == VVC_ASP_TYPE_ALF)
2540
2/4
cbs_h266_read_aps:
✗ Branch 27 → 28 not taken.
✓ Branch 27 → 37 taken 509 times.
cbs_h266_write_aps:
✗ Branch 27 → 28 not taken.
✓ Branch 27 → 37 taken 181 times.
690 CHECK(FUNC(alf_data)(ctx, rw, current));
2541
4/4
cbs_h266_read_aps:
✓ Branch 29 → 30 taken 124 times.
✓ Branch 29 → 33 taken 26 times.
cbs_h266_write_aps:
✓ Branch 29 → 30 taken 37 times.
✓ Branch 29 → 33 taken 10 times.
197 else if(current->aps_params_type == VVC_ASP_TYPE_LMCS)
2542
2/4
cbs_h266_read_aps:
✗ Branch 31 → 32 not taken.
✓ Branch 31 → 37 taken 124 times.
cbs_h266_write_aps:
✗ Branch 31 → 32 not taken.
✓ Branch 31 → 37 taken 37 times.
161 CHECK(FUNC(lmcs_data)(ctx, rw, current));
2543
2/4
cbs_h266_read_aps:
✓ Branch 33 → 34 taken 26 times.
✗ Branch 33 → 37 not taken.
cbs_h266_write_aps:
✓ Branch 33 → 34 taken 10 times.
✗ Branch 33 → 37 not taken.
36 else if (current->aps_params_type == VVC_ASP_TYPE_SCALING)
2544
2/4
cbs_h266_read_aps:
✗ Branch 35 → 36 not taken.
✓ Branch 35 → 37 taken 26 times.
cbs_h266_write_aps:
✗ Branch 35 → 36 not taken.
✓ Branch 35 → 37 taken 10 times.
36 CHECK(FUNC(scaling_list_data)(ctx, rw, current));
2545
2/4
cbs_h266_read_aps:
✗ Branch 38 → 39 not taken.
✓ Branch 38 → 40 taken 659 times.
cbs_h266_write_aps:
✗ Branch 38 → 39 not taken.
✓ Branch 38 → 40 taken 228 times.
887 flag(aps_extension_flag);
2546
2/4
cbs_h266_read_aps:
✗ Branch 40 → 41 not taken.
✓ Branch 40 → 44 taken 659 times.
cbs_h266_write_aps:
✗ Branch 40 → 41 not taken.
✓ Branch 40 → 44 taken 228 times.
887 if (current->aps_extension_flag)
2547
0/4
cbs_h266_read_aps:
✗ Branch 42 → 43 not taken.
✗ Branch 42 → 44 not taken.
cbs_h266_write_aps:
✗ Branch 42 → 43 not taken.
✗ Branch 42 → 44 not taken.
✗ CHECK(FUNC(extension_data) (ctx, rw, &current->extension_data));
2548
2/4
cbs_h266_read_aps:
✗ Branch 45 → 46 not taken.
✓ Branch 45 → 47 taken 659 times.
cbs_h266_write_aps:
✗ Branch 45 → 46 not taken.
✓ Branch 45 → 47 taken 228 times.
887 CHECK(FUNC(rbsp_trailing_bits) (ctx, rw));
2549
2550 887 return 0;
2551 }
2552
2553 279 static int FUNC(aud) (CodedBitstreamContext *ctx, RWContext *rw,
2554 H266RawAUD *current)
2555 {
2556 int err;
2557
2558 279 HEADER("Access Unit Delimiter");
2559
2560
2/4
cbs_h266_read_aud:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 267 times.
cbs_h266_write_aud:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 12 times.
279 CHECK(FUNC(nal_unit_header) (ctx, rw,
2561 &current->nal_unit_header, VVC_AUD_NUT));
2562
2563
2/4
cbs_h266_read_aud:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 267 times.
cbs_h266_write_aud:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 12 times.
279 flag(aud_irap_or_gdr_flag);
2564
2/4
cbs_h266_read_aud:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 267 times.
cbs_h266_write_aud:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 12 times.
279 u(3, aud_pic_type, 0, 2);
2565
2566
2/4
cbs_h266_read_aud:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 267 times.
cbs_h266_write_aud:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 12 times.
279 CHECK(FUNC(rbsp_trailing_bits) (ctx, rw));
2567 279 return 0;
2568 }
2569
2570 198 static int FUNC(pred_weight_table) (CodedBitstreamContext *ctx, RWContext *rw,
2571 const H266RawSPS *sps,
2572 const H266RawPPS *pps,
2573 const H266RefPicLists *ref_lists,
2574 uint8_t num_ref_idx_active[2],
2575 H266RawPredWeightTable *current)
2576 {
2577 int err, i, j;
2578
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 182 times.
cbs_h266_write_pred_weight_table:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 16 times.
198 ue(luma_log2_weight_denom, 0, 7);
2579
2/4
cbs_h266_read_pred_weight_table:
✓ Branch 5 → 6 taken 182 times.
✗ Branch 5 → 10 not taken.
cbs_h266_write_pred_weight_table:
✓ Branch 5 → 6 taken 16 times.
✗ Branch 5 → 10 not taken.
198 if (sps->sps_chroma_format_idc != 0) {
2580
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 182 times.
cbs_h266_write_pred_weight_table:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 16 times.
198 se(delta_chroma_log2_weight_denom,
2581 -current->luma_log2_weight_denom,
2582 7 - current->luma_log2_weight_denom);
2583 } else {
2584
0/2
✗ Branch 10 → 11 not taken.
✗ Branch 10 → 13 not taken.
✗ infer(delta_chroma_log2_weight_denom, 0);
2585 }
2586
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 16 taken 182 times.
cbs_h266_write_pred_weight_table:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 20 taken 16 times.
198 if (pps->pps_wp_info_in_ph_flag) {
2587
0/4
cbs_h266_read_pred_weight_table:
✗ Branch 13 → 14 not taken.
✗ Branch 13 → 15 not taken.
cbs_h266_write_pred_weight_table:
✗ Branch 15 → 16 not taken.
✗ Branch 15 → 17 not taken.
✗ ue(num_l0_weights, 0,
2588 FFMIN(15, ref_lists->rpl_ref_list[0].num_ref_entries));
2589
0/2
✗ Branch 17 → 18 not taken.
✗ Branch 17 → 23 not taken.
✗ infer(num_weights_l0, current->num_l0_weights);
2590 } else {
2591
1/2
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 23 taken 16 times.
198 infer(num_weights_l0, num_ref_idx_active[0]);
2592 }
2593
4/4
cbs_h266_read_pred_weight_table:
✓ Branch 22 → 18 taken 896 times.
✓ Branch 22 → 23 taken 182 times.
cbs_h266_write_pred_weight_table:
✓ Branch 28 → 24 taken 31 times.
✓ Branch 28 → 29 taken 16 times.
1125 for (i = 0; i < current->num_weights_l0; i++) {
2594
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 896 times.
cbs_h266_write_pred_weight_table:
✗ Branch 25 → 26 not taken.
✓ Branch 25 → 27 taken 31 times.
927 flags(luma_weight_l0_flag[i], 1, i);
2595 }
2596
2/4
cbs_h266_read_pred_weight_table:
✓ Branch 23 → 24 taken 182 times.
✗ Branch 23 → 30 not taken.
cbs_h266_write_pred_weight_table:
✓ Branch 29 → 30 taken 16 times.
✗ Branch 29 → 36 not taken.
198 if (sps->sps_chroma_format_idc != 0) {
2597
4/4
cbs_h266_read_pred_weight_table:
✓ Branch 29 → 25 taken 896 times.
✓ Branch 29 → 30 taken 182 times.
cbs_h266_write_pred_weight_table:
✓ Branch 35 → 31 taken 31 times.
✓ Branch 35 → 36 taken 16 times.
1125 for (i = 0; i < current->num_weights_l0; i++)
2598
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 26 → 27 not taken.
✓ Branch 26 → 28 taken 896 times.
cbs_h266_write_pred_weight_table:
✗ Branch 32 → 33 not taken.
✓ Branch 32 → 34 taken 31 times.
927 flags(chroma_weight_l0_flag[i], 1, i);
2599 }
2600
4/4
cbs_h266_read_pred_weight_table:
✓ Branch 51 → 31 taken 896 times.
✓ Branch 51 → 52 taken 182 times.
cbs_h266_write_pred_weight_table:
✓ Branch 62 → 37 taken 31 times.
✓ Branch 62 → 63 taken 16 times.
1125 for (i = 0; i < current->num_weights_l0; i++) {
2601
3/4
cbs_h266_read_pred_weight_table:
✓ Branch 31 → 32 taken 508 times.
✓ Branch 31 → 39 taken 388 times.
cbs_h266_write_pred_weight_table:
✓ Branch 37 → 38 taken 31 times.
✗ Branch 37 → 45 not taken.
927 if (current->luma_weight_l0_flag[i]) {
2602
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 33 → 34 not taken.
✓ Branch 33 → 35 taken 508 times.
cbs_h266_write_pred_weight_table:
✗ Branch 39 → 40 not taken.
✓ Branch 39 → 41 taken 31 times.
539 ses(delta_luma_weight_l0[i], -128, 127, 1, i);
2603
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 36 → 37 not taken.
✓ Branch 36 → 38 taken 508 times.
cbs_h266_write_pred_weight_table:
✗ Branch 42 → 43 not taken.
✓ Branch 42 → 44 taken 31 times.
539 ses(luma_offset_l0[i], -128, 127, 1, i);
2604 } else {
2605
0/2
✗ Branch 45 → 46 not taken.
✗ Branch 45 → 48 not taken.
388 infer(delta_luma_weight_l0[i], 0);
2606
0/2
✗ Branch 48 → 49 not taken.
✗ Branch 48 → 51 not taken.
388 infer(luma_offset_l0[i], 0);
2607 }
2608
4/4
cbs_h266_read_pred_weight_table:
✓ Branch 40 → 41 taken 456 times.
✓ Branch 40 → 50 taken 440 times.
cbs_h266_write_pred_weight_table:
✓ Branch 51 → 52 taken 25 times.
✓ Branch 51 → 61 taken 6 times.
927 if (current->chroma_weight_l0_flag[i]) {
2609
4/4
cbs_h266_read_pred_weight_table:
✓ Branch 49 → 42 taken 912 times.
✓ Branch 49 → 50 taken 456 times.
cbs_h266_write_pred_weight_table:
✓ Branch 60 → 53 taken 50 times.
✓ Branch 60 → 61 taken 25 times.
1443 for (j = 0; j < 2; j++) {
2610
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 43 → 44 not taken.
✓ Branch 43 → 45 taken 912 times.
cbs_h266_write_pred_weight_table:
✗ Branch 54 → 55 not taken.
✓ Branch 54 → 56 taken 50 times.
962 ses(delta_chroma_weight_l0[i][j], -128, 127, 2, i, j);
2611
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 46 → 47 not taken.
✓ Branch 46 → 48 taken 912 times.
cbs_h266_write_pred_weight_table:
✗ Branch 57 → 58 not taken.
✓ Branch 57 → 59 taken 50 times.
962 ses(delta_chroma_offset_l0[i][j], -4 * 128, 4 * 127, 2, i, j);
2612 }
2613 }
2614 }
2615
2616
2/4
cbs_h266_read_pred_weight_table:
✓ Branch 52 → 53 taken 182 times.
✗ Branch 52 → 61 not taken.
cbs_h266_write_pred_weight_table:
✓ Branch 63 → 64 taken 16 times.
✗ Branch 63 → 76 not taken.
198 if (pps->pps_weighted_bipred_flag &&
2617
3/4
cbs_h266_read_pred_weight_table:
✓ Branch 53 → 54 taken 180 times.
✓ Branch 53 → 61 taken 2 times.
cbs_h266_write_pred_weight_table:
✓ Branch 64 → 65 taken 16 times.
✗ Branch 64 → 76 not taken.
198 ref_lists->rpl_ref_list[1].num_ref_entries > 0) {
2618
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 54 → 55 not taken.
✓ Branch 54 → 59 taken 180 times.
cbs_h266_write_pred_weight_table:
✗ Branch 65 → 66 not taken.
✓ Branch 65 → 72 taken 16 times.
196 if (pps->pps_wp_info_in_ph_flag) {
2619
0/4
cbs_h266_read_pred_weight_table:
✗ Branch 56 → 57 not taken.
✗ Branch 56 → 58 not taken.
cbs_h266_write_pred_weight_table:
✗ Branch 67 → 68 not taken.
✗ Branch 67 → 69 not taken.
✗ ue(num_l1_weights, 0,
2620 FFMIN(15, ref_lists->rpl_ref_list[1].num_ref_entries));
2621
0/2
✗ Branch 69 → 70 not taken.
✗ Branch 69 → 75 not taken.
✗ infer(num_weights_l1, current->num_l1_weights);
2622 } else {
2623
1/2
✗ Branch 72 → 73 not taken.
✓ Branch 72 → 75 taken 16 times.
196 infer(num_weights_l1, num_ref_idx_active[1]);
2624 }
2625 } else {
2626
0/2
✗ Branch 76 → 77 not taken.
✗ Branch 76 → 79 not taken.
2 infer(num_weights_l1, 0);
2627 }
2628
2629
4/4
cbs_h266_read_pred_weight_table:
✓ Branch 67 → 63 taken 774 times.
✓ Branch 67 → 68 taken 182 times.
cbs_h266_write_pred_weight_table:
✓ Branch 84 → 80 taken 31 times.
✓ Branch 84 → 85 taken 16 times.
1003 for (i = 0; i < current->num_weights_l1; i++)
2630
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 64 → 65 not taken.
✓ Branch 64 → 66 taken 774 times.
cbs_h266_write_pred_weight_table:
✗ Branch 81 → 82 not taken.
✓ Branch 81 → 83 taken 31 times.
805 flags(luma_weight_l1_flag[i], 1, i);
2631
2/4
cbs_h266_read_pred_weight_table:
✓ Branch 68 → 69 taken 182 times.
✗ Branch 68 → 75 not taken.
cbs_h266_write_pred_weight_table:
✓ Branch 85 → 86 taken 16 times.
✗ Branch 85 → 92 not taken.
198 if (sps->sps_chroma_format_idc != 0) {
2632
4/4
cbs_h266_read_pred_weight_table:
✓ Branch 74 → 70 taken 774 times.
✓ Branch 74 → 75 taken 182 times.
cbs_h266_write_pred_weight_table:
✓ Branch 91 → 87 taken 31 times.
✓ Branch 91 → 92 taken 16 times.
1003 for (i = 0; i < current->num_weights_l1; i++)
2633
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 71 → 72 not taken.
✓ Branch 71 → 73 taken 774 times.
cbs_h266_write_pred_weight_table:
✗ Branch 88 → 89 not taken.
✓ Branch 88 → 90 taken 31 times.
805 flags(chroma_weight_l1_flag[i], 1, i);
2634 }
2635
4/4
cbs_h266_read_pred_weight_table:
✓ Branch 96 → 76 taken 774 times.
✓ Branch 96 → 97 taken 182 times.
cbs_h266_write_pred_weight_table:
✓ Branch 118 → 93 taken 31 times.
✓ Branch 118 → 119 taken 16 times.
1003 for (i = 0; i < current->num_weights_l1; i++) {
2636
3/4
cbs_h266_read_pred_weight_table:
✓ Branch 76 → 77 taken 362 times.
✓ Branch 76 → 84 taken 412 times.
cbs_h266_write_pred_weight_table:
✓ Branch 93 → 94 taken 31 times.
✗ Branch 93 → 101 not taken.
805 if (current->luma_weight_l1_flag[i]) {
2637
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 78 → 79 not taken.
✓ Branch 78 → 80 taken 362 times.
cbs_h266_write_pred_weight_table:
✗ Branch 95 → 96 not taken.
✓ Branch 95 → 97 taken 31 times.
393 ses(delta_luma_weight_l1[i], -128, 127, 1, i);
2638
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 81 → 82 not taken.
✓ Branch 81 → 83 taken 362 times.
cbs_h266_write_pred_weight_table:
✗ Branch 98 → 99 not taken.
✓ Branch 98 → 100 taken 31 times.
393 ses(luma_offset_l1[i], -128, 127, 1, i);
2639 } else {
2640
0/2
✗ Branch 101 → 102 not taken.
✗ Branch 101 → 104 not taken.
412 infer(delta_luma_weight_l1[i], 0);
2641
0/2
✗ Branch 104 → 105 not taken.
✗ Branch 104 → 107 not taken.
412 infer(luma_offset_l1[i], 0);
2642 }
2643
4/4
cbs_h266_read_pred_weight_table:
✓ Branch 85 → 86 taken 344 times.
✓ Branch 85 → 95 taken 430 times.
cbs_h266_write_pred_weight_table:
✓ Branch 107 → 108 taken 25 times.
✓ Branch 107 → 117 taken 6 times.
805 if (current->chroma_weight_l1_flag[i]) {
2644
4/4
cbs_h266_read_pred_weight_table:
✓ Branch 94 → 87 taken 688 times.
✓ Branch 94 → 95 taken 344 times.
cbs_h266_write_pred_weight_table:
✓ Branch 116 → 109 taken 50 times.
✓ Branch 116 → 117 taken 25 times.
1107 for (j = 0; j < 2; j++) {
2645
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 88 → 89 not taken.
✓ Branch 88 → 90 taken 688 times.
cbs_h266_write_pred_weight_table:
✗ Branch 110 → 111 not taken.
✓ Branch 110 → 112 taken 50 times.
738 ses(delta_chroma_weight_l1[i][j], -128, 127, 2, i, j);
2646
2/4
cbs_h266_read_pred_weight_table:
✗ Branch 91 → 92 not taken.
✓ Branch 91 → 93 taken 688 times.
cbs_h266_write_pred_weight_table:
✗ Branch 113 → 114 not taken.
✓ Branch 113 → 115 taken 50 times.
738 ses(delta_chroma_offset_l1[i][j], -4 * 128, 4 * 127, 2, i, j);
2647 }
2648 }
2649 }
2650 198 return 0;
2651 }
2652
2653 8837 static int FUNC(picture_header) (CodedBitstreamContext *ctx, RWContext *rw,
2654 H266RawPictureHeader *current) {
2655 8837 CodedBitstreamH266Context *h266 = ctx->priv_data;
2656 const H266RawVPS *vps;
2657 const H266RawSPS *sps;
2658 const H266RawPPS *pps;
2659 int err, i;
2660 unsigned int ctb_log2_size_y, min_cb_log2_size_y,
2661 min_qt_log2_size_intra_y, min_qt_log2_size_inter_y;
2662 uint8_t qp_bd_offset;
2663
2664
2/4
cbs_h266_read_picture_header:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 6707 times.
cbs_h266_write_picture_header:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 2130 times.
8837 flag(ph_gdr_or_irap_pic_flag);
2665
2/4
cbs_h266_read_picture_header:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 6707 times.
cbs_h266_write_picture_header:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 2130 times.
8837 flag(ph_non_ref_pic_flag);
2666
4/4
cbs_h266_read_picture_header:
✓ Branch 8 → 9 taken 810 times.
✓ Branch 8 → 13 taken 5897 times.
cbs_h266_write_picture_header:
✓ Branch 8 → 9 taken 308 times.
✓ Branch 8 → 12 taken 1822 times.
8837 if (current->ph_gdr_or_irap_pic_flag)
2667
2/4
cbs_h266_read_picture_header:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 810 times.
cbs_h266_write_picture_header:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 15 taken 308 times.
1118 flag(ph_gdr_pic_flag);
2668 else
2669
1/2
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 15 taken 1822 times.
7719 infer(ph_gdr_pic_flag, 0);
2670
2/4
cbs_h266_read_picture_header:
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 17 taken 6707 times.
cbs_h266_write_picture_header:
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 18 taken 2130 times.
8837 flag(ph_inter_slice_allowed_flag);
2671
4/4
cbs_h266_read_picture_header:
✓ Branch 17 → 18 taken 5897 times.
✓ Branch 17 → 22 taken 810 times.
cbs_h266_write_picture_header:
✓ Branch 18 → 19 taken 1827 times.
✓ Branch 18 → 22 taken 303 times.
8837 if (current->ph_inter_slice_allowed_flag)
2672
2/4
cbs_h266_read_picture_header:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 5897 times.
cbs_h266_write_picture_header:
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 25 taken 1827 times.
7724 flag(ph_intra_slice_allowed_flag);
2673 else
2674
1/2
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 25 taken 303 times.
1113 infer(ph_intra_slice_allowed_flag, 1);
2675
2/4
cbs_h266_read_picture_header:
✗ Branch 24 → 25 not taken.
✓ Branch 24 → 26 taken 6707 times.
cbs_h266_write_picture_header:
✗ Branch 26 → 27 not taken.
✓ Branch 26 → 28 taken 2130 times.
8837 ue(ph_pic_parameter_set_id, 0, VVC_MAX_PPS_COUNT - 1);
2676 8837 pps = h266->pps[current->ph_pic_parameter_set_id];
2677
2/4
cbs_h266_read_picture_header:
✗ Branch 26 → 27 not taken.
✓ Branch 26 → 29 taken 6707 times.
cbs_h266_write_picture_header:
✗ Branch 28 → 29 not taken.
✓ Branch 28 → 31 taken 2130 times.
8837 if (!pps) {
2678 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR, "PPS id %d not available.\n",
2679 ✗ current->ph_pic_parameter_set_id);
2680 ✗ return AVERROR_INVALIDDATA;
2681 }
2682 8837 sps = h266->sps[pps->pps_seq_parameter_set_id];
2683
2/4
cbs_h266_read_picture_header:
✗ Branch 29 → 30 not taken.
✓ Branch 29 → 32 taken 6707 times.
cbs_h266_write_picture_header:
✗ Branch 31 → 32 not taken.
✓ Branch 31 → 34 taken 2130 times.
8837 if (!sps) {
2684 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR, "SPS id %d not available.\n",
2685 ✗ pps->pps_seq_parameter_set_id);
2686 ✗ return AVERROR_INVALIDDATA;
2687 }
2688 8837 vps = h266->vps[sps->sps_video_parameter_set_id];
2689
2/4
cbs_h266_read_picture_header:
✗ Branch 32 → 33 not taken.
✓ Branch 32 → 35 taken 6707 times.
cbs_h266_write_picture_header:
✗ Branch 34 → 35 not taken.
✓ Branch 34 → 37 taken 2130 times.
8837 if (!vps) {
2690 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR, "VPS id %d not available.\n",
2691 ✗ sps->sps_video_parameter_set_id);
2692 ✗ return AVERROR_INVALIDDATA;
2693 }
2694
2695
2/4
cbs_h266_read_picture_header:
✗ Branch 36 → 37 not taken.
✓ Branch 36 → 38 taken 6707 times.
cbs_h266_write_picture_header:
✗ Branch 38 → 39 not taken.
✓ Branch 38 → 40 taken 2130 times.
8837 ub(sps->sps_log2_max_pic_order_cnt_lsb_minus4 + 4, ph_pic_order_cnt_lsb);
2696
4/4
cbs_h266_read_picture_header:
✓ Branch 38 → 39 taken 22 times.
✓ Branch 38 → 43 taken 6685 times.
cbs_h266_write_picture_header:
✓ Branch 40 → 41 taken 5 times.
✓ Branch 40 → 45 taken 2125 times.
8837 if (current->ph_gdr_pic_flag) {
2697 #ifdef READ
2698 // H.266 7.4.3.8: ph_recovery_poc_cnt shall be in [0, MaxPicOrderCntLsb - 1].
2699 // The range check is deferred to decode_recovery_poc().
2700
1/2
✗ Branch 40 → 41 not taken.
✓ Branch 40 → 42 taken 22 times.
22 ue(ph_recovery_poc_cnt, 0, UINT32_MAX - 1);
2701 #else
2702
1/2
✗ Branch 42 → 43 not taken.
✓ Branch 42 → 44 taken 5 times.
5 ue(ph_recovery_poc_cnt, 0,
2703 (1 << (sps->sps_log2_max_pic_order_cnt_lsb_minus4 + 4)) - 1);
2704 #endif
2705 }
2706
2707
2/4
cbs_h266_read_picture_header:
✗ Branch 50 → 44 not taken.
✓ Branch 50 → 51 taken 6707 times.
cbs_h266_write_picture_header:
✗ Branch 52 → 46 not taken.
✓ Branch 52 → 53 taken 2130 times.
8837 for (i = 0; i < sps->sps_num_extra_ph_bytes * 8; i++) {
2708
0/4
cbs_h266_read_picture_header:
✗ Branch 44 → 45 not taken.
✗ Branch 44 → 49 not taken.
cbs_h266_write_picture_header:
✗ Branch 46 → 47 not taken.
✗ Branch 46 → 51 not taken.
✗ if (sps->sps_extra_ph_bit_present_flag[i])
2709
0/4
cbs_h266_read_picture_header:
✗ Branch 46 → 47 not taken.
✗ Branch 46 → 48 not taken.
cbs_h266_write_picture_header:
✗ Branch 48 → 49 not taken.
✗ Branch 48 → 50 not taken.
✗ flags(ph_extra_bit[i], 1, i);
2710 }
2711
4/4
cbs_h266_read_picture_header:
✓ Branch 51 → 52 taken 82 times.
✓ Branch 51 → 60 taken 6625 times.
cbs_h266_write_picture_header:
✓ Branch 53 → 54 taken 20 times.
✓ Branch 53 → 61 taken 2110 times.
8837 if (sps->sps_poc_msb_cycle_flag) {
2712
2/4
cbs_h266_read_picture_header:
✗ Branch 53 → 54 not taken.
✓ Branch 53 → 55 taken 82 times.
cbs_h266_write_picture_header:
✗ Branch 55 → 56 not taken.
✓ Branch 55 → 57 taken 20 times.
102 flag(ph_poc_msb_cycle_present_flag);
2713
2/4
cbs_h266_read_picture_header:
✗ Branch 55 → 56 not taken.
✓ Branch 55 → 60 taken 82 times.
cbs_h266_write_picture_header:
✗ Branch 57 → 58 not taken.
✓ Branch 57 → 61 taken 20 times.
102 if (current->ph_poc_msb_cycle_present_flag)
2714
0/4
cbs_h266_read_picture_header:
✗ Branch 57 → 58 not taken.
✗ Branch 57 → 59 not taken.
cbs_h266_write_picture_header:
✗ Branch 59 → 60 not taken.
✗ Branch 59 → 61 not taken.
✗ ub(sps->sps_poc_msb_cycle_len_minus1 + 1, ph_poc_msb_cycle_val);
2715 }
2716
7/8
cbs_h266_read_picture_header:
✓ Branch 60 → 61 taken 3477 times.
✓ Branch 60 → 108 taken 3230 times.
✓ Branch 61 → 62 taken 71 times.
✓ Branch 61 → 108 taken 3406 times.
cbs_h266_write_picture_header:
✓ Branch 61 → 62 taken 754 times.
✓ Branch 61 → 110 taken 1376 times.
✗ Branch 62 → 63 not taken.
✓ Branch 62 → 110 taken 754 times.
8837 if (sps->sps_alf_enabled_flag && pps->pps_alf_info_in_ph_flag) {
2717
1/4
cbs_h266_read_picture_header:
✗ Branch 63 → 64 not taken.
✓ Branch 63 → 65 taken 71 times.
cbs_h266_write_picture_header:
✗ Branch 64 → 65 not taken.
✗ Branch 64 → 66 not taken.
71 flag(ph_alf_enabled_flag);
2718
2/4
cbs_h266_read_picture_header:
✓ Branch 65 → 66 taken 49 times.
✓ Branch 65 → 107 taken 22 times.
cbs_h266_write_picture_header:
✗ Branch 66 → 67 not taken.
✗ Branch 66 → 109 not taken.
71 if (current->ph_alf_enabled_flag) {
2719
2720
1/4
cbs_h266_read_picture_header:
✗ Branch 67 → 68 not taken.
✓ Branch 67 → 69 taken 49 times.
cbs_h266_write_picture_header:
✗ Branch 68 → 69 not taken.
✗ Branch 68 → 70 not taken.
49 ub(3, ph_num_alf_aps_ids_luma);
2721
2/4
cbs_h266_read_picture_header:
✓ Branch 74 → 70 taken 51 times.
✓ Branch 74 → 75 taken 49 times.
cbs_h266_write_picture_header:
✗ Branch 75 → 71 not taken.
✗ Branch 75 → 76 not taken.
100 for (i = 0; i < current->ph_num_alf_aps_ids_luma; i++)
2722
1/4
cbs_h266_read_picture_header:
✗ Branch 71 → 72 not taken.
✓ Branch 71 → 73 taken 51 times.
cbs_h266_write_picture_header:
✗ Branch 72 → 73 not taken.
✗ Branch 72 → 74 not taken.
51 ubs(3, ph_alf_aps_id_luma[i], 1, i);
2723
2724
1/4
cbs_h266_read_picture_header:
✓ Branch 75 → 76 taken 49 times.
✗ Branch 75 → 83 not taken.
cbs_h266_write_picture_header:
✗ Branch 76 → 77 not taken.
✗ Branch 76 → 83 not taken.
49 if (sps->sps_chroma_format_idc != 0) {
2725
1/4
cbs_h266_read_picture_header:
✗ Branch 77 → 78 not taken.
✓ Branch 77 → 79 taken 49 times.
cbs_h266_write_picture_header:
✗ Branch 78 → 79 not taken.
✗ Branch 78 → 80 not taken.
49 flag(ph_alf_cb_enabled_flag);
2726
1/4
cbs_h266_read_picture_header:
✗ Branch 80 → 81 not taken.
✓ Branch 80 → 82 taken 49 times.
cbs_h266_write_picture_header:
✗ Branch 81 → 82 not taken.
✗ Branch 81 → 89 not taken.
49 flag(ph_alf_cr_enabled_flag);
2727 } else {
2728
0/2
✗ Branch 83 → 84 not taken.
✗ Branch 83 → 86 not taken.
✗ infer(ph_alf_cb_enabled_flag, 0);
2729
0/2
✗ Branch 86 → 87 not taken.
✗ Branch 86 → 89 not taken.
✗ infer(ph_alf_cr_enabled_flag, 0);
2730 }
2731
2732
2/4
cbs_h266_read_picture_header:
✓ Branch 84 → 85 taken 26 times.
✓ Branch 84 → 86 taken 23 times.
cbs_h266_write_picture_header:
✗ Branch 89 → 90 not taken.
✗ Branch 89 → 91 not taken.
49 if (current->ph_alf_cb_enabled_flag
2733
2/4
cbs_h266_read_picture_header:
✓ Branch 85 → 86 taken 2 times.
✓ Branch 85 → 90 taken 24 times.
cbs_h266_write_picture_header:
✗ Branch 90 → 91 not taken.
✗ Branch 90 → 94 not taken.
26 || current->ph_alf_cr_enabled_flag) {
2734
1/4
cbs_h266_read_picture_header:
✗ Branch 87 → 88 not taken.
✓ Branch 87 → 89 taken 25 times.
cbs_h266_write_picture_header:
✗ Branch 92 → 93 not taken.
✗ Branch 92 → 94 not taken.
25 ub(3, ph_alf_aps_id_chroma);
2735 }
2736
2737
1/4
cbs_h266_read_picture_header:
✓ Branch 90 → 91 taken 49 times.
✗ Branch 90 → 107 not taken.
cbs_h266_write_picture_header:
✗ Branch 94 → 95 not taken.
✗ Branch 94 → 109 not taken.
49 if (sps->sps_ccalf_enabled_flag) {
2738
1/4
cbs_h266_read_picture_header:
✗ Branch 92 → 93 not taken.
✓ Branch 92 → 94 taken 49 times.
cbs_h266_write_picture_header:
✗ Branch 96 → 97 not taken.
✗ Branch 96 → 98 not taken.
49 flag(ph_alf_cc_cb_enabled_flag);
2739
2/4
cbs_h266_read_picture_header:
✓ Branch 94 → 95 taken 6 times.
✓ Branch 94 → 99 taken 43 times.
cbs_h266_write_picture_header:
✗ Branch 98 → 99 not taken.
✗ Branch 98 → 102 not taken.
49 if (current->ph_alf_cc_cb_enabled_flag)
2740
1/4
cbs_h266_read_picture_header:
✗ Branch 96 → 97 not taken.
✓ Branch 96 → 98 taken 6 times.
cbs_h266_write_picture_header:
✗ Branch 100 → 101 not taken.
✗ Branch 100 → 102 not taken.
6 ub(3, ph_alf_cc_cb_aps_id);
2741
1/4
cbs_h266_read_picture_header:
✗ Branch 100 → 101 not taken.
✓ Branch 100 → 102 taken 49 times.
cbs_h266_write_picture_header:
✗ Branch 103 → 104 not taken.
✗ Branch 103 → 105 not taken.
49 flag(ph_alf_cc_cr_enabled_flag);
2742
2/4
cbs_h266_read_picture_header:
✓ Branch 102 → 103 taken 4 times.
✓ Branch 102 → 107 taken 45 times.
cbs_h266_write_picture_header:
✗ Branch 105 → 106 not taken.
✗ Branch 105 → 109 not taken.
49 if (current->ph_alf_cc_cr_enabled_flag)
2743
1/4
cbs_h266_read_picture_header:
✗ Branch 104 → 105 not taken.
✓ Branch 104 → 106 taken 4 times.
cbs_h266_write_picture_header:
✗ Branch 107 → 108 not taken.
✗ Branch 107 → 109 not taken.
4 ub(3, ph_alf_cc_cr_aps_id);
2744 }
2745 }
2746 } else {
2747
1/2
✗ Branch 110 → 111 not taken.
✓ Branch 110 → 113 taken 2130 times.
8766 infer(ph_alf_enabled_flag, 0);
2748 }
2749
4/4
cbs_h266_read_picture_header:
✓ Branch 109 → 110 taken 3754 times.
✓ Branch 109 → 123 taken 2953 times.
cbs_h266_write_picture_header:
✓ Branch 113 → 114 taken 840 times.
✓ Branch 113 → 128 taken 1290 times.
8837 if (sps->sps_lmcs_enabled_flag) {
2750
2/4
cbs_h266_read_picture_header:
✗ Branch 111 → 112 not taken.
✓ Branch 111 → 113 taken 3754 times.
cbs_h266_write_picture_header:
✗ Branch 115 → 116 not taken.
✓ Branch 115 → 117 taken 840 times.
4594 flag(ph_lmcs_enabled_flag);
2751
4/4
cbs_h266_read_picture_header:
✓ Branch 113 → 114 taken 1447 times.
✓ Branch 113 → 124 taken 2307 times.
cbs_h266_write_picture_header:
✓ Branch 117 → 118 taken 334 times.
✓ Branch 117 → 134 taken 506 times.
4594 if (current->ph_lmcs_enabled_flag) {
2752
2/4
cbs_h266_read_picture_header:
✗ Branch 115 → 116 not taken.
✓ Branch 115 → 117 taken 1447 times.
cbs_h266_write_picture_header:
✗ Branch 119 → 120 not taken.
✓ Branch 119 → 121 taken 334 times.
1781 ub(2, ph_lmcs_aps_id);
2753
2/4
cbs_h266_read_picture_header:
✓ Branch 117 → 118 taken 1447 times.
✗ Branch 117 → 122 not taken.
cbs_h266_write_picture_header:
✓ Branch 121 → 122 taken 334 times.
✗ Branch 121 → 125 not taken.
1781 if (sps->sps_chroma_format_idc != 0)
2754
2/4
cbs_h266_read_picture_header:
✗ Branch 119 → 120 not taken.
✓ Branch 119 → 121 taken 1447 times.
cbs_h266_write_picture_header:
✗ Branch 123 → 124 not taken.
✓ Branch 123 → 134 taken 334 times.
1781 flag(ph_chroma_residual_scale_flag);
2755 else
2756
0/2
✗ Branch 125 → 126 not taken.
✗ Branch 125 → 134 not taken.
✗ infer(ph_chroma_residual_scale_flag, 0);
2757 }
2758 } else {
2759
1/2
✗ Branch 128 → 129 not taken.
✓ Branch 128 → 131 taken 1290 times.
4243 infer(ph_lmcs_enabled_flag, 0);
2760
1/2
✗ Branch 131 → 132 not taken.
✓ Branch 131 → 134 taken 1290 times.
4243 infer(ph_chroma_residual_scale_flag, 0);
2761 }
2762
2763
4/4
cbs_h266_read_picture_header:
✓ Branch 124 → 125 taken 493 times.
✓ Branch 124 → 133 taken 6214 times.
cbs_h266_write_picture_header:
✓ Branch 134 → 135 taken 112 times.
✓ Branch 134 → 142 taken 2018 times.
8837 if (sps->sps_explicit_scaling_list_enabled_flag) {
2764
2/4
cbs_h266_read_picture_header:
✗ Branch 126 → 127 not taken.
✓ Branch 126 → 128 taken 493 times.
cbs_h266_write_picture_header:
✗ Branch 136 → 137 not taken.
✓ Branch 136 → 138 taken 112 times.
605 flag(ph_explicit_scaling_list_enabled_flag);
2765
2/4
cbs_h266_read_picture_header:
✓ Branch 128 → 129 taken 493 times.
✗ Branch 128 → 134 not taken.
cbs_h266_write_picture_header:
✓ Branch 138 → 139 taken 112 times.
✗ Branch 138 → 145 not taken.
605 if (current->ph_explicit_scaling_list_enabled_flag) {
2766 //todo: check the ph_scaling_list_aps_id range, when aps ready
2767
2/4
cbs_h266_read_picture_header:
✗ Branch 130 → 131 not taken.
✓ Branch 130 → 132 taken 493 times.
cbs_h266_write_picture_header:
✗ Branch 140 → 141 not taken.
✓ Branch 140 → 145 taken 112 times.
605 ub(3, ph_scaling_list_aps_id);
2768 }
2769 } else {
2770
1/2
✗ Branch 142 → 143 not taken.
✓ Branch 142 → 145 taken 2018 times.
8232 infer(ph_explicit_scaling_list_enabled_flag, 0);
2771 }
2772
3/4
cbs_h266_read_picture_header:
✓ Branch 134 → 135 taken 41 times.
✓ Branch 134 → 165 taken 6666 times.
cbs_h266_write_picture_header:
✗ Branch 145 → 146 not taken.
✓ Branch 145 → 181 taken 2130 times.
8837 if (sps->sps_virtual_boundaries_enabled_flag &&
2773
1/4
cbs_h266_read_picture_header:
✗ Branch 135 → 136 not taken.
✓ Branch 135 → 165 taken 41 times.
cbs_h266_write_picture_header:
✗ Branch 146 → 147 not taken.
✗ Branch 146 → 181 not taken.
41 !sps->sps_virtual_boundaries_present_flag) {
2774
0/4
cbs_h266_read_picture_header:
✗ Branch 137 → 138 not taken.
✗ Branch 137 → 139 not taken.
cbs_h266_write_picture_header:
✗ Branch 148 → 149 not taken.
✗ Branch 148 → 150 not taken.
✗ flag(ph_virtual_boundaries_present_flag);
2775
0/4
cbs_h266_read_picture_header:
✗ Branch 139 → 140 not taken.
✗ Branch 139 → 164 not taken.
cbs_h266_write_picture_header:
✗ Branch 150 → 151 not taken.
✗ Branch 150 → 175 not taken.
✗ if (current->ph_virtual_boundaries_present_flag) {
2776
0/8
cbs_h266_read_picture_header:
✗ Branch 140 → 141 not taken.
✗ Branch 140 → 142 not taken.
✗ Branch 144 → 145 not taken.
✗ Branch 144 → 146 not taken.
cbs_h266_write_picture_header:
✗ Branch 151 → 152 not taken.
✗ Branch 151 → 153 not taken.
✗ Branch 155 → 156 not taken.
✗ Branch 155 → 157 not taken.
✗ ue(ph_num_ver_virtual_boundaries,
2777 0, pps->pps_pic_width_in_luma_samples <= 8 ? 0 : VVC_MAX_VBS);
2778
0/4
cbs_h266_read_picture_header:
✗ Branch 151 → 147 not taken.
✗ Branch 151 → 152 not taken.
cbs_h266_write_picture_header:
✗ Branch 162 → 158 not taken.
✗ Branch 162 → 163 not taken.
✗ for (i = 0; i < current->ph_num_ver_virtual_boundaries; i++) {
2779
0/4
cbs_h266_read_picture_header:
✗ Branch 148 → 149 not taken.
✗ Branch 148 → 150 not taken.
cbs_h266_write_picture_header:
✗ Branch 159 → 160 not taken.
✗ Branch 159 → 161 not taken.
✗ ues(ph_virtual_boundary_pos_x_minus1[i],
2780 0, (pps->pps_pic_width_in_luma_samples + 7) / 8 - 2, 1, i);
2781 }
2782
0/8
cbs_h266_read_picture_header:
✗ Branch 152 → 153 not taken.
✗ Branch 152 → 154 not taken.
✗ Branch 156 → 157 not taken.
✗ Branch 156 → 158 not taken.
cbs_h266_write_picture_header:
✗ Branch 163 → 164 not taken.
✗ Branch 163 → 165 not taken.
✗ Branch 167 → 168 not taken.
✗ Branch 167 → 169 not taken.
✗ ue(ph_num_hor_virtual_boundaries,
2783 0, pps->pps_pic_height_in_luma_samples <= 8 ? 0 : VVC_MAX_VBS);
2784
0/4
cbs_h266_read_picture_header:
✗ Branch 163 → 159 not taken.
✗ Branch 163 → 165 not taken.
cbs_h266_write_picture_header:
✗ Branch 174 → 170 not taken.
✗ Branch 174 → 181 not taken.
✗ for (i = 0; i < current->ph_num_hor_virtual_boundaries; i++) {
2785
0/4
cbs_h266_read_picture_header:
✗ Branch 160 → 161 not taken.
✗ Branch 160 → 162 not taken.
cbs_h266_write_picture_header:
✗ Branch 171 → 172 not taken.
✗ Branch 171 → 173 not taken.
✗ ues(ph_virtual_boundary_pos_y_minus1[i],
2786 0, (pps->pps_pic_height_in_luma_samples + 7) / 8 - 2, 1, i);
2787 }
2788 } else {
2789
0/2
✗ Branch 175 → 176 not taken.
✗ Branch 175 → 178 not taken.
✗ infer(ph_num_ver_virtual_boundaries, 0);
2790
0/2
✗ Branch 178 → 179 not taken.
✗ Branch 178 → 181 not taken.
✗ infer(ph_num_hor_virtual_boundaries, 0);
2791 }
2792 }
2793
2/8
cbs_h266_read_picture_header:
✗ Branch 165 → 166 not taken.
✓ Branch 165 → 171 taken 6707 times.
✗ Branch 166 → 167 not taken.
✗ Branch 166 → 171 not taken.
cbs_h266_write_picture_header:
✗ Branch 181 → 182 not taken.
✓ Branch 181 → 187 taken 2130 times.
✗ Branch 182 → 183 not taken.
✗ Branch 182 → 187 not taken.
8837 if (pps->pps_output_flag_present_flag && !current->ph_non_ref_pic_flag)
2794
0/4
cbs_h266_read_picture_header:
✗ Branch 168 → 169 not taken.
✗ Branch 168 → 170 not taken.
cbs_h266_write_picture_header:
✗ Branch 184 → 185 not taken.
✗ Branch 184 → 186 not taken.
✗ flag(ph_pic_output_flag);
2795 else
2796
1/2
✗ Branch 187 → 188 not taken.
✓ Branch 187 → 190 taken 2130 times.
8837 infer(ph_pic_output_flag, 1);
2797
3/4
cbs_h266_read_picture_header:
✓ Branch 172 → 173 taken 67 times.
✓ Branch 172 → 176 taken 6640 times.
cbs_h266_write_picture_header:
✗ Branch 190 → 191 not taken.
✓ Branch 190 → 194 taken 2130 times.
8837 if (pps->pps_rpl_info_in_ph_flag) {
2798
1/4
cbs_h266_read_picture_header:
✗ Branch 174 → 175 not taken.
✓ Branch 174 → 176 taken 67 times.
cbs_h266_write_picture_header:
✗ Branch 192 → 193 not taken.
✗ Branch 192 → 194 not taken.
67 CHECK(FUNC(ref_pic_lists)
2799 (ctx, rw, sps, pps, &current->ph_ref_pic_lists));
2800 }
2801
3/4
cbs_h266_read_picture_header:
✓ Branch 176 → 177 taken 6432 times.
✓ Branch 176 → 181 taken 275 times.
cbs_h266_write_picture_header:
✓ Branch 194 → 195 taken 2130 times.
✗ Branch 194 → 198 not taken.
8837 if (sps->sps_partition_constraints_override_enabled_flag)
2802
2/4
cbs_h266_read_picture_header:
✗ Branch 178 → 179 not taken.
✓ Branch 178 → 180 taken 6432 times.
cbs_h266_write_picture_header:
✗ Branch 196 → 197 not taken.
✓ Branch 196 → 201 taken 2130 times.
8562 flag(ph_partition_constraints_override_flag);
2803 else
2804
0/2
✗ Branch 198 → 199 not taken.
✗ Branch 198 → 201 not taken.
275 infer(ph_partition_constraints_override_flag, 0);
2805
2806 8837 ctb_log2_size_y = sps->sps_log2_ctu_size_minus5 + 5;
2807 8837 min_cb_log2_size_y = sps->sps_log2_min_luma_coding_block_size_minus2 + 2;
2808
4/4
cbs_h266_read_picture_header:
✓ Branch 182 → 183 taken 848 times.
✓ Branch 182 → 231 taken 5859 times.
cbs_h266_write_picture_header:
✓ Branch 201 → 202 taken 303 times.
✓ Branch 201 → 287 taken 1827 times.
8837 if (current->ph_intra_slice_allowed_flag) {
2809
3/4
cbs_h266_read_picture_header:
✓ Branch 183 → 184 taken 39 times.
✓ Branch 183 → 218 taken 809 times.
cbs_h266_write_picture_header:
✗ Branch 202 → 203 not taken.
✓ Branch 202 → 247 taken 303 times.
1151 if (current->ph_partition_constraints_override_flag) {
2810
1/4
cbs_h266_read_picture_header:
✗ Branch 185 → 186 not taken.
✓ Branch 185 → 187 taken 39 times.
cbs_h266_write_picture_header:
✗ Branch 204 → 205 not taken.
✗ Branch 204 → 206 not taken.
39 ue(ph_log2_diff_min_qt_min_cb_intra_slice_luma,
2811 0, FFMIN(6, ctb_log2_size_y) - min_cb_log2_size_y);
2812
1/4
cbs_h266_read_picture_header:
✗ Branch 188 → 189 not taken.
✓ Branch 188 → 190 taken 39 times.
cbs_h266_write_picture_header:
✗ Branch 207 → 208 not taken.
✗ Branch 207 → 209 not taken.
39 ue(ph_max_mtt_hierarchy_depth_intra_slice_luma,
2813 0, 2 * (ctb_log2_size_y - min_cb_log2_size_y));
2814
1/4
cbs_h266_read_picture_header:
✓ Branch 190 → 191 taken 39 times.
✗ Branch 190 → 201 not taken.
cbs_h266_write_picture_header:
✗ Branch 209 → 210 not taken.
✗ Branch 209 → 220 not taken.
39 if (current->ph_max_mtt_hierarchy_depth_intra_slice_luma != 0) {
2815 39 min_qt_log2_size_intra_y =
2816 39 current->ph_log2_diff_min_qt_min_cb_intra_slice_luma +
2817 min_cb_log2_size_y;
2818
2/8
cbs_h266_read_picture_header:
✓ Branch 191 → 192 taken 39 times.
✗ Branch 191 → 193 not taken.
✗ Branch 195 → 196 not taken.
✓ Branch 195 → 197 taken 39 times.
cbs_h266_write_picture_header:
✗ Branch 210 → 211 not taken.
✗ Branch 210 → 212 not taken.
✗ Branch 214 → 215 not taken.
✗ Branch 214 → 216 not taken.
39 ue(ph_log2_diff_max_bt_min_qt_intra_slice_luma,
2819 0, (sps->sps_qtbtt_dual_tree_intra_flag ?
2820 FFMIN(6, ctb_log2_size_y) :
2821 ctb_log2_size_y) - min_qt_log2_size_intra_y);
2822
1/4
cbs_h266_read_picture_header:
✗ Branch 198 → 199 not taken.
✓ Branch 198 → 200 taken 39 times.
cbs_h266_write_picture_header:
✗ Branch 217 → 218 not taken.
✗ Branch 217 → 219 not taken.
39 ue(ph_log2_diff_max_tt_min_qt_intra_slice_luma,
2823 0, FFMIN(6, ctb_log2_size_y) - min_qt_log2_size_intra_y);
2824 } else {
2825
0/2
✗ Branch 220 → 221 not taken.
✗ Branch 220 → 223 not taken.
✗ infer(ph_log2_diff_max_bt_min_qt_intra_slice_luma,
2826 sps->sps_log2_diff_max_bt_min_qt_intra_slice_luma);
2827
0/2
✗ Branch 223 → 224 not taken.
✗ Branch 223 → 226 not taken.
✗ infer(ph_log2_diff_max_tt_min_qt_intra_slice_luma,
2828 sps->sps_log2_diff_max_tt_min_qt_intra_slice_luma);
2829 }
2830
1/4
cbs_h266_read_picture_header:
✓ Branch 202 → 203 taken 39 times.
✗ Branch 202 → 219 not taken.
cbs_h266_write_picture_header:
✗ Branch 226 → 227 not taken.
✗ Branch 226 → 271 not taken.
39 if (sps->sps_qtbtt_dual_tree_intra_flag) {
2831
1/4
cbs_h266_read_picture_header:
✗ Branch 204 → 205 not taken.
✓ Branch 204 → 206 taken 39 times.
cbs_h266_write_picture_header:
✗ Branch 228 → 229 not taken.
✗ Branch 228 → 230 not taken.
39 ue(ph_log2_diff_min_qt_min_cb_intra_slice_chroma,
2832 0, FFMIN(6, ctb_log2_size_y) - min_cb_log2_size_y);
2833
1/4
cbs_h266_read_picture_header:
✗ Branch 207 → 208 not taken.
✓ Branch 207 → 209 taken 39 times.
cbs_h266_write_picture_header:
✗ Branch 231 → 232 not taken.
✗ Branch 231 → 233 not taken.
39 ue(ph_max_mtt_hierarchy_depth_intra_slice_chroma,
2834 0, 2 * (ctb_log2_size_y - min_cb_log2_size_y));
2835
1/4
cbs_h266_read_picture_header:
✓ Branch 209 → 210 taken 39 times.
✗ Branch 209 → 217 not taken.
cbs_h266_write_picture_header:
✗ Branch 233 → 234 not taken.
✗ Branch 233 → 241 not taken.
39 if (current->ph_max_mtt_hierarchy_depth_intra_slice_chroma != 0) {
2836 39 unsigned int min_qt_log2_size_intra_c =
2837 39 current->ph_log2_diff_min_qt_min_cb_intra_slice_chroma +
2838 min_cb_log2_size_y;
2839
1/4
cbs_h266_read_picture_header:
✗ Branch 211 → 212 not taken.
✓ Branch 211 → 213 taken 39 times.
cbs_h266_write_picture_header:
✗ Branch 235 → 236 not taken.
✗ Branch 235 → 237 not taken.
39 ue(ph_log2_diff_max_bt_min_qt_intra_slice_chroma,
2840 0, FFMIN(6, ctb_log2_size_y) - min_qt_log2_size_intra_c);
2841
1/4
cbs_h266_read_picture_header:
✗ Branch 214 → 215 not taken.
✓ Branch 214 → 216 taken 39 times.
cbs_h266_write_picture_header:
✗ Branch 238 → 239 not taken.
✗ Branch 238 → 240 not taken.
39 ue(ph_log2_diff_max_tt_min_qt_intra_slice_chroma,
2842 0, FFMIN(6, ctb_log2_size_y) - min_qt_log2_size_intra_c);
2843 } else {
2844
0/2
✗ Branch 241 → 242 not taken.
✗ Branch 241 → 244 not taken.
✗ infer(ph_log2_diff_max_bt_min_qt_intra_slice_chroma,
2845 sps->sps_log2_diff_max_bt_min_qt_intra_slice_chroma);
2846
0/2
✗ Branch 244 → 245 not taken.
✗ Branch 244 → 271 not taken.
✗ infer(ph_log2_diff_max_tt_min_qt_intra_slice_chroma,
2847 sps->sps_log2_diff_max_tt_min_qt_intra_slice_chroma);
2848 }
2849 }
2850 } else {
2851
1/2
✗ Branch 247 → 248 not taken.
✓ Branch 247 → 250 taken 303 times.
1112 infer(ph_log2_diff_min_qt_min_cb_intra_slice_luma,
2852 sps->sps_log2_diff_min_qt_min_cb_intra_slice_luma);
2853
1/2
✗ Branch 250 → 251 not taken.
✓ Branch 250 → 253 taken 303 times.
1112 infer(ph_max_mtt_hierarchy_depth_intra_slice_luma,
2854 sps->sps_max_mtt_hierarchy_depth_intra_slice_luma);
2855
1/2
✗ Branch 253 → 254 not taken.
✓ Branch 253 → 256 taken 303 times.
1112 infer(ph_log2_diff_max_bt_min_qt_intra_slice_luma,
2856 sps->sps_log2_diff_max_bt_min_qt_intra_slice_luma);
2857
1/2
✗ Branch 256 → 257 not taken.
✓ Branch 256 → 259 taken 303 times.
1112 infer(ph_log2_diff_max_tt_min_qt_intra_slice_luma,
2858 sps->sps_log2_diff_max_tt_min_qt_intra_slice_luma);
2859
1/2
✗ Branch 259 → 260 not taken.
✓ Branch 259 → 262 taken 303 times.
1112 infer(ph_log2_diff_min_qt_min_cb_intra_slice_chroma,
2860 sps->sps_log2_diff_min_qt_min_cb_intra_slice_chroma);
2861
1/2
✗ Branch 262 → 263 not taken.
✓ Branch 262 → 265 taken 303 times.
1112 infer(ph_max_mtt_hierarchy_depth_intra_slice_chroma,
2862 sps->sps_max_mtt_hierarchy_depth_intra_slice_chroma);
2863
1/2
✗ Branch 265 → 266 not taken.
✓ Branch 265 → 268 taken 303 times.
1112 infer(ph_log2_diff_max_bt_min_qt_intra_slice_chroma,
2864 sps->sps_log2_diff_max_bt_min_qt_intra_slice_chroma);
2865
1/2
✗ Branch 268 → 269 not taken.
✓ Branch 268 → 271 taken 303 times.
1112 infer(ph_log2_diff_max_tt_min_qt_intra_slice_chroma,
2866 sps->sps_log2_diff_max_tt_min_qt_intra_slice_chroma);
2867 }
2868
2869 1151 min_qt_log2_size_intra_y =
2870 1151 current->ph_log2_diff_min_qt_min_cb_intra_slice_luma +
2871 min_cb_log2_size_y;
2872
4/4
cbs_h266_read_picture_header:
✓ Branch 219 → 220 taken 69 times.
✓ Branch 219 → 224 taken 779 times.
cbs_h266_write_picture_header:
✓ Branch 271 → 272 taken 2 times.
✓ Branch 271 → 276 taken 301 times.
1151 if (pps->pps_cu_qp_delta_enabled_flag)
2873
2/4
cbs_h266_read_picture_header:
✗ Branch 221 → 222 not taken.
✓ Branch 221 → 223 taken 69 times.
cbs_h266_write_picture_header:
✗ Branch 273 → 274 not taken.
✓ Branch 273 → 275 taken 2 times.
71 ue(ph_cu_qp_delta_subdiv_intra_slice, 0,
2874 2 * (ctb_log2_size_y - min_qt_log2_size_intra_y +
2875 current->ph_max_mtt_hierarchy_depth_intra_slice_luma));
2876 else
2877
1/2
✗ Branch 276 → 277 not taken.
✓ Branch 276 → 279 taken 301 times.
1080 infer(ph_cu_qp_delta_subdiv_intra_slice, 0);
2878
2879
3/4
cbs_h266_read_picture_header:
✓ Branch 225 → 226 taken 41 times.
✓ Branch 225 → 230 taken 807 times.
cbs_h266_write_picture_header:
✗ Branch 279 → 280 not taken.
✓ Branch 279 → 284 taken 303 times.
1151 if (pps->pps_cu_chroma_qp_offset_list_enabled_flag)
2880
1/4
cbs_h266_read_picture_header:
✗ Branch 227 → 228 not taken.
✓ Branch 227 → 229 taken 41 times.
cbs_h266_write_picture_header:
✗ Branch 281 → 282 not taken.
✗ Branch 281 → 283 not taken.
41 ue(ph_cu_chroma_qp_offset_subdiv_intra_slice, 0,
2881 2 * (ctb_log2_size_y - min_qt_log2_size_intra_y +
2882 current->ph_max_mtt_hierarchy_depth_intra_slice_luma));
2883 else
2884
1/2
✗ Branch 284 → 285 not taken.
✓ Branch 284 → 287 taken 303 times.
1110 infer(ph_cu_chroma_qp_offset_subdiv_intra_slice, 0);
2885 }
2886
4/4
cbs_h266_read_picture_header:
✓ Branch 231 → 232 taken 5897 times.
✓ Branch 231 → 323 taken 810 times.
cbs_h266_write_picture_header:
✓ Branch 287 → 288 taken 1827 times.
✓ Branch 287 → 407 taken 303 times.
8837 if (current->ph_inter_slice_allowed_flag) {
2887
4/4
cbs_h266_read_picture_header:
✓ Branch 232 → 233 taken 1529 times.
✓ Branch 232 → 247 taken 4368 times.
cbs_h266_write_picture_header:
✓ Branch 288 → 289 taken 355 times.
✓ Branch 288 → 303 taken 1472 times.
7724 if (current->ph_partition_constraints_override_flag) {
2888
2/4
cbs_h266_read_picture_header:
✗ Branch 234 → 235 not taken.
✓ Branch 234 → 236 taken 1529 times.
cbs_h266_write_picture_header:
✗ Branch 290 → 291 not taken.
✓ Branch 290 → 292 taken 355 times.
1884 ue(ph_log2_diff_min_qt_min_cb_inter_slice,
2889 0, FFMIN(6, ctb_log2_size_y) - min_cb_log2_size_y);
2890 1884 min_qt_log2_size_inter_y =
2891 1884 current->ph_log2_diff_min_qt_min_cb_inter_slice +
2892 min_cb_log2_size_y;
2893
2/4
cbs_h266_read_picture_header:
✗ Branch 237 → 238 not taken.
✓ Branch 237 → 239 taken 1529 times.
cbs_h266_write_picture_header:
✗ Branch 293 → 294 not taken.
✓ Branch 293 → 295 taken 355 times.
1884 ue(ph_max_mtt_hierarchy_depth_inter_slice, 0,
2894 2 * (ctb_log2_size_y - min_cb_log2_size_y));
2895
2/4
cbs_h266_read_picture_header:
✓ Branch 239 → 240 taken 1529 times.
✗ Branch 239 → 248 not taken.
cbs_h266_write_picture_header:
✓ Branch 295 → 296 taken 355 times.
✗ Branch 295 → 315 not taken.
1884 if (current->ph_max_mtt_hierarchy_depth_inter_slice != 0) {
2896
2/4
cbs_h266_read_picture_header:
✗ Branch 241 → 242 not taken.
✓ Branch 241 → 243 taken 1529 times.
cbs_h266_write_picture_header:
✗ Branch 297 → 298 not taken.
✓ Branch 297 → 299 taken 355 times.
1884 ue(ph_log2_diff_max_bt_min_qt_inter_slice,
2897 0, ctb_log2_size_y - min_qt_log2_size_inter_y);
2898
2/4
cbs_h266_read_picture_header:
✗ Branch 244 → 245 not taken.
✓ Branch 244 → 246 taken 1529 times.
cbs_h266_write_picture_header:
✗ Branch 300 → 301 not taken.
✓ Branch 300 → 302 taken 355 times.
1884 ue(ph_log2_diff_max_tt_min_qt_inter_slice,
2899 0, FFMIN(6, ctb_log2_size_y) - min_qt_log2_size_inter_y);
2900 }
2901 } else {
2902
1/2
✗ Branch 303 → 304 not taken.
✓ Branch 303 → 306 taken 1472 times.
5840 infer(ph_log2_diff_min_qt_min_cb_inter_slice,
2903 sps->sps_log2_diff_min_qt_min_cb_inter_slice);
2904 5840 min_qt_log2_size_inter_y =
2905 5840 current->ph_log2_diff_min_qt_min_cb_inter_slice +
2906 min_cb_log2_size_y;
2907
1/2
✗ Branch 306 → 307 not taken.
✓ Branch 306 → 309 taken 1472 times.
5840 infer(ph_max_mtt_hierarchy_depth_inter_slice,
2908 sps->sps_max_mtt_hierarchy_depth_inter_slice);
2909
1/2
✗ Branch 309 → 310 not taken.
✓ Branch 309 → 312 taken 1472 times.
5840 infer(ph_log2_diff_max_bt_min_qt_inter_slice,
2910 sps->sps_log2_diff_max_bt_min_qt_inter_slice);
2911
1/2
✗ Branch 312 → 313 not taken.
✓ Branch 312 → 315 taken 1472 times.
5840 infer(ph_log2_diff_max_tt_min_qt_inter_slice,
2912 sps->sps_log2_diff_max_tt_min_qt_inter_slice);
2913 }
2914
2915
4/4
cbs_h266_read_picture_header:
✓ Branch 248 → 249 taken 527 times.
✓ Branch 248 → 253 taken 5370 times.
cbs_h266_write_picture_header:
✓ Branch 315 → 316 taken 58 times.
✓ Branch 315 → 320 taken 1769 times.
7724 if (pps->pps_cu_qp_delta_enabled_flag)
2916
2/4
cbs_h266_read_picture_header:
✗ Branch 250 → 251 not taken.
✓ Branch 250 → 252 taken 527 times.
cbs_h266_write_picture_header:
✗ Branch 317 → 318 not taken.
✓ Branch 317 → 319 taken 58 times.
585 ue(ph_cu_qp_delta_subdiv_inter_slice, 0,
2917 2 * (ctb_log2_size_y - min_qt_log2_size_inter_y +
2918 current->ph_max_mtt_hierarchy_depth_inter_slice));
2919 else
2920
1/2
✗ Branch 320 → 321 not taken.
✓ Branch 320 → 323 taken 1769 times.
7139 infer(ph_cu_qp_delta_subdiv_inter_slice, 0);
2921
2922
3/4
cbs_h266_read_picture_header:
✓ Branch 254 → 255 taken 38 times.
✓ Branch 254 → 259 taken 5859 times.
cbs_h266_write_picture_header:
✗ Branch 323 → 324 not taken.
✓ Branch 323 → 328 taken 1827 times.
7724 if (pps->pps_cu_chroma_qp_offset_list_enabled_flag)
2923
1/4
cbs_h266_read_picture_header:
✗ Branch 256 → 257 not taken.
✓ Branch 256 → 258 taken 38 times.
cbs_h266_write_picture_header:
✗ Branch 325 → 326 not taken.
✗ Branch 325 → 327 not taken.
38 ue(ph_cu_chroma_qp_offset_subdiv_inter_slice, 0,
2924 2 * (ctb_log2_size_y - min_qt_log2_size_inter_y +
2925 current->ph_max_mtt_hierarchy_depth_inter_slice));
2926 else
2927
1/2
✗ Branch 328 → 329 not taken.
✓ Branch 328 → 331 taken 1827 times.
7686 infer(ph_cu_chroma_qp_offset_subdiv_inter_slice, 0);
2928
2/4
cbs_h266_read_picture_header:
✓ Branch 260 → 261 taken 5897 times.
✗ Branch 260 → 281 not taken.
cbs_h266_write_picture_header:
✓ Branch 331 → 332 taken 1827 times.
✗ Branch 331 → 355 not taken.
7724 if (sps->sps_temporal_mvp_enabled_flag) {
2929
2/4
cbs_h266_read_picture_header:
✗ Branch 262 → 263 not taken.
✓ Branch 262 → 264 taken 5897 times.
cbs_h266_write_picture_header:
✗ Branch 333 → 334 not taken.
✓ Branch 333 → 335 taken 1827 times.
7724 flag(ph_temporal_mvp_enabled_flag);
2930
3/4
cbs_h266_read_picture_header:
✓ Branch 264 → 265 taken 5802 times.
✓ Branch 264 → 281 taken 95 times.
cbs_h266_write_picture_header:
✓ Branch 335 → 336 taken 1827 times.
✗ Branch 335 → 355 not taken.
7724 if (current->ph_temporal_mvp_enabled_flag &&
2931
3/4
cbs_h266_read_picture_header:
✓ Branch 265 → 266 taken 64 times.
✓ Branch 265 → 281 taken 5738 times.
cbs_h266_write_picture_header:
✗ Branch 336 → 337 not taken.
✓ Branch 336 → 355 taken 1827 times.
7629 pps->pps_rpl_info_in_ph_flag) {
2932
1/4
cbs_h266_read_picture_header:
✓ Branch 266 → 267 taken 64 times.
✗ Branch 266 → 271 not taken.
cbs_h266_write_picture_header:
✗ Branch 337 → 338 not taken.
✗ Branch 337 → 341 not taken.
64 if (current->ph_ref_pic_lists.rpl_ref_list[1].num_ref_entries > 0)
2933
1/4
cbs_h266_read_picture_header:
✗ Branch 268 → 269 not taken.
✓ Branch 268 → 270 taken 64 times.
cbs_h266_write_picture_header:
✗ Branch 339 → 340 not taken.
✗ Branch 339 → 344 not taken.
64 flag(ph_collocated_from_l0_flag);
2934 else
2935
0/2
✗ Branch 341 → 342 not taken.
✗ Branch 341 → 344 not taken.
✗ infer(ph_collocated_from_l0_flag, 1);
2936
2/4
cbs_h266_read_picture_header:
✓ Branch 272 → 273 taken 22 times.
✓ Branch 272 → 274 taken 42 times.
cbs_h266_write_picture_header:
✗ Branch 344 → 345 not taken.
✗ Branch 344 → 346 not taken.
64 if ((current->ph_collocated_from_l0_flag &&
2937
1/4
cbs_h266_read_picture_header:
✗ Branch 273 → 274 not taken.
✓ Branch 273 → 276 taken 22 times.
cbs_h266_write_picture_header:
✗ Branch 345 → 346 not taken.
✗ Branch 345 → 348 not taken.
22 current->ph_ref_pic_lists.rpl_ref_list[0].num_ref_entries > 1)
2938
1/4
cbs_h266_read_picture_header:
✓ Branch 274 → 275 taken 42 times.
✗ Branch 274 → 280 not taken.
cbs_h266_write_picture_header:
✗ Branch 346 → 347 not taken.
✗ Branch 346 → 352 not taken.
42 || (!current->ph_collocated_from_l0_flag &&
2939
2/4
cbs_h266_read_picture_header:
✓ Branch 275 → 276 taken 40 times.
✓ Branch 275 → 280 taken 2 times.
cbs_h266_write_picture_header:
✗ Branch 347 → 348 not taken.
✗ Branch 347 → 352 not taken.
42 current->ph_ref_pic_lists.rpl_ref_list[1].num_ref_entries > 1)) {
2940 62 unsigned int idx =
2941 62 current->ph_collocated_from_l0_flag ? 0 : 1;
2942
1/4
cbs_h266_read_picture_header:
✗ Branch 277 → 278 not taken.
✓ Branch 277 → 279 taken 62 times.
cbs_h266_write_picture_header:
✗ Branch 349 → 350 not taken.
✗ Branch 349 → 351 not taken.
62 ue(ph_collocated_ref_idx, 0,
2943 current->ph_ref_pic_lists.rpl_ref_list[idx].
2944 num_ref_entries - 1);
2945 } else {
2946
0/2
✗ Branch 352 → 353 not taken.
✗ Branch 352 → 355 not taken.
2 infer(ph_collocated_ref_idx, 0);
2947 }
2948 }
2949 }
2950
4/4
cbs_h266_read_picture_header:
✓ Branch 281 → 282 taken 3532 times.
✓ Branch 281 → 286 taken 2365 times.
cbs_h266_write_picture_header:
✓ Branch 355 → 356 taken 803 times.
✓ Branch 355 → 359 taken 1024 times.
7724 if (sps->sps_mmvd_fullpel_only_enabled_flag)
2951
2/4
cbs_h266_read_picture_header:
✗ Branch 283 → 284 not taken.
✓ Branch 283 → 285 taken 3532 times.
cbs_h266_write_picture_header:
✗ Branch 357 → 358 not taken.
✓ Branch 357 → 362 taken 803 times.
4335 flag(ph_mmvd_fullpel_only_flag);
2952 else
2953
1/2
✗ Branch 359 → 360 not taken.
✓ Branch 359 → 362 taken 1024 times.
3389 infer(ph_mmvd_fullpel_only_flag, 0);
2954
3/4
cbs_h266_read_picture_header:
✓ Branch 287 → 288 taken 64 times.
✓ Branch 287 → 289 taken 5833 times.
cbs_h266_write_picture_header:
✗ Branch 362 → 363 not taken.
✓ Branch 362 → 364 taken 1827 times.
7724 if (!pps->pps_rpl_info_in_ph_flag ||
2955
1/4
cbs_h266_read_picture_header:
✓ Branch 288 → 289 taken 64 times.
✗ Branch 288 → 309 not taken.
cbs_h266_write_picture_header:
✗ Branch 363 → 364 not taken.
✗ Branch 363 → 390 not taken.
64 current->ph_ref_pic_lists.rpl_ref_list[1].num_ref_entries > 0) {
2956
2/4
cbs_h266_read_picture_header:
✗ Branch 290 → 291 not taken.
✓ Branch 290 → 292 taken 5897 times.
cbs_h266_write_picture_header:
✗ Branch 365 → 366 not taken.
✓ Branch 365 → 367 taken 1827 times.
7724 flag(ph_mvd_l1_zero_flag);
2957
4/4
cbs_h266_read_picture_header:
✓ Branch 292 → 293 taken 3218 times.
✓ Branch 292 → 297 taken 2679 times.
cbs_h266_write_picture_header:
✓ Branch 367 → 368 taken 731 times.
✓ Branch 367 → 371 taken 1096 times.
7724 if (sps->sps_bdof_control_present_in_ph_flag) {
2958
2/4
cbs_h266_read_picture_header:
✗ Branch 294 → 295 not taken.
✓ Branch 294 → 296 taken 3218 times.
cbs_h266_write_picture_header:
✗ Branch 369 → 370 not taken.
✓ Branch 369 → 378 taken 731 times.
3949 flag(ph_bdof_disabled_flag);
2959 } else {
2960
2/4
cbs_h266_read_picture_header:
✓ Branch 297 → 298 taken 2679 times.
✗ Branch 297 → 299 not taken.
cbs_h266_write_picture_header:
✓ Branch 371 → 372 taken 1096 times.
✗ Branch 371 → 375 not taken.
3775 if (!sps->sps_bdof_control_present_in_ph_flag)
2961
1/2
✗ Branch 372 → 373 not taken.
✓ Branch 372 → 378 taken 1096 times.
3775 infer(ph_bdof_disabled_flag,
2962 1 - sps->sps_bdof_enabled_flag);
2963 else
2964
0/2
✗ Branch 375 → 376 not taken.
✗ Branch 375 → 378 not taken.
✗ infer(ph_bdof_disabled_flag, 1);
2965 }
2966
4/4
cbs_h266_read_picture_header:
✓ Branch 300 → 301 taken 3034 times.
✓ Branch 300 → 305 taken 2863 times.
cbs_h266_write_picture_header:
✓ Branch 378 → 379 taken 685 times.
✓ Branch 378 → 382 taken 1142 times.
7724 if (sps->sps_dmvr_control_present_in_ph_flag) {
2967
2/4
cbs_h266_read_picture_header:
✗ Branch 302 → 303 not taken.
✓ Branch 302 → 304 taken 3034 times.
cbs_h266_write_picture_header:
✗ Branch 380 → 381 not taken.
✓ Branch 380 → 389 taken 685 times.
3719 flag(ph_dmvr_disabled_flag);
2968 } else {
2969
2/4
cbs_h266_read_picture_header:
✓ Branch 305 → 306 taken 2863 times.
✗ Branch 305 → 307 not taken.
cbs_h266_write_picture_header:
✓ Branch 382 → 383 taken 1142 times.
✗ Branch 382 → 386 not taken.
4005 if (!sps->sps_dmvr_control_present_in_ph_flag)
2970
1/2
✗ Branch 383 → 384 not taken.
✓ Branch 383 → 389 taken 1142 times.
4005 infer(ph_dmvr_disabled_flag,
2971 1 - sps->sps_dmvr_enabled_flag);
2972 else
2973
0/2
✗ Branch 386 → 387 not taken.
✗ Branch 386 → 389 not taken.
✗ infer(ph_dmvr_disabled_flag, 1);
2974 }
2975 } else {
2976
0/2
✗ Branch 390 → 391 not taken.
✗ Branch 390 → 393 not taken.
✗ infer(ph_mvd_l1_zero_flag, 1);
2977 }
2978
4/4
cbs_h266_read_picture_header:
✓ Branch 310 → 311 taken 3532 times.
✓ Branch 310 → 315 taken 2365 times.
cbs_h266_write_picture_header:
✓ Branch 393 → 394 taken 803 times.
✓ Branch 393 → 397 taken 1024 times.
7724 if (sps->sps_prof_control_present_in_ph_flag)
2979
2/4
cbs_h266_read_picture_header:
✗ Branch 312 → 313 not taken.
✓ Branch 312 → 314 taken 3532 times.
cbs_h266_write_picture_header:
✗ Branch 395 → 396 not taken.
✓ Branch 395 → 400 taken 803 times.
4335 flag(ph_prof_disabled_flag);
2980 else
2981
1/2
✗ Branch 397 → 398 not taken.
✓ Branch 397 → 400 taken 1024 times.
3389 infer(ph_prof_disabled_flag, !sps->sps_affine_prof_enabled_flag);
2982
4/4
cbs_h266_read_picture_header:
✓ Branch 316 → 317 taken 5791 times.
✓ Branch 316 → 318 taken 106 times.
cbs_h266_write_picture_header:
✓ Branch 400 → 401 taken 1811 times.
✓ Branch 400 → 402 taken 16 times.
7724 if ((pps->pps_weighted_pred_flag ||
2983
4/8
cbs_h266_read_picture_header:
✗ Branch 317 → 318 not taken.
✓ Branch 317 → 323 taken 5791 times.
✗ Branch 318 → 319 not taken.
✓ Branch 318 → 323 taken 106 times.
cbs_h266_write_picture_header:
✗ Branch 401 → 402 not taken.
✓ Branch 401 → 407 taken 1811 times.
✗ Branch 402 → 403 not taken.
✓ Branch 402 → 407 taken 16 times.
7724 pps->pps_weighted_bipred_flag) && pps->pps_wp_info_in_ph_flag) {
2984
2985 // if pps->pps_wp_info_in_ph_fla == 1
2986 // pred_weight_table will not use num_ref_idx_active
2987 ✗ uint8_t num_ref_idx_active[2] = { 0, 0 };
2988
0/4
cbs_h266_read_picture_header:
✗ Branch 320 → 321 not taken.
✗ Branch 320 → 322 not taken.
cbs_h266_write_picture_header:
✗ Branch 404 → 405 not taken.
✗ Branch 404 → 406 not taken.
✗ CHECK(FUNC(pred_weight_table)
2989 (ctx, rw, sps, pps, &current->ph_ref_pic_lists,
2990 num_ref_idx_active, &current->ph_pred_weight_table));
2991 }
2992 }
2993
2994 8837 qp_bd_offset = 6 * sps->sps_bitdepth_minus8;
2995
3/4
cbs_h266_read_picture_header:
✓ Branch 323 → 324 taken 69 times.
✓ Branch 323 → 328 taken 6638 times.
cbs_h266_write_picture_header:
✗ Branch 407 → 408 not taken.
✓ Branch 407 → 412 taken 2130 times.
8837 if (pps->pps_qp_delta_info_in_ph_flag)
2996
1/4
cbs_h266_read_picture_header:
✗ Branch 325 → 326 not taken.
✓ Branch 325 → 327 taken 69 times.
cbs_h266_write_picture_header:
✗ Branch 409 → 410 not taken.
✗ Branch 409 → 411 not taken.
69 se(ph_qp_delta, -qp_bd_offset - (26 + pps->pps_init_qp_minus26),
2997 63 - (26 + pps->pps_init_qp_minus26));
2998
2999
4/4
cbs_h266_read_picture_header:
✓ Branch 328 → 329 taken 3547 times.
✓ Branch 328 → 333 taken 3160 times.
cbs_h266_write_picture_header:
✓ Branch 412 → 413 taken 786 times.
✓ Branch 412 → 416 taken 1344 times.
8837 if (sps->sps_joint_cbcr_enabled_flag)
3000
2/4
cbs_h266_read_picture_header:
✗ Branch 330 → 331 not taken.
✓ Branch 330 → 332 taken 3547 times.
cbs_h266_write_picture_header:
✗ Branch 414 → 415 not taken.
✓ Branch 414 → 419 taken 786 times.
4333 flag(ph_joint_cbcr_sign_flag);
3001 else
3002
1/2
✗ Branch 416 → 417 not taken.
✓ Branch 416 → 419 taken 1344 times.
4504 infer(ph_joint_cbcr_sign_flag, 0);
3003
7/8
cbs_h266_read_picture_header:
✓ Branch 334 → 335 taken 3849 times.
✓ Branch 334 → 346 taken 2858 times.
✓ Branch 335 → 336 taken 73 times.
✓ Branch 335 → 346 taken 3776 times.
cbs_h266_write_picture_header:
✓ Branch 419 → 420 taken 848 times.
✓ Branch 419 → 432 taken 1282 times.
✗ Branch 420 → 421 not taken.
✓ Branch 420 → 432 taken 848 times.
8837 if (sps->sps_sao_enabled_flag && pps->pps_sao_info_in_ph_flag) {
3004
1/4
cbs_h266_read_picture_header:
✗ Branch 337 → 338 not taken.
✓ Branch 337 → 339 taken 73 times.
cbs_h266_write_picture_header:
✗ Branch 422 → 423 not taken.
✗ Branch 422 → 424 not taken.
73 flag(ph_sao_luma_enabled_flag);
3005
1/4
cbs_h266_read_picture_header:
✓ Branch 339 → 340 taken 73 times.
✗ Branch 339 → 344 not taken.
cbs_h266_write_picture_header:
✗ Branch 424 → 425 not taken.
✗ Branch 424 → 428 not taken.
73 if (sps->sps_chroma_format_idc != 0)
3006
1/4
cbs_h266_read_picture_header:
✗ Branch 341 → 342 not taken.
✓ Branch 341 → 343 taken 73 times.
cbs_h266_write_picture_header:
✗ Branch 426 → 427 not taken.
✗ Branch 426 → 431 not taken.
73 flag(ph_sao_chroma_enabled_flag);
3007 else
3008
0/2
✗ Branch 428 → 429 not taken.
✗ Branch 428 → 431 not taken.
✗ infer(ph_sao_chroma_enabled_flag, 0);
3009 } else {
3010
1/2
✗ Branch 432 → 433 not taken.
✓ Branch 432 → 435 taken 2130 times.
8764 infer(ph_sao_luma_enabled_flag, 0);
3011
1/2
✗ Branch 435 → 436 not taken.
✓ Branch 435 → 438 taken 2130 times.
8764 infer(ph_sao_chroma_enabled_flag, 0);
3012 }
3013
3014
3/4
cbs_h266_read_picture_header:
✓ Branch 347 → 348 taken 13 times.
✓ Branch 347 → 352 taken 6694 times.
cbs_h266_write_picture_header:
✗ Branch 438 → 439 not taken.
✓ Branch 438 → 442 taken 2130 times.
8837 if (pps->pps_dbf_info_in_ph_flag)
3015
1/4
cbs_h266_read_picture_header:
✗ Branch 349 → 350 not taken.
✓ Branch 349 → 351 taken 13 times.
cbs_h266_write_picture_header:
✗ Branch 440 → 441 not taken.
✗ Branch 440 → 445 not taken.
13 flag(ph_deblocking_params_present_flag);
3016 else
3017
1/2
✗ Branch 442 → 443 not taken.
✓ Branch 442 → 445 taken 2130 times.
8824 infer(ph_deblocking_params_present_flag, 0);
3018
3019
3/4
cbs_h266_read_picture_header:
✓ Branch 353 → 354 taken 13 times.
✓ Branch 353 → 381 taken 6694 times.
cbs_h266_write_picture_header:
✗ Branch 445 → 446 not taken.
✓ Branch 445 → 486 taken 2130 times.
8837 if (current->ph_deblocking_params_present_flag) {
3020
1/4
cbs_h266_read_picture_header:
✓ Branch 354 → 355 taken 13 times.
✗ Branch 354 → 380 not taken.
cbs_h266_write_picture_header:
✗ Branch 446 → 447 not taken.
✗ Branch 446 → 483 not taken.
13 if (!pps->pps_deblocking_filter_disabled_flag) {
3021
1/4
cbs_h266_read_picture_header:
✗ Branch 356 → 357 not taken.
✓ Branch 356 → 358 taken 13 times.
cbs_h266_write_picture_header:
✗ Branch 448 → 449 not taken.
✗ Branch 448 → 450 not taken.
13 flag(ph_deblocking_filter_disabled_flag);
3022
1/4
cbs_h266_read_picture_header:
✓ Branch 358 → 359 taken 13 times.
✗ Branch 358 → 383 not taken.
cbs_h266_write_picture_header:
✗ Branch 450 → 451 not taken.
✗ Branch 450 → 508 not taken.
13 if (!current->ph_deblocking_filter_disabled_flag) {
3023
1/4
cbs_h266_read_picture_header:
✗ Branch 360 → 361 not taken.
✓ Branch 360 → 362 taken 13 times.
cbs_h266_write_picture_header:
✗ Branch 452 → 453 not taken.
✗ Branch 452 → 454 not taken.
13 se(ph_luma_beta_offset_div2, -12, 12);
3024
1/4
cbs_h266_read_picture_header:
✗ Branch 363 → 364 not taken.
✓ Branch 363 → 365 taken 13 times.
cbs_h266_write_picture_header:
✗ Branch 455 → 456 not taken.
✗ Branch 455 → 457 not taken.
13 se(ph_luma_tc_offset_div2, -12, 12);
3025
1/4
cbs_h266_read_picture_header:
✓ Branch 365 → 366 taken 13 times.
✗ Branch 365 → 379 not taken.
cbs_h266_write_picture_header:
✗ Branch 457 → 458 not taken.
✗ Branch 457 → 471 not taken.
13 if (pps->pps_chroma_tool_offsets_present_flag) {
3026
1/4
cbs_h266_read_picture_header:
✗ Branch 367 → 368 not taken.
✓ Branch 367 → 369 taken 13 times.
cbs_h266_write_picture_header:
✗ Branch 459 → 460 not taken.
✗ Branch 459 → 461 not taken.
13 se(ph_cb_beta_offset_div2, -12, 12);
3027
1/4
cbs_h266_read_picture_header:
✗ Branch 370 → 371 not taken.
✓ Branch 370 → 372 taken 13 times.
cbs_h266_write_picture_header:
✗ Branch 462 → 463 not taken.
✗ Branch 462 → 464 not taken.
13 se(ph_cb_tc_offset_div2, -12, 12);
3028
1/4
cbs_h266_read_picture_header:
✗ Branch 373 → 374 not taken.
✓ Branch 373 → 375 taken 13 times.
cbs_h266_write_picture_header:
✗ Branch 465 → 466 not taken.
✗ Branch 465 → 467 not taken.
13 se(ph_cr_beta_offset_div2, -12, 12);
3029
1/4
cbs_h266_read_picture_header:
✗ Branch 376 → 377 not taken.
✓ Branch 376 → 378 taken 13 times.
cbs_h266_write_picture_header:
✗ Branch 468 → 469 not taken.
✗ Branch 468 → 470 not taken.
13 se(ph_cr_tc_offset_div2, -12, 12);
3030 } else {
3031
0/2
✗ Branch 471 → 472 not taken.
✗ Branch 471 → 474 not taken.
✗ infer(ph_cb_beta_offset_div2,
3032 current->ph_luma_beta_offset_div2);
3033
0/2
✗ Branch 474 → 475 not taken.
✗ Branch 474 → 477 not taken.
✗ infer(ph_cb_tc_offset_div2,
3034 current->ph_luma_tc_offset_div2);
3035
0/2
✗ Branch 477 → 478 not taken.
✗ Branch 477 → 480 not taken.
✗ infer(ph_cr_beta_offset_div2,
3036 current->ph_luma_beta_offset_div2);
3037
0/2
✗ Branch 480 → 481 not taken.
✗ Branch 480 → 508 not taken.
✗ infer(ph_cr_tc_offset_div2,
3038 current->ph_luma_tc_offset_div2);
3039 }
3040 }
3041 } else {
3042
0/2
✗ Branch 483 → 484 not taken.
✗ Branch 483 → 508 not taken.
✗ infer(ph_deblocking_filter_disabled_flag, 0);
3043 }
3044 } else {
3045
1/2
✗ Branch 486 → 487 not taken.
✓ Branch 486 → 489 taken 2130 times.
8824 infer(ph_deblocking_filter_disabled_flag, pps->pps_deblocking_filter_disabled_flag);
3046
4/4
cbs_h266_read_picture_header:
✓ Branch 381 → 382 taken 4128 times.
✓ Branch 381 → 383 taken 2566 times.
cbs_h266_write_picture_header:
✓ Branch 489 → 490 taken 850 times.
✓ Branch 489 → 508 taken 1280 times.
8824 if (!current->ph_deblocking_filter_disabled_flag) {
3047
1/2
✗ Branch 490 → 491 not taken.
✓ Branch 490 → 493 taken 850 times.
4978 infer(ph_luma_beta_offset_div2, pps->pps_luma_beta_offset_div2);
3048
1/2
✗ Branch 493 → 494 not taken.
✓ Branch 493 → 496 taken 850 times.
4978 infer(ph_luma_tc_offset_div2, pps->pps_luma_tc_offset_div2);
3049
1/2
✗ Branch 496 → 497 not taken.
✓ Branch 496 → 499 taken 850 times.
4978 infer(ph_cb_beta_offset_div2, pps->pps_cb_beta_offset_div2);
3050
1/2
✗ Branch 499 → 500 not taken.
✓ Branch 499 → 502 taken 850 times.
4978 infer(ph_cb_tc_offset_div2, pps->pps_cb_tc_offset_div2);
3051
1/2
✗ Branch 502 → 503 not taken.
✓ Branch 502 → 505 taken 850 times.
4978 infer(ph_cr_beta_offset_div2, pps->pps_cr_beta_offset_div2);
3052
1/2
✗ Branch 505 → 506 not taken.
✓ Branch 505 → 508 taken 850 times.
4978 infer(ph_cr_tc_offset_div2, pps->pps_cr_tc_offset_div2);
3053 }
3054 }
3055
3056
2/4
cbs_h266_read_picture_header:
✗ Branch 383 → 384 not taken.
✓ Branch 383 → 393 taken 6707 times.
cbs_h266_write_picture_header:
✗ Branch 508 → 509 not taken.
✓ Branch 508 → 518 taken 2130 times.
8837 if (pps->pps_picture_header_extension_present_flag) {
3057
0/4
cbs_h266_read_picture_header:
✗ Branch 385 → 386 not taken.
✗ Branch 385 → 387 not taken.
cbs_h266_write_picture_header:
✗ Branch 510 → 511 not taken.
✗ Branch 510 → 512 not taken.
✗ ue(ph_extension_length, 0, 256);
3058
0/4
cbs_h266_read_picture_header:
✗ Branch 392 → 388 not taken.
✗ Branch 392 → 393 not taken.
cbs_h266_write_picture_header:
✗ Branch 517 → 513 not taken.
✗ Branch 517 → 518 not taken.
✗ for (i = 0; i < current->ph_extension_length; i++)
3059
0/4
cbs_h266_read_picture_header:
✗ Branch 389 → 390 not taken.
✗ Branch 389 → 391 not taken.
cbs_h266_write_picture_header:
✗ Branch 514 → 515 not taken.
✗ Branch 514 → 516 not taken.
✗ us(8, ph_extension_data_byte[i], 0x00, 0xff, 1, i);
3060 }
3061
3062 8837 return 0;
3063 }
3064
3065 245 static int FUNC(ph) (CodedBitstreamContext *ctx, RWContext *rw,
3066 H266RawPH *current)
3067 {
3068 int err;
3069
3070 245 HEADER("Picture Header");
3071
3072
2/4
cbs_h266_read_ph:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 218 times.
cbs_h266_write_ph:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 27 times.
245 CHECK(FUNC(nal_unit_header) (ctx, rw, &current->nal_unit_header, VVC_PH_NUT));
3073
2/4
cbs_h266_read_ph:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 218 times.
cbs_h266_write_ph:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 27 times.
245 CHECK(FUNC(picture_header) (ctx, rw, &current->ph_picture_header));
3074
2/4
cbs_h266_read_ph:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 218 times.
cbs_h266_write_ph:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 27 times.
245 CHECK(FUNC(rbsp_trailing_bits) (ctx, rw));
3075 245 return 0;
3076 }
3077
3078 11698 static int FUNC(slice_header) (CodedBitstreamContext *ctx, RWContext *rw,
3079 H266RawSliceHeader *current)
3080 {
3081 11698 CodedBitstreamH266Context *h266 = ctx->priv_data;
3082 const H266RawSPS *sps;
3083 const H266RawPPS *pps;
3084 const H266RawPictureHeader *ph;
3085 const H266RefPicLists *ref_pic_lists;
3086 int err, i;
3087 uint8_t nal_unit_type, qp_bd_offset;
3088 uint16_t num_slices_in_subpic;
3089
3090 11698 HEADER("Slice Header");
3091
3092
2/4
cbs_h266_read_slice_header:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 9110 times.
cbs_h266_write_slice_header:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 2588 times.
11698 CHECK(FUNC(nal_unit_header) (ctx, rw, &current->nal_unit_header, -1));
3093
3094
2/4
cbs_h266_read_slice_header:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 9110 times.
cbs_h266_write_slice_header:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 2588 times.
11698 flag(sh_picture_header_in_slice_header_flag);
3095
4/4
cbs_h266_read_slice_header:
✓ Branch 9 → 10 taken 6489 times.
✓ Branch 9 → 14 taken 2621 times.
cbs_h266_write_slice_header:
✓ Branch 9 → 10 taken 2103 times.
✓ Branch 9 → 14 taken 485 times.
11698 if (current->sh_picture_header_in_slice_header_flag) {
3096 // 7.4.8 if sh_picture_header_in_slice_header_flag is true, we do not have a PH NAL unit
3097
2/4
cbs_h266_read_slice_header:
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 13 taken 6489 times.
cbs_h266_write_slice_header:
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 13 taken 2103 times.
8592 CHECK(FUNC(picture_header) (ctx, rw, &current->sh_picture_header));
3098 8592 ph = &current->sh_picture_header;
3099 } else {
3100 3106 ph = h266->ph;
3101
2/4
cbs_h266_read_slice_header:
✗ Branch 14 → 15 not taken.
✓ Branch 14 → 17 taken 2621 times.
cbs_h266_write_slice_header:
✗ Branch 14 → 15 not taken.
✓ Branch 14 → 17 taken 485 times.
3106 if (!ph) {
3102 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
3103 "Picture header not available.\n");
3104 ✗ return AVERROR_INVALIDDATA;
3105 }
3106 }
3107
3108 11698 pps = h266->pps[ph->ph_pic_parameter_set_id];
3109
2/4
cbs_h266_read_slice_header:
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 20 taken 9110 times.
cbs_h266_write_slice_header:
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 20 taken 2588 times.
11698 if (!pps) {
3110 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR, "PPS id %d not available.\n",
3111 ✗ ph->ph_pic_parameter_set_id);
3112 ✗ return AVERROR_INVALIDDATA;
3113 }
3114 11698 sps = h266->sps[pps->pps_seq_parameter_set_id];
3115
2/4
cbs_h266_read_slice_header:
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 23 taken 9110 times.
cbs_h266_write_slice_header:
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 23 taken 2588 times.
11698 if (!sps) {
3116 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR, "SPS id %d not available.\n",
3117 ✗ pps->pps_seq_parameter_set_id);
3118 ✗ return AVERROR_INVALIDDATA;
3119 }
3120
3121
4/4
cbs_h266_read_slice_header:
✓ Branch 23 → 24 taken 787 times.
✓ Branch 23 → 35 taken 8323 times.
cbs_h266_write_slice_header:
✓ Branch 23 → 24 taken 32 times.
✓ Branch 23 → 35 taken 2556 times.
11698 if (sps->sps_subpic_info_present_flag) {
3122
2/4
cbs_h266_read_slice_header:
✗ Branch 25 → 26 not taken.
✓ Branch 25 → 27 taken 787 times.
cbs_h266_write_slice_header:
✗ Branch 25 → 26 not taken.
✓ Branch 25 → 27 taken 32 times.
819 ub(sps->sps_subpic_id_len_minus1 + 1, sh_subpic_id);
3123
2/4
cbs_h266_read_slice_header:
✓ Branch 31 → 28 taken 2910 times.
✗ Branch 31 → 32 not taken.
cbs_h266_write_slice_header:
✓ Branch 31 → 28 taken 72 times.
✗ Branch 31 → 32 not taken.
2982 for (i = 0; i <= sps->sps_num_subpics_minus1; i++) {
3124
4/4
cbs_h266_read_slice_header:
✓ Branch 28 → 29 taken 787 times.
✓ Branch 28 → 30 taken 2123 times.
cbs_h266_write_slice_header:
✓ Branch 28 → 29 taken 32 times.
✓ Branch 28 → 30 taken 40 times.
2982 if (pps->sub_pic_id_val[i] == current->sh_subpic_id) {
3125 819 current->curr_subpic_idx = i;
3126 819 break;
3127 }
3128 }
3129
2/4
cbs_h266_read_slice_header:
✗ Branch 32 → 33 not taken.
✓ Branch 32 → 36 taken 787 times.
cbs_h266_write_slice_header:
✗ Branch 32 → 33 not taken.
✓ Branch 32 → 36 taken 32 times.
819 if (i > sps->sps_num_subpics_minus1) {
3130 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR, "invalid CurrSubpicIdx %d\n", i);
3131 ✗ return AVERROR_INVALIDDATA;
3132 }
3133 } else {
3134 10879 current->curr_subpic_idx = 0;
3135 }
3136
3137 11698 num_slices_in_subpic = pps->num_slices_in_subpic[current->curr_subpic_idx];
3138
3139
8/8
cbs_h266_read_slice_header:
✓ Branch 36 → 37 taken 2166 times.
✓ Branch 36 → 38 taken 6944 times.
✓ Branch 37 → 38 taken 952 times.
✓ Branch 37 → 40 taken 1214 times.
cbs_h266_write_slice_header:
✓ Branch 36 → 37 taken 317 times.
✓ Branch 36 → 38 taken 2271 times.
✓ Branch 37 → 38 taken 21 times.
✓ Branch 37 → 40 taken 296 times.
11698 if ((pps->pps_rect_slice_flag && num_slices_in_subpic > 1) ||
3140
8/8
cbs_h266_read_slice_header:
✓ Branch 38 → 39 taken 6944 times.
✓ Branch 38 → 47 taken 952 times.
✓ Branch 39 → 40 taken 680 times.
✓ Branch 39 → 47 taken 6264 times.
cbs_h266_write_slice_header:
✓ Branch 38 → 39 taken 2271 times.
✓ Branch 38 → 47 taken 21 times.
✓ Branch 39 → 40 taken 170 times.
✓ Branch 39 → 47 taken 2101 times.
10654 (!pps->pps_rect_slice_flag && pps->num_tiles_in_pic > 1)) {
3141 unsigned int bits, max;
3142
4/4
cbs_h266_read_slice_header:
✓ Branch 40 → 41 taken 680 times.
✓ Branch 40 → 42 taken 1214 times.
cbs_h266_write_slice_header:
✓ Branch 40 → 41 taken 170 times.
✓ Branch 40 → 42 taken 296 times.
2360 if (!pps->pps_rect_slice_flag) {
3143 850 bits = av_ceil_log2(pps->num_tiles_in_pic);
3144 850 max = pps->num_tiles_in_pic - 1;
3145 } else {
3146 1510 bits = av_ceil_log2(num_slices_in_subpic);
3147 1510 max = num_slices_in_subpic - 1;
3148 }
3149
2/4
cbs_h266_read_slice_header:
✗ Branch 44 → 45 not taken.
✓ Branch 44 → 46 taken 1894 times.
cbs_h266_write_slice_header:
✗ Branch 44 → 45 not taken.
✓ Branch 44 → 46 taken 466 times.
2360 u(bits, sh_slice_address, 0, max);
3150 } else {
3151
1/2
✗ Branch 47 → 48 not taken.
✓ Branch 47 → 50 taken 2122 times.
9338 infer(sh_slice_address, 0);
3152 }
3153
3154
2/4
cbs_h266_read_slice_header:
✗ Branch 55 → 49 not taken.
✓ Branch 55 → 56 taken 9110 times.
cbs_h266_write_slice_header:
✗ Branch 57 → 51 not taken.
✓ Branch 57 → 58 taken 2588 times.
11698 for (i = 0; i < sps->sps_num_extra_sh_bytes * 8; i++) {
3155
0/4
cbs_h266_read_slice_header:
✗ Branch 49 → 50 not taken.
✗ Branch 49 → 54 not taken.
cbs_h266_write_slice_header:
✗ Branch 51 → 52 not taken.
✗ Branch 51 → 56 not taken.
✗ if (sps->sps_extra_sh_bit_present_flag[i])
3156
0/4
cbs_h266_read_slice_header:
✗ Branch 51 → 52 not taken.
✗ Branch 51 → 53 not taken.
cbs_h266_write_slice_header:
✗ Branch 53 → 54 not taken.
✗ Branch 53 → 55 not taken.
✗ flags(sh_extra_bit[i], 1, i);
3157 }
3158
3159
4/4
cbs_h266_read_slice_header:
✓ Branch 56 → 57 taken 6944 times.
✓ Branch 56 → 62 taken 2166 times.
cbs_h266_write_slice_header:
✓ Branch 58 → 59 taken 2271 times.
✓ Branch 58 → 64 taken 317 times.
11698 if (!pps->pps_rect_slice_flag &&
3160
4/4
cbs_h266_read_slice_header:
✓ Branch 57 → 58 taken 640 times.
✓ Branch 57 → 62 taken 6304 times.
cbs_h266_write_slice_header:
✓ Branch 59 → 60 taken 160 times.
✓ Branch 59 → 64 taken 2111 times.
9215 pps->num_tiles_in_pic - current->sh_slice_address > 1)
3161
2/4
cbs_h266_read_slice_header:
✗ Branch 59 → 60 not taken.
✓ Branch 59 → 61 taken 640 times.
cbs_h266_write_slice_header:
✗ Branch 61 → 62 not taken.
✓ Branch 61 → 63 taken 160 times.
800 ue(sh_num_tiles_in_slice_minus1, 0, pps->num_tiles_in_pic - 1 - current->sh_slice_address);
3162 else
3163
1/2
✗ Branch 64 → 65 not taken.
✓ Branch 64 → 67 taken 2428 times.
10898 infer(sh_num_tiles_in_slice_minus1, 0);
3164
3165
4/4
cbs_h266_read_slice_header:
✓ Branch 63 → 64 taken 7783 times.
✓ Branch 63 → 68 taken 1327 times.
cbs_h266_write_slice_header:
✓ Branch 67 → 68 taken 2171 times.
✓ Branch 67 → 72 taken 417 times.
11698 if (ph->ph_inter_slice_allowed_flag)
3166
2/4
cbs_h266_read_slice_header:
✗ Branch 65 → 66 not taken.
✓ Branch 65 → 67 taken 7783 times.
cbs_h266_write_slice_header:
✗ Branch 69 → 70 not taken.
✓ Branch 69 → 71 taken 2171 times.
9954 ue(sh_slice_type, 0, 2);
3167 else
3168
1/2
✗ Branch 72 → 73 not taken.
✓ Branch 72 → 75 taken 417 times.
1744 infer(sh_slice_type, 2);
3169
3170 11698 nal_unit_type = current->nal_unit_header.nal_unit_type;
3171
12/12
cbs_h266_read_slice_header:
✓ Branch 69 → 70 taken 9091 times.
✓ Branch 69 → 73 taken 19 times.
✓ Branch 70 → 71 taken 7827 times.
✓ Branch 70 → 73 taken 1264 times.
✓ Branch 71 → 72 taken 7787 times.
✓ Branch 71 → 73 taken 40 times.
cbs_h266_write_slice_header:
✓ Branch 75 → 76 taken 2585 times.
✓ Branch 75 → 79 taken 3 times.
✓ Branch 76 → 77 taken 2180 times.
✓ Branch 76 → 79 taken 405 times.
✓ Branch 77 → 78 taken 2171 times.
✓ Branch 77 → 79 taken 9 times.
11698 if (nal_unit_type == VVC_IDR_W_RADL || nal_unit_type == VVC_IDR_N_LP ||
3172
4/4
cbs_h266_read_slice_header:
✓ Branch 72 → 73 taken 6 times.
✓ Branch 72 → 77 taken 7781 times.
cbs_h266_write_slice_header:
✓ Branch 78 → 79 taken 1 time.
✓ Branch 78 → 82 taken 2170 times.
9958 nal_unit_type == VVC_CRA_NUT || nal_unit_type == VVC_GDR_NUT)
3173
2/4
cbs_h266_read_slice_header:
✗ Branch 74 → 75 not taken.
✓ Branch 74 → 76 taken 1329 times.
cbs_h266_write_slice_header:
✗ Branch 80 → 81 not taken.
✓ Branch 80 → 82 taken 418 times.
1747 flag(sh_no_output_of_prior_pics_flag);
3174
3175
4/4
cbs_h266_read_slice_header:
✓ Branch 77 → 78 taken 5880 times.
✓ Branch 77 → 135 taken 3230 times.
cbs_h266_write_slice_header:
✓ Branch 82 → 83 taken 1212 times.
✓ Branch 82 → 163 taken 1376 times.
11698 if (sps->sps_alf_enabled_flag) {
3176
3/4
cbs_h266_read_slice_header:
✓ Branch 78 → 79 taken 5342 times.
✓ Branch 78 → 123 taken 538 times.
cbs_h266_write_slice_header:
✓ Branch 83 → 84 taken 1212 times.
✗ Branch 83 → 124 not taken.
7092 if (!pps->pps_alf_info_in_ph_flag) {
3177
2/4
cbs_h266_read_slice_header:
✗ Branch 80 → 81 not taken.
✓ Branch 80 → 82 taken 5342 times.
cbs_h266_write_slice_header:
✗ Branch 85 → 86 not taken.
✓ Branch 85 → 87 taken 1212 times.
6554 flag(sh_alf_enabled_flag);
3178
4/4
cbs_h266_read_slice_header:
✓ Branch 82 → 83 taken 4509 times.
✓ Branch 82 → 135 taken 833 times.
cbs_h266_write_slice_header:
✓ Branch 87 → 88 taken 1053 times.
✓ Branch 87 → 163 taken 159 times.
6554 if (current->sh_alf_enabled_flag) {
3179
2/4
cbs_h266_read_slice_header:
✗ Branch 84 → 85 not taken.
✓ Branch 84 → 86 taken 4509 times.
cbs_h266_write_slice_header:
✗ Branch 89 → 90 not taken.
✓ Branch 89 → 91 taken 1053 times.
5562 ub(3, sh_num_alf_aps_ids_luma);
3180
4/4
cbs_h266_read_slice_header:
✓ Branch 91 → 87 taken 5624 times.
✓ Branch 91 → 92 taken 4509 times.
cbs_h266_write_slice_header:
✓ Branch 96 → 92 taken 1256 times.
✓ Branch 96 → 97 taken 1053 times.
12442 for (i = 0; i < current->sh_num_alf_aps_ids_luma; i++)
3181
2/4
cbs_h266_read_slice_header:
✗ Branch 88 → 89 not taken.
✓ Branch 88 → 90 taken 5624 times.
cbs_h266_write_slice_header:
✗ Branch 93 → 94 not taken.
✓ Branch 93 → 95 taken 1256 times.
6880 ubs(3, sh_alf_aps_id_luma[i], 1, i);
3182
3183
4/4
cbs_h266_read_slice_header:
✓ Branch 92 → 93 taken 4279 times.
✓ Branch 92 → 100 taken 230 times.
cbs_h266_write_slice_header:
✓ Branch 97 → 98 taken 996 times.
✓ Branch 97 → 104 taken 57 times.
5562 if (sps->sps_chroma_format_idc != 0) {
3184
2/4
cbs_h266_read_slice_header:
✗ Branch 94 → 95 not taken.
✓ Branch 94 → 96 taken 4279 times.
cbs_h266_write_slice_header:
✗ Branch 99 → 100 not taken.
✓ Branch 99 → 101 taken 996 times.
5275 flag(sh_alf_cb_enabled_flag);
3185
2/4
cbs_h266_read_slice_header:
✗ Branch 97 → 98 not taken.
✓ Branch 97 → 99 taken 4279 times.
cbs_h266_write_slice_header:
✗ Branch 102 → 103 not taken.
✓ Branch 102 → 104 taken 996 times.
5275 flag(sh_alf_cr_enabled_flag);
3186 }
3187
4/4
cbs_h266_read_slice_header:
✓ Branch 100 → 101 taken 2521 times.
✓ Branch 100 → 102 taken 1988 times.
cbs_h266_write_slice_header:
✓ Branch 104 → 105 taken 608 times.
✓ Branch 104 → 106 taken 445 times.
5562 if (current->sh_alf_cb_enabled_flag ||
3188
4/4
cbs_h266_read_slice_header:
✓ Branch 101 → 102 taken 570 times.
✓ Branch 101 → 106 taken 1951 times.
cbs_h266_write_slice_header:
✓ Branch 105 → 106 taken 141 times.
✓ Branch 105 → 109 taken 467 times.
3129 current->sh_alf_cr_enabled_flag) {
3189
2/4
cbs_h266_read_slice_header:
✗ Branch 103 → 104 not taken.
✓ Branch 103 → 105 taken 2558 times.
cbs_h266_write_slice_header:
✗ Branch 107 → 108 not taken.
✓ Branch 107 → 109 taken 586 times.
3144 ub(3, sh_alf_aps_id_chroma);
3190 }
3191
3192
4/4
cbs_h266_read_slice_header:
✓ Branch 106 → 107 taken 4279 times.
✓ Branch 106 → 135 taken 230 times.
cbs_h266_write_slice_header:
✓ Branch 109 → 110 taken 996 times.
✓ Branch 109 → 163 taken 57 times.
5562 if (sps->sps_ccalf_enabled_flag) {
3193
2/4
cbs_h266_read_slice_header:
✗ Branch 108 → 109 not taken.
✓ Branch 108 → 110 taken 4279 times.
cbs_h266_write_slice_header:
✗ Branch 111 → 112 not taken.
✓ Branch 111 → 113 taken 996 times.
5275 flag(sh_alf_cc_cb_enabled_flag);
3194
4/4
cbs_h266_read_slice_header:
✓ Branch 110 → 111 taken 663 times.
✓ Branch 110 → 115 taken 3616 times.
cbs_h266_write_slice_header:
✓ Branch 113 → 114 taken 140 times.
✓ Branch 113 → 117 taken 856 times.
5275 if (current->sh_alf_cc_cb_enabled_flag)
3195
2/4
cbs_h266_read_slice_header:
✗ Branch 112 → 113 not taken.
✓ Branch 112 → 114 taken 663 times.
cbs_h266_write_slice_header:
✗ Branch 115 → 116 not taken.
✓ Branch 115 → 117 taken 140 times.
803 ub(3, sh_alf_cc_cb_aps_id);
3196
3197
2/4
cbs_h266_read_slice_header:
✗ Branch 116 → 117 not taken.
✓ Branch 116 → 118 taken 4279 times.
cbs_h266_write_slice_header:
✗ Branch 118 → 119 not taken.
✓ Branch 118 → 120 taken 996 times.
5275 flag(sh_alf_cc_cr_enabled_flag);
3198
4/4
cbs_h266_read_slice_header:
✓ Branch 118 → 119 taken 567 times.
✓ Branch 118 → 135 taken 3712 times.
cbs_h266_write_slice_header:
✓ Branch 120 → 121 taken 116 times.
✓ Branch 120 → 163 taken 880 times.
5275 if (current->sh_alf_cc_cr_enabled_flag)
3199
2/4
cbs_h266_read_slice_header:
✗ Branch 120 → 121 not taken.
✓ Branch 120 → 122 taken 567 times.
cbs_h266_write_slice_header:
✗ Branch 122 → 123 not taken.
✓ Branch 122 → 163 taken 116 times.
683 ub(3, sh_alf_cc_cr_aps_id);
3200 }
3201 }
3202 } else {
3203
0/2
✗ Branch 124 → 125 not taken.
✗ Branch 124 → 127 not taken.
538 infer(sh_alf_enabled_flag, ph->ph_alf_enabled_flag);
3204
2/4
cbs_h266_read_slice_header:
✓ Branch 123 → 124 taken 362 times.
✓ Branch 123 → 135 taken 176 times.
cbs_h266_write_slice_header:
✗ Branch 127 → 128 not taken.
✗ Branch 127 → 163 not taken.
538 if (current->sh_alf_enabled_flag) {
3205
0/2
✗ Branch 128 → 129 not taken.
✗ Branch 128 → 131 not taken.
362 infer(sh_num_alf_aps_ids_luma, ph->ph_num_alf_aps_ids_luma);
3206
2/4
cbs_h266_read_slice_header:
✓ Branch 126 → 125 taken 298 times.
✓ Branch 126 → 127 taken 362 times.
cbs_h266_write_slice_header:
✗ Branch 136 → 132 not taken.
✗ Branch 136 → 137 not taken.
660 for (i = 0; i < current->sh_num_alf_aps_ids_luma; i++)
3207
0/2
✗ Branch 132 → 133 not taken.
✗ Branch 132 → 135 not taken.
298 infer(sh_alf_aps_id_luma[i], ph->ph_alf_aps_id_luma[i]);
3208
3209
0/2
✗ Branch 137 → 138 not taken.
✗ Branch 137 → 140 not taken.
362 infer(sh_alf_cb_enabled_flag, ph->ph_alf_cb_enabled_flag);
3210
0/2
✗ Branch 140 → 141 not taken.
✗ Branch 140 → 143 not taken.
362 infer(sh_alf_cr_enabled_flag, ph->ph_alf_cr_enabled_flag);
3211
4/8
cbs_h266_read_slice_header:
✓ Branch 127 → 128 taken 208 times.
✓ Branch 127 → 129 taken 154 times.
✓ Branch 128 → 129 taken 16 times.
✓ Branch 128 → 130 taken 192 times.
cbs_h266_write_slice_header:
✗ Branch 143 → 144 not taken.
✗ Branch 143 → 145 not taken.
✗ Branch 144 → 145 not taken.
✗ Branch 144 → 148 not taken.
362 if (current->sh_alf_cb_enabled_flag ||current->sh_alf_cr_enabled_flag)
3212
0/2
✗ Branch 145 → 146 not taken.
✗ Branch 145 → 148 not taken.
170 infer(sh_alf_aps_id_chroma, ph->ph_alf_aps_id_chroma);
3213
3214
1/4
cbs_h266_read_slice_header:
✓ Branch 130 → 131 taken 362 times.
✗ Branch 130 → 135 not taken.
cbs_h266_write_slice_header:
✗ Branch 148 → 149 not taken.
✗ Branch 148 → 163 not taken.
362 if (sps->sps_ccalf_enabled_flag) {
3215
0/2
✗ Branch 149 → 150 not taken.
✗ Branch 149 → 152 not taken.
362 infer(sh_alf_cc_cb_enabled_flag, ph->ph_alf_cc_cb_enabled_flag);
3216
2/4
cbs_h266_read_slice_header:
✓ Branch 131 → 132 taken 18 times.
✓ Branch 131 → 133 taken 344 times.
cbs_h266_write_slice_header:
✗ Branch 152 → 153 not taken.
✗ Branch 152 → 156 not taken.
362 if (current->sh_alf_cc_cb_enabled_flag)
3217
0/2
✗ Branch 153 → 154 not taken.
✗ Branch 153 → 156 not taken.
18 infer(sh_alf_cc_cb_aps_id, ph->ph_alf_cc_cb_aps_id);
3218
3219
0/2
✗ Branch 156 → 157 not taken.
✗ Branch 156 → 159 not taken.
362 infer(sh_alf_cc_cr_enabled_flag, ph->ph_alf_cc_cr_enabled_flag);
3220
2/4
cbs_h266_read_slice_header:
✓ Branch 133 → 134 taken 12 times.
✓ Branch 133 → 135 taken 350 times.
cbs_h266_write_slice_header:
✗ Branch 159 → 160 not taken.
✗ Branch 159 → 163 not taken.
362 if (current->sh_alf_cc_cr_enabled_flag)
3221
0/2
✗ Branch 160 → 161 not taken.
✗ Branch 160 → 163 not taken.
12 infer(sh_alf_cc_cr_aps_id, ph->ph_alf_cc_cr_aps_id);
3222 }
3223 }
3224 }
3225 }
3226
3227
4/4
cbs_h266_read_slice_header:
✓ Branch 135 → 136 taken 6489 times.
✓ Branch 135 → 137 taken 2621 times.
cbs_h266_write_slice_header:
✓ Branch 163 → 164 taken 2103 times.
✓ Branch 163 → 170 taken 485 times.
11698 if (current->sh_picture_header_in_slice_header_flag) {
3228
1/2
✗ Branch 164 → 165 not taken.
✓ Branch 164 → 167 taken 2103 times.
8592 infer(sh_lmcs_used_flag, ph->ph_lmcs_enabled_flag);
3229
1/2
✗ Branch 167 → 168 not taken.
✓ Branch 167 → 184 taken 2103 times.
8592 infer(sh_explicit_scaling_list_used_flag,
3230 ph->ph_explicit_scaling_list_enabled_flag);
3231 } else {
3232
4/4
cbs_h266_read_slice_header:
✓ Branch 137 → 138 taken 1581 times.
✓ Branch 137 → 142 taken 1040 times.
cbs_h266_write_slice_header:
✓ Branch 170 → 171 taken 363 times.
✓ Branch 170 → 174 taken 122 times.
3106 if (ph->ph_lmcs_enabled_flag)
3233
2/4
cbs_h266_read_slice_header:
✗ Branch 139 → 140 not taken.
✓ Branch 139 → 141 taken 1581 times.
cbs_h266_write_slice_header:
✗ Branch 172 → 173 not taken.
✓ Branch 172 → 177 taken 363 times.
1944 flag(sh_lmcs_used_flag);
3234 else
3235
1/2
✗ Branch 174 → 175 not taken.
✓ Branch 174 → 177 taken 122 times.
1162 infer(sh_lmcs_used_flag, 0);
3236
3237
3/4
cbs_h266_read_slice_header:
✓ Branch 143 → 144 taken 123 times.
✓ Branch 143 → 148 taken 2498 times.
cbs_h266_write_slice_header:
✗ Branch 177 → 178 not taken.
✓ Branch 177 → 181 taken 485 times.
3106 if (ph->ph_explicit_scaling_list_enabled_flag)
3238
1/4
cbs_h266_read_slice_header:
✗ Branch 145 → 146 not taken.
✓ Branch 145 → 147 taken 123 times.
cbs_h266_write_slice_header:
✗ Branch 179 → 180 not taken.
✗ Branch 179 → 184 not taken.
123 flag(sh_explicit_scaling_list_used_flag);
3239 else
3240
1/2
✗ Branch 181 → 182 not taken.
✓ Branch 181 → 184 taken 485 times.
2983 infer(sh_explicit_scaling_list_used_flag, 0);
3241 }
3242
3243
7/8
cbs_h266_read_slice_header:
✓ Branch 149 → 150 taken 8584 times.
✓ Branch 149 → 157 taken 526 times.
✓ Branch 150 → 151 taken 8565 times.
✓ Branch 150 → 152 taken 19 times.
cbs_h266_write_slice_header:
✓ Branch 184 → 185 taken 2588 times.
✗ Branch 184 → 192 not taken.
✓ Branch 185 → 186 taken 2585 times.
✓ Branch 185 → 187 taken 3 times.
11698 if (!pps->pps_rpl_info_in_ph_flag &&
3244
4/4
cbs_h266_read_slice_header:
✓ Branch 151 → 152 taken 1240 times.
✓ Branch 151 → 153 taken 7325 times.
cbs_h266_write_slice_header:
✓ Branch 186 → 187 taken 405 times.
✓ Branch 186 → 188 taken 2180 times.
11150 ((nal_unit_type != VVC_IDR_W_RADL &&
3245
4/4
cbs_h266_read_slice_header:
✓ Branch 152 → 153 taken 16 times.
✓ Branch 152 → 157 taken 1243 times.
cbs_h266_write_slice_header:
✓ Branch 187 → 188 taken 2 times.
✓ Branch 187 → 192 taken 406 times.
1667 nal_unit_type != VVC_IDR_N_LP) || sps->sps_idr_rpl_present_flag)) {
3246
2/4
cbs_h266_read_slice_header:
✗ Branch 154 → 155 not taken.
✓ Branch 154 → 156 taken 7341 times.
cbs_h266_write_slice_header:
✗ Branch 189 → 190 not taken.
✓ Branch 189 → 191 taken 2182 times.
9523 CHECK(FUNC(ref_pic_lists)
3247 (ctx, rw, sps, pps, &current->sh_ref_pic_lists));
3248 9523 ref_pic_lists = &current->sh_ref_pic_lists;
3249 } else {
3250 2175 ref_pic_lists = &ph->ph_ref_pic_lists;
3251 }
3252
4/4
cbs_h266_read_slice_header:
✓ Branch 158 → 159 taken 7783 times.
✓ Branch 158 → 160 taken 1327 times.
cbs_h266_write_slice_header:
✓ Branch 193 → 194 taken 2171 times.
✓ Branch 193 → 195 taken 417 times.
11698 if ((current->sh_slice_type != VVC_SLICE_TYPE_I &&
3253
4/4
cbs_h266_read_slice_header:
✓ Branch 159 → 160 taken 1225 times.
✓ Branch 159 → 162 taken 6558 times.
cbs_h266_write_slice_header:
✓ Branch 194 → 195 taken 407 times.
✓ Branch 194 → 197 taken 1764 times.
9954 ref_pic_lists->rpl_ref_list[0].num_ref_entries > 1) ||
3254
4/4
cbs_h266_read_slice_header:
✓ Branch 160 → 161 taken 658 times.
✓ Branch 160 → 179 taken 1894 times.
cbs_h266_write_slice_header:
✓ Branch 195 → 196 taken 147 times.
✓ Branch 195 → 216 taken 677 times.
3376 (current->sh_slice_type == VVC_SLICE_TYPE_B &&
3255
3/4
cbs_h266_read_slice_header:
✓ Branch 161 → 162 taken 30 times.
✓ Branch 161 → 179 taken 628 times.
cbs_h266_write_slice_header:
✗ Branch 196 → 197 not taken.
✓ Branch 196 → 216 taken 147 times.
805 ref_pic_lists->rpl_ref_list[1].num_ref_entries > 1)) {
3256
2/4
cbs_h266_read_slice_header:
✗ Branch 163 → 164 not taken.
✓ Branch 163 → 165 taken 6588 times.
cbs_h266_write_slice_header:
✗ Branch 198 → 199 not taken.
✓ Branch 198 → 200 taken 1764 times.
8352 flag(sh_num_ref_idx_active_override_flag);
3257
4/4
cbs_h266_read_slice_header:
✓ Branch 165 → 166 taken 218 times.
✓ Branch 165 → 178 taken 6370 times.
cbs_h266_write_slice_header:
✓ Branch 200 → 201 taken 20 times.
✓ Branch 200 → 215 taken 1744 times.
8352 if (current->sh_num_ref_idx_active_override_flag) {
3258 238 for (i = 0;
3259
7/8
cbs_h266_read_slice_header:
✓ Branch 174 → 175 taken 435 times.
✓ Branch 174 → 176 taken 146 times.
✓ Branch 177 → 167 taken 363 times.
✓ Branch 177 → 178 taken 218 times.
cbs_h266_write_slice_header:
✓ Branch 211 → 212 taken 60 times.
✗ Branch 211 → 213 not taken.
✓ Branch 214 → 202 taken 40 times.
✓ Branch 214 → 215 taken 20 times.
641 i < (current->sh_slice_type == VVC_SLICE_TYPE_B ? 2 : 1); i++)
3260
2/4
cbs_h266_read_slice_header:
✓ Branch 167 → 168 taken 363 times.
✗ Branch 167 → 172 not taken.
cbs_h266_write_slice_header:
✓ Branch 202 → 203 taken 40 times.
✗ Branch 202 → 207 not taken.
403 if (ref_pic_lists->rpl_ref_list[i].num_ref_entries > 1)
3261
2/4
cbs_h266_read_slice_header:
✗ Branch 169 → 170 not taken.
✓ Branch 169 → 171 taken 363 times.
cbs_h266_write_slice_header:
✗ Branch 204 → 205 not taken.
✓ Branch 204 → 206 taken 40 times.
403 ues(sh_num_ref_idx_active_minus1[i], 0, 14, 1, i);
3262 else
3263
0/2
✗ Branch 207 → 208 not taken.
✗ Branch 207 → 210 not taken.
✗ infer(sh_num_ref_idx_active_minus1[i], 0);
3264 }
3265 } else {
3266
1/2
✗ Branch 216 → 217 not taken.
✓ Branch 216 → 219 taken 824 times.
3346 infer(sh_num_ref_idx_active_override_flag, 1);
3267 }
3268
3269
4/4
cbs_h266_read_slice_header:
✓ Branch 193 → 181 taken 18220 times.
✓ Branch 193 → 194 taken 9110 times.
cbs_h266_write_slice_header:
✓ Branch 232 → 220 taken 5176 times.
✓ Branch 232 → 233 taken 2588 times.
35094 for (i = 0; i < 2; i++) {
3270
4/4
cbs_h266_read_slice_header:
✓ Branch 181 → 182 taken 7154 times.
✓ Branch 181 → 184 taken 11066 times.
cbs_h266_write_slice_header:
✓ Branch 220 → 221 taken 2926 times.
✓ Branch 220 → 223 taken 2250 times.
23396 if (current->sh_slice_type == VVC_SLICE_TYPE_B ||
3271
8/8
cbs_h266_read_slice_header:
✓ Branch 182 → 183 taken 4500 times.
✓ Branch 182 → 191 taken 2654 times.
✓ Branch 183 → 184 taken 2250 times.
✓ Branch 183 → 191 taken 2250 times.
cbs_h266_write_slice_header:
✓ Branch 221 → 222 taken 2092 times.
✓ Branch 221 → 230 taken 834 times.
✓ Branch 222 → 223 taken 1046 times.
✓ Branch 222 → 230 taken 1046 times.
10080 (current->sh_slice_type == VVC_SLICE_TYPE_P && i == 0)) {
3272
4/4
cbs_h266_read_slice_header:
✓ Branch 184 → 185 taken 2186 times.
✓ Branch 184 → 186 taken 11130 times.
cbs_h266_write_slice_header:
✓ Branch 223 → 224 taken 594 times.
✓ Branch 223 → 225 taken 2702 times.
16612 if (current->sh_num_ref_idx_active_override_flag) {
3273 2780 current->num_ref_idx_active[i] = current->sh_num_ref_idx_active_minus1[i] + 1;
3274 } else {
3275 13832 current->num_ref_idx_active[i] =
3276 13832 FFMIN(ref_pic_lists->rpl_ref_list[i].num_ref_entries,
3277 pps->pps_num_ref_idx_default_active_minus1[i] + 1);
3278 }
3279
3280
2/4
cbs_h266_read_slice_header:
✗ Branch 187 → 188 not taken.
✓ Branch 187 → 190 taken 13316 times.
cbs_h266_write_slice_header:
✗ Branch 226 → 227 not taken.
✓ Branch 226 → 229 taken 3296 times.
16612 if (current->num_ref_idx_active[i] <= 0) {
3281 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
3282 "Inter slice but no reference pictures available for RPL%d.\n", i);
3283 ✗ return AVERROR_INVALIDDATA;
3284 }
3285 } else {
3286 6784 current->num_ref_idx_active[i] = 0;
3287 }
3288 }
3289
3290
4/4
cbs_h266_read_slice_header:
✓ Branch 194 → 195 taken 7783 times.
✓ Branch 194 → 231 taken 1327 times.
cbs_h266_write_slice_header:
✓ Branch 233 → 234 taken 2171 times.
✓ Branch 233 → 280 taken 417 times.
11698 if (current->sh_slice_type != VVC_SLICE_TYPE_I) {
3291
3/4
cbs_h266_read_slice_header:
✓ Branch 195 → 196 taken 7669 times.
✓ Branch 195 → 200 taken 114 times.
cbs_h266_write_slice_header:
✓ Branch 234 → 235 taken 2171 times.
✗ Branch 234 → 238 not taken.
9954 if (pps->pps_cabac_init_present_flag)
3292
2/4
cbs_h266_read_slice_header:
✗ Branch 197 → 198 not taken.
✓ Branch 197 → 199 taken 7669 times.
cbs_h266_write_slice_header:
✗ Branch 236 → 237 not taken.
✓ Branch 236 → 241 taken 2171 times.
9840 flag(sh_cabac_init_flag);
3293 else
3294
0/2
✗ Branch 238 → 239 not taken.
✗ Branch 238 → 241 not taken.
114 infer(sh_cabac_init_flag, 0);
3295
3/4
cbs_h266_read_slice_header:
✓ Branch 201 → 202 taken 7688 times.
✓ Branch 201 → 223 taken 95 times.
cbs_h266_write_slice_header:
✓ Branch 241 → 242 taken 2171 times.
✗ Branch 241 → 272 not taken.
9954 if (ph->ph_temporal_mvp_enabled_flag) {
3296
3/4
cbs_h266_read_slice_header:
✓ Branch 202 → 203 taken 7186 times.
✓ Branch 202 → 219 taken 502 times.
cbs_h266_write_slice_header:
✓ Branch 242 → 243 taken 2171 times.
✗ Branch 242 → 262 not taken.
9859 if (!pps->pps_rpl_info_in_ph_flag) {
3297
4/4
cbs_h266_read_slice_header:
✓ Branch 203 → 204 taken 4947 times.
✓ Branch 203 → 208 taken 2239 times.
cbs_h266_write_slice_header:
✓ Branch 243 → 244 taken 1125 times.
✓ Branch 243 → 247 taken 1046 times.
9357 if (current->sh_slice_type == VVC_SLICE_TYPE_B)
3298
2/4
cbs_h266_read_slice_header:
✗ Branch 205 → 206 not taken.
✓ Branch 205 → 207 taken 4947 times.
cbs_h266_write_slice_header:
✗ Branch 245 → 246 not taken.
✓ Branch 245 → 250 taken 1125 times.
6072 flag(sh_collocated_from_l0_flag);
3299 else
3300
1/2
✗ Branch 247 → 248 not taken.
✓ Branch 247 → 250 taken 1046 times.
3285 infer(sh_collocated_from_l0_flag, 1);
3301
4/4
cbs_h266_read_slice_header:
✓ Branch 209 → 210 taken 3923 times.
✓ Branch 209 → 211 taken 3263 times.
cbs_h266_write_slice_header:
✓ Branch 250 → 251 taken 1425 times.
✓ Branch 250 → 252 taken 746 times.
9357 if ((current->sh_collocated_from_l0_flag &&
3302
4/4
cbs_h266_read_slice_header:
✓ Branch 210 → 211 taken 611 times.
✓ Branch 210 → 213 taken 3312 times.
cbs_h266_write_slice_header:
✓ Branch 251 → 252 taken 260 times.
✓ Branch 251 → 254 taken 1165 times.
5348 current->num_ref_idx_active[0] > 1) ||
3303
4/4
cbs_h266_read_slice_header:
✓ Branch 211 → 212 taken 3263 times.
✓ Branch 211 → 217 taken 611 times.
cbs_h266_write_slice_header:
✓ Branch 252 → 253 taken 746 times.
✓ Branch 252 → 258 taken 260 times.
4880 (!current->sh_collocated_from_l0_flag &&
3304
4/4
cbs_h266_read_slice_header:
✓ Branch 212 → 213 taken 2565 times.
✓ Branch 212 → 217 taken 698 times.
cbs_h266_write_slice_header:
✓ Branch 253 → 254 taken 599 times.
✓ Branch 253 → 258 taken 147 times.
5773 current->num_ref_idx_active[1] > 1)) {
3305 7641 unsigned int idx = current->sh_collocated_from_l0_flag ? 0 : 1;
3306
2/4
cbs_h266_read_slice_header:
✗ Branch 214 → 215 not taken.
✓ Branch 214 → 216 taken 5877 times.
cbs_h266_write_slice_header:
✗ Branch 255 → 256 not taken.
✓ Branch 255 → 257 taken 1764 times.
7641 ue(sh_collocated_ref_idx, 0, current->num_ref_idx_active[idx] - 1);
3307 } else {
3308
1/2
✗ Branch 258 → 259 not taken.
✓ Branch 258 → 261 taken 407 times.
1716 infer(sh_collocated_ref_idx, 0);
3309 }
3310 } else {
3311
2/4
cbs_h266_read_slice_header:
✓ Branch 219 → 220 taken 500 times.
✓ Branch 219 → 221 taken 2 times.
cbs_h266_write_slice_header:
✗ Branch 262 → 263 not taken.
✗ Branch 262 → 266 not taken.
502 if (current->sh_slice_type == VVC_SLICE_TYPE_B)
3312
0/2
✗ Branch 263 → 264 not taken.
✗ Branch 263 → 269 not taken.
500 infer(sh_collocated_from_l0_flag, ph->ph_collocated_from_l0_flag);
3313 else
3314
0/2
✗ Branch 266 → 267 not taken.
✗ Branch 266 → 269 not taken.
2 infer(sh_collocated_from_l0_flag, 1);
3315
0/2
✗ Branch 269 → 270 not taken.
✗ Branch 269 → 272 not taken.
502 infer(sh_collocated_ref_idx, ph->ph_collocated_ref_idx);
3316 }
3317 }
3318
2/4
cbs_h266_read_slice_header:
✓ Branch 223 → 224 taken 7783 times.
✗ Branch 223 → 231 not taken.
cbs_h266_write_slice_header:
✓ Branch 272 → 273 taken 2171 times.
✗ Branch 272 → 280 not taken.
9954 if (!pps->pps_wp_info_in_ph_flag &&
3319
4/4
cbs_h266_read_slice_header:
✓ Branch 224 → 225 taken 182 times.
✓ Branch 224 → 226 taken 7601 times.
cbs_h266_write_slice_header:
✓ Branch 273 → 274 taken 16 times.
✓ Branch 273 → 275 taken 2155 times.
9954 ((pps->pps_weighted_pred_flag &&
3320
3/4
cbs_h266_read_slice_header:
✓ Branch 225 → 226 taken 156 times.
✓ Branch 225 → 228 taken 26 times.
cbs_h266_write_slice_header:
✓ Branch 274 → 275 taken 16 times.
✗ Branch 274 → 277 not taken.
198 current->sh_slice_type == VVC_SLICE_TYPE_P) ||
3321
4/4
cbs_h266_read_slice_header:
✓ Branch 226 → 227 taken 156 times.
✓ Branch 226 → 231 taken 7601 times.
cbs_h266_write_slice_header:
✓ Branch 275 → 276 taken 16 times.
✓ Branch 275 → 280 taken 2155 times.
9928 (pps->pps_weighted_bipred_flag &&
3322
2/4
cbs_h266_read_slice_header:
✓ Branch 227 → 228 taken 156 times.
✗ Branch 227 → 231 not taken.
cbs_h266_write_slice_header:
✓ Branch 276 → 277 taken 16 times.
✗ Branch 276 → 280 not taken.
172 current->sh_slice_type == VVC_SLICE_TYPE_B))) {
3323
2/4
cbs_h266_read_slice_header:
✗ Branch 229 → 230 not taken.
✓ Branch 229 → 231 taken 182 times.
cbs_h266_write_slice_header:
✗ Branch 278 → 279 not taken.
✓ Branch 278 → 280 taken 16 times.
198 CHECK(FUNC(pred_weight_table) (ctx, rw, sps, pps, ref_pic_lists,
3324 current->num_ref_idx_active,
3325 &current->sh_pred_weight_table));
3326 }
3327 }
3328 11698 qp_bd_offset = 6 * sps->sps_bitdepth_minus8;
3329
3/4
cbs_h266_read_slice_header:
✓ Branch 231 → 232 taken 8578 times.
✓ Branch 231 → 236 taken 532 times.
cbs_h266_write_slice_header:
✓ Branch 280 → 281 taken 2588 times.
✗ Branch 280 → 285 not taken.
11698 if (!pps->pps_qp_delta_info_in_ph_flag)
3330
2/4
cbs_h266_read_slice_header:
✗ Branch 233 → 234 not taken.
✓ Branch 233 → 235 taken 8578 times.
cbs_h266_write_slice_header:
✗ Branch 282 → 283 not taken.
✓ Branch 282 → 284 taken 2588 times.
11166 se(sh_qp_delta, -qp_bd_offset - (26 + pps->pps_init_qp_minus26),
3331 63 - (26 + pps->pps_init_qp_minus26));
3332
3/4
cbs_h266_read_slice_header:
✓ Branch 236 → 237 taken 184 times.
✓ Branch 236 → 260 taken 8926 times.
cbs_h266_write_slice_header:
✗ Branch 285 → 286 not taken.
✓ Branch 285 → 311 taken 2588 times.
11698 if (pps->pps_slice_chroma_qp_offsets_present_flag) {
3333 int8_t off;
3334
3335
1/4
cbs_h266_read_slice_header:
✗ Branch 238 → 239 not taken.
✓ Branch 238 → 240 taken 184 times.
cbs_h266_write_slice_header:
✗ Branch 287 → 288 not taken.
✗ Branch 287 → 289 not taken.
184 se(sh_cb_qp_offset, -12, 12);
3336 184 off = pps->pps_cb_qp_offset + current->sh_cb_qp_offset;
3337
2/8
cbs_h266_read_slice_header:
✓ Branch 240 → 241 taken 184 times.
✗ Branch 240 → 242 not taken.
✗ Branch 241 → 242 not taken.
✓ Branch 241 → 244 taken 184 times.
cbs_h266_write_slice_header:
✗ Branch 289 → 290 not taken.
✗ Branch 289 → 291 not taken.
✗ Branch 290 → 291 not taken.
✗ Branch 290 → 293 not taken.
184 if (off < -12 || off > 12) {
3338 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
3339 "pps_cb_qp_offset + sh_cb_qp_offset (%d) not in range [-12, 12].\n",
3340 off);
3341 ✗ return AVERROR_INVALIDDATA;
3342 }
3343
3344
1/4
cbs_h266_read_slice_header:
✗ Branch 245 → 246 not taken.
✓ Branch 245 → 247 taken 184 times.
cbs_h266_write_slice_header:
✗ Branch 294 → 295 not taken.
✗ Branch 294 → 296 not taken.
184 se(sh_cr_qp_offset, -12, 12);
3345 184 off = pps->pps_cr_qp_offset + current->sh_cr_qp_offset;
3346
2/8
cbs_h266_read_slice_header:
✓ Branch 247 → 248 taken 184 times.
✗ Branch 247 → 249 not taken.
✗ Branch 248 → 249 not taken.
✓ Branch 248 → 251 taken 184 times.
cbs_h266_write_slice_header:
✗ Branch 296 → 297 not taken.
✗ Branch 296 → 298 not taken.
✗ Branch 297 → 298 not taken.
✗ Branch 297 → 300 not taken.
184 if (off < -12 || off > 12) {
3347 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
3348 "pps_cr_qp_offset + sh_cr_qp_offset (%d) not in range [-12, 12].\n",
3349 off);
3350 ✗ return AVERROR_INVALIDDATA;
3351 }
3352
3353
2/4
cbs_h266_read_slice_header:
✓ Branch 251 → 252 taken 123 times.
✓ Branch 251 → 259 taken 61 times.
cbs_h266_write_slice_header:
✗ Branch 300 → 301 not taken.
✗ Branch 300 → 308 not taken.
184 if (sps->sps_joint_cbcr_enabled_flag) {
3354
1/4
cbs_h266_read_slice_header:
✗ Branch 253 → 254 not taken.
✓ Branch 253 → 255 taken 123 times.
cbs_h266_write_slice_header:
✗ Branch 302 → 303 not taken.
✗ Branch 302 → 304 not taken.
123 se(sh_joint_cbcr_qp_offset, -12, 12);
3355 123 off =
3356 123 pps->pps_joint_cbcr_qp_offset_value +
3357 123 current->sh_joint_cbcr_qp_offset;
3358
2/8
cbs_h266_read_slice_header:
✓ Branch 255 → 256 taken 123 times.
✗ Branch 255 → 257 not taken.
✗ Branch 256 → 257 not taken.
✓ Branch 256 → 261 taken 123 times.
cbs_h266_write_slice_header:
✗ Branch 304 → 305 not taken.
✗ Branch 304 → 306 not taken.
✗ Branch 305 → 306 not taken.
✗ Branch 305 → 320 not taken.
123 if (off < -12 || off > 12) {
3359 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR,
3360 "pps_joint_cbcr_qp_offset_value + sh_joint_cbcr_qp_offset (%d)"
3361 "not in range [-12, 12]. \n", off);
3362 ✗ return AVERROR_INVALIDDATA;
3363 }
3364 } else {
3365
0/2
✗ Branch 308 → 309 not taken.
✗ Branch 308 → 320 not taken.
61 infer(sh_joint_cbcr_qp_offset, 0);
3366 }
3367 } else {
3368
1/2
✗ Branch 311 → 312 not taken.
✓ Branch 311 → 314 taken 2588 times.
11514 infer(sh_cb_qp_offset, 0);
3369
1/2
✗ Branch 314 → 315 not taken.
✓ Branch 314 → 317 taken 2588 times.
11514 infer(sh_cr_qp_offset, 0);
3370
1/2
✗ Branch 317 → 318 not taken.
✓ Branch 317 → 320 taken 2588 times.
11514 infer(sh_joint_cbcr_qp_offset, 0);
3371 }
3372
3/4
cbs_h266_read_slice_header:
✓ Branch 261 → 262 taken 123 times.
✓ Branch 261 → 266 taken 8987 times.
cbs_h266_write_slice_header:
✗ Branch 320 → 321 not taken.
✓ Branch 320 → 324 taken 2588 times.
11698 if (pps->pps_cu_chroma_qp_offset_list_enabled_flag)
3373
1/4
cbs_h266_read_slice_header:
✗ Branch 263 → 264 not taken.
✓ Branch 263 → 265 taken 123 times.
cbs_h266_write_slice_header:
✗ Branch 322 → 323 not taken.
✗ Branch 322 → 327 not taken.
123 flag(sh_cu_chroma_qp_offset_enabled_flag);
3374 else
3375
1/2
✗ Branch 324 → 325 not taken.
✓ Branch 324 → 327 taken 2588 times.
11575 infer(sh_cu_chroma_qp_offset_enabled_flag, 0);
3376
7/8
cbs_h266_read_slice_header:
✓ Branch 267 → 268 taken 6252 times.
✓ Branch 267 → 279 taken 2858 times.
✓ Branch 268 → 269 taken 5708 times.
✓ Branch 268 → 279 taken 544 times.
cbs_h266_write_slice_header:
✓ Branch 327 → 328 taken 1306 times.
✓ Branch 327 → 340 taken 1282 times.
✓ Branch 328 → 329 taken 1306 times.
✗ Branch 328 → 340 not taken.
11698 if (sps->sps_sao_enabled_flag && !pps->pps_sao_info_in_ph_flag) {
3377
2/4
cbs_h266_read_slice_header:
✗ Branch 270 → 271 not taken.
✓ Branch 270 → 272 taken 5708 times.
cbs_h266_write_slice_header:
✗ Branch 330 → 331 not taken.
✓ Branch 330 → 332 taken 1306 times.
7014 flag(sh_sao_luma_used_flag);
3378
4/4
cbs_h266_read_slice_header:
✓ Branch 272 → 273 taken 5450 times.
✓ Branch 272 → 277 taken 258 times.
cbs_h266_write_slice_header:
✓ Branch 332 → 333 taken 1242 times.
✓ Branch 332 → 336 taken 64 times.
7014 if (sps->sps_chroma_format_idc != 0)
3379
2/4
cbs_h266_read_slice_header:
✗ Branch 274 → 275 not taken.
✓ Branch 274 → 276 taken 5450 times.
cbs_h266_write_slice_header:
✗ Branch 334 → 335 not taken.
✓ Branch 334 → 339 taken 1242 times.
6692 flag(sh_sao_chroma_used_flag);
3380 else
3381
1/2
✗ Branch 336 → 337 not taken.
✓ Branch 336 → 339 taken 64 times.
322 infer(sh_sao_chroma_used_flag, ph->ph_sao_chroma_enabled_flag);
3382 } else {
3383
1/2
✗ Branch 340 → 341 not taken.
✓ Branch 340 → 343 taken 1282 times.
4684 infer(sh_sao_luma_used_flag, ph->ph_sao_luma_enabled_flag);
3384
1/2
✗ Branch 343 → 344 not taken.
✓ Branch 343 → 346 taken 1282 times.
4684 infer(sh_sao_chroma_used_flag, ph->ph_sao_chroma_enabled_flag);
3385 }
3386
3387
3/4
cbs_h266_read_slice_header:
✓ Branch 280 → 281 taken 289 times.
✓ Branch 280 → 286 taken 8821 times.
cbs_h266_write_slice_header:
✗ Branch 346 → 347 not taken.
✓ Branch 346 → 352 taken 2588 times.
11698 if (pps->pps_deblocking_filter_override_enabled_flag &&
3388
2/4
cbs_h266_read_slice_header:
✓ Branch 281 → 282 taken 250 times.
✓ Branch 281 → 286 taken 39 times.
cbs_h266_write_slice_header:
✗ Branch 347 → 348 not taken.
✗ Branch 347 → 352 not taken.
289 !pps->pps_dbf_info_in_ph_flag)
3389
1/4
cbs_h266_read_slice_header:
✗ Branch 283 → 284 not taken.
✓ Branch 283 → 285 taken 250 times.
cbs_h266_write_slice_header:
✗ Branch 349 → 350 not taken.
✗ Branch 349 → 351 not taken.
250 flag(sh_deblocking_params_present_flag);
3390 else
3391
1/2
✗ Branch 352 → 353 not taken.
✓ Branch 352 → 355 taken 2588 times.
11448 infer(sh_deblocking_params_present_flag, 0);
3392
3/4
cbs_h266_read_slice_header:
✓ Branch 287 → 288 taken 250 times.
✓ Branch 287 → 316 taken 8860 times.
cbs_h266_write_slice_header:
✗ Branch 355 → 356 not taken.
✓ Branch 355 → 396 taken 2588 times.
11698 if (current->sh_deblocking_params_present_flag) {
3393
1/4
cbs_h266_read_slice_header:
✓ Branch 288 → 289 taken 250 times.
✗ Branch 288 → 293 not taken.
cbs_h266_write_slice_header:
✗ Branch 356 → 357 not taken.
✗ Branch 356 → 360 not taken.
250 if (!pps->pps_deblocking_filter_disabled_flag)
3394
1/4
cbs_h266_read_slice_header:
✗ Branch 290 → 291 not taken.
✓ Branch 290 → 292 taken 250 times.
cbs_h266_write_slice_header:
✗ Branch 358 → 359 not taken.
✗ Branch 358 → 363 not taken.
250 flag(sh_deblocking_filter_disabled_flag);
3395 else
3396
0/2
✗ Branch 360 → 361 not taken.
✗ Branch 360 → 363 not taken.
✗ infer(sh_deblocking_filter_disabled_flag, 0);
3397
2/4
cbs_h266_read_slice_header:
✓ Branch 294 → 295 taken 166 times.
✓ Branch 294 → 318 taken 84 times.
cbs_h266_write_slice_header:
✗ Branch 363 → 364 not taken.
✗ Branch 363 → 418 not taken.
250 if (!current->sh_deblocking_filter_disabled_flag) {
3398
1/4
cbs_h266_read_slice_header:
✗ Branch 296 → 297 not taken.
✓ Branch 296 → 298 taken 166 times.
cbs_h266_write_slice_header:
✗ Branch 365 → 366 not taken.
✗ Branch 365 → 367 not taken.
166 se(sh_luma_beta_offset_div2, -12, 12);
3399
1/4
cbs_h266_read_slice_header:
✗ Branch 299 → 300 not taken.
✓ Branch 299 → 301 taken 166 times.
cbs_h266_write_slice_header:
✗ Branch 368 → 369 not taken.
✗ Branch 368 → 370 not taken.
166 se(sh_luma_tc_offset_div2, -12, 12);
3400
2/4
cbs_h266_read_slice_header:
✓ Branch 301 → 302 taken 36 times.
✓ Branch 301 → 315 taken 130 times.
cbs_h266_write_slice_header:
✗ Branch 370 → 371 not taken.
✗ Branch 370 → 384 not taken.
166 if (pps->pps_chroma_tool_offsets_present_flag) {
3401
1/4
cbs_h266_read_slice_header:
✗ Branch 303 → 304 not taken.
✓ Branch 303 → 305 taken 36 times.
cbs_h266_write_slice_header:
✗ Branch 372 → 373 not taken.
✗ Branch 372 → 374 not taken.
36 se(sh_cb_beta_offset_div2, -12, 12);
3402
1/4
cbs_h266_read_slice_header:
✗ Branch 306 → 307 not taken.
✓ Branch 306 → 308 taken 36 times.
cbs_h266_write_slice_header:
✗ Branch 375 → 376 not taken.
✗ Branch 375 → 377 not taken.
36 se(sh_cb_tc_offset_div2, -12, 12);
3403
1/4
cbs_h266_read_slice_header:
✗ Branch 309 → 310 not taken.
✓ Branch 309 → 311 taken 36 times.
cbs_h266_write_slice_header:
✗ Branch 378 → 379 not taken.
✗ Branch 378 → 380 not taken.
36 se(sh_cr_beta_offset_div2, -12, 12);
3404
1/4
cbs_h266_read_slice_header:
✗ Branch 312 → 313 not taken.
✓ Branch 312 → 314 taken 36 times.
cbs_h266_write_slice_header:
✗ Branch 381 → 382 not taken.
✗ Branch 381 → 383 not taken.
36 se(sh_cr_tc_offset_div2, -12, 12);
3405 } else {
3406
0/2
✗ Branch 384 → 385 not taken.
✗ Branch 384 → 387 not taken.
130 infer(sh_cb_beta_offset_div2,
3407 current->sh_luma_beta_offset_div2);
3408
0/2
✗ Branch 387 → 388 not taken.
✗ Branch 387 → 390 not taken.
130 infer(sh_cb_tc_offset_div2, current->sh_luma_tc_offset_div2);
3409
0/2
✗ Branch 390 → 391 not taken.
✗ Branch 390 → 393 not taken.
130 infer(sh_cr_beta_offset_div2,
3410 current->sh_luma_beta_offset_div2);
3411
0/2
✗ Branch 393 → 394 not taken.
✗ Branch 393 → 418 not taken.
130 infer(sh_cr_tc_offset_div2, current->sh_luma_tc_offset_div2);
3412 }
3413 }
3414 } else {
3415
1/2
✗ Branch 396 → 397 not taken.
✓ Branch 396 → 399 taken 2588 times.
11448 infer(sh_deblocking_filter_disabled_flag, ph->ph_deblocking_filter_disabled_flag);
3416
4/4
cbs_h266_read_slice_header:
✓ Branch 316 → 317 taken 6294 times.
✓ Branch 316 → 318 taken 2566 times.
cbs_h266_write_slice_header:
✓ Branch 399 → 400 taken 1308 times.
✓ Branch 399 → 418 taken 1280 times.
11448 if (!current->sh_deblocking_filter_disabled_flag) {
3417
1/2
✗ Branch 400 → 401 not taken.
✓ Branch 400 → 403 taken 1308 times.
7602 infer(sh_luma_beta_offset_div2, ph->ph_luma_beta_offset_div2);
3418
1/2
✗ Branch 403 → 404 not taken.
✓ Branch 403 → 406 taken 1308 times.
7602 infer(sh_luma_tc_offset_div2, ph->ph_luma_tc_offset_div2);
3419
1/2
✗ Branch 406 → 407 not taken.
✓ Branch 406 → 409 taken 1308 times.
7602 infer(sh_cb_beta_offset_div2, ph->ph_cb_beta_offset_div2);
3420
1/2
✗ Branch 409 → 410 not taken.
✓ Branch 409 → 412 taken 1308 times.
7602 infer(sh_cb_tc_offset_div2, ph->ph_cb_tc_offset_div2);
3421
1/2
✗ Branch 412 → 413 not taken.
✓ Branch 412 → 415 taken 1308 times.
7602 infer(sh_cr_beta_offset_div2, ph->ph_cr_beta_offset_div2);
3422
1/2
✗ Branch 415 → 416 not taken.
✓ Branch 415 → 418 taken 1308 times.
7602 infer(sh_cr_tc_offset_div2, ph->ph_cr_tc_offset_div2);
3423 }
3424 }
3425
3426
4/4
cbs_h266_read_slice_header:
✓ Branch 318 → 319 taken 6213 times.
✓ Branch 318 → 323 taken 2897 times.
cbs_h266_write_slice_header:
✓ Branch 418 → 419 taken 1308 times.
✓ Branch 418 → 422 taken 1280 times.
11698 if (sps->sps_dep_quant_enabled_flag)
3427
2/4
cbs_h266_read_slice_header:
✗ Branch 320 → 321 not taken.
✓ Branch 320 → 322 taken 6213 times.
cbs_h266_write_slice_header:
✗ Branch 420 → 421 not taken.
✓ Branch 420 → 425 taken 1308 times.
7521 flag(sh_dep_quant_used_flag);
3428 else
3429
1/2
✗ Branch 422 → 423 not taken.
✓ Branch 422 → 425 taken 1280 times.
4177 infer(sh_dep_quant_used_flag, 0);
3430
3431
3/4
cbs_h266_read_slice_header:
✓ Branch 324 → 325 taken 275 times.
✓ Branch 324 → 330 taken 8835 times.
cbs_h266_write_slice_header:
✗ Branch 425 → 426 not taken.
✓ Branch 425 → 431 taken 2588 times.
11698 if (sps->sps_sign_data_hiding_enabled_flag &&
3432
1/4
cbs_h266_read_slice_header:
✓ Branch 325 → 326 taken 275 times.
✗ Branch 325 → 330 not taken.
cbs_h266_write_slice_header:
✗ Branch 426 → 427 not taken.
✗ Branch 426 → 431 not taken.
275 !current->sh_dep_quant_used_flag)
3433
1/4
cbs_h266_read_slice_header:
✗ Branch 327 → 328 not taken.
✓ Branch 327 → 329 taken 275 times.
cbs_h266_write_slice_header:
✗ Branch 428 → 429 not taken.
✗ Branch 428 → 430 not taken.
275 flag(sh_sign_data_hiding_used_flag);
3434 else
3435
1/2
✗ Branch 431 → 432 not taken.
✓ Branch 431 → 434 taken 2588 times.
11423 infer(sh_sign_data_hiding_used_flag, 0);
3436
3437
4/4
cbs_h266_read_slice_header:
✓ Branch 331 → 332 taken 6075 times.
✓ Branch 331 → 338 taken 3035 times.
cbs_h266_write_slice_header:
✓ Branch 434 → 435 taken 1306 times.
✓ Branch 434 → 441 taken 1282 times.
11698 if (sps->sps_transform_skip_enabled_flag &&
3438
2/4
cbs_h266_read_slice_header:
✗ Branch 332 → 333 not taken.
✓ Branch 332 → 338 taken 6075 times.
cbs_h266_write_slice_header:
✗ Branch 435 → 436 not taken.
✓ Branch 435 → 441 taken 1306 times.
7381 !current->sh_dep_quant_used_flag &&
3439
0/4
cbs_h266_read_slice_header:
✗ Branch 333 → 334 not taken.
✗ Branch 333 → 338 not taken.
cbs_h266_write_slice_header:
✗ Branch 436 → 437 not taken.
✗ Branch 436 → 441 not taken.
✗ !current->sh_sign_data_hiding_used_flag)
3440
0/4
cbs_h266_read_slice_header:
✗ Branch 335 → 336 not taken.
✗ Branch 335 → 337 not taken.
cbs_h266_write_slice_header:
✗ Branch 438 → 439 not taken.
✗ Branch 438 → 440 not taken.
✗ flag(sh_ts_residual_coding_disabled_flag);
3441 else
3442
1/2
✗ Branch 441 → 442 not taken.
✓ Branch 441 → 444 taken 2588 times.
11698 infer(sh_ts_residual_coding_disabled_flag, 0);
3443
3444
2/4
cbs_h266_read_slice_header:
✓ Branch 339 → 340 taken 9110 times.
✗ Branch 339 → 345 not taken.
cbs_h266_write_slice_header:
✓ Branch 444 → 445 taken 2588 times.
✗ Branch 444 → 450 not taken.
11698 if (!current->sh_ts_residual_coding_disabled_flag &&
3445
2/4
cbs_h266_read_slice_header:
✗ Branch 340 → 341 not taken.
✓ Branch 340 → 345 taken 9110 times.
cbs_h266_write_slice_header:
✗ Branch 445 → 446 not taken.
✓ Branch 445 → 450 taken 2588 times.
11698 sps->sps_ts_residual_coding_rice_present_in_sh_flag)
3446
0/4
cbs_h266_read_slice_header:
✗ Branch 342 → 343 not taken.
✗ Branch 342 → 344 not taken.
cbs_h266_write_slice_header:
✗ Branch 447 → 448 not taken.
✗ Branch 447 → 449 not taken.
✗ ub(3, sh_ts_residual_coding_rice_idx_minus1);
3447 else
3448
1/2
✗ Branch 450 → 451 not taken.
✓ Branch 450 → 453 taken 2588 times.
11698 infer(sh_ts_residual_coding_rice_idx_minus1, 0);
3449
3450
2/4
cbs_h266_read_slice_header:
✗ Branch 346 → 347 not taken.
✓ Branch 346 → 351 taken 9110 times.
cbs_h266_write_slice_header:
✗ Branch 453 → 454 not taken.
✓ Branch 453 → 457 taken 2588 times.
11698 if (sps->sps_reverse_last_sig_coeff_enabled_flag)
3451
0/4
cbs_h266_read_slice_header:
✗ Branch 348 → 349 not taken.
✗ Branch 348 → 350 not taken.
cbs_h266_write_slice_header:
✗ Branch 455 → 456 not taken.
✗ Branch 455 → 460 not taken.
✗ flag(sh_reverse_last_sig_coeff_flag);
3452 else
3453
1/2
✗ Branch 457 → 458 not taken.
✓ Branch 457 → 460 taken 2588 times.
11698 infer(sh_reverse_last_sig_coeff_flag, 0);
3454
3455
2/4
cbs_h266_read_slice_header:
✗ Branch 352 → 353 not taken.
✓ Branch 352 → 362 taken 9110 times.
cbs_h266_write_slice_header:
✗ Branch 460 → 461 not taken.
✓ Branch 460 → 470 taken 2588 times.
11698 if (pps->pps_slice_header_extension_present_flag) {
3456
0/4
cbs_h266_read_slice_header:
✗ Branch 354 → 355 not taken.
✗ Branch 354 → 356 not taken.
cbs_h266_write_slice_header:
✗ Branch 462 → 463 not taken.
✗ Branch 462 → 464 not taken.
✗ ue(sh_slice_header_extension_length, 0, 256);
3457
0/4
cbs_h266_read_slice_header:
✗ Branch 361 → 357 not taken.
✗ Branch 361 → 362 not taken.
cbs_h266_write_slice_header:
✗ Branch 469 → 465 not taken.
✗ Branch 469 → 470 not taken.
✗ for (i = 0; i < current->sh_slice_header_extension_length; i++)
3458
0/4
cbs_h266_read_slice_header:
✗ Branch 358 → 359 not taken.
✗ Branch 358 → 360 not taken.
cbs_h266_write_slice_header:
✗ Branch 466 → 467 not taken.
✗ Branch 466 → 468 not taken.
✗ us(8, sh_slice_header_extension_data_byte[i], 0x00, 0xff, 1, i);
3459 }
3460
3461 11698 current->num_entry_points = 0;
3462
3/4
cbs_h266_read_slice_header:
✓ Branch 362 → 363 taken 8926 times.
✓ Branch 362 → 416 taken 184 times.
cbs_h266_write_slice_header:
✓ Branch 470 → 471 taken 2588 times.
✗ Branch 470 → 524 not taken.
11698 if (sps->sps_entry_point_offsets_present_flag) {
3463 11514 uint8_t entropy_sync = sps->sps_entropy_coding_sync_enabled_flag;
3464 int height;
3465
4/4
cbs_h266_read_slice_header:
✓ Branch 363 → 364 taken 2043 times.
✓ Branch 363 → 397 taken 6883 times.
cbs_h266_write_slice_header:
✓ Branch 471 → 472 taken 317 times.
✓ Branch 471 → 505 taken 2271 times.
11514 if (pps->pps_rect_slice_flag) {
3466 int width_in_tiles;
3467 2360 int slice_idx = current->sh_slice_address;
3468
4/4
cbs_h266_read_slice_header:
✓ Branch 366 → 365 taken 2000 times.
✓ Branch 366 → 367 taken 2043 times.
cbs_h266_write_slice_header:
✓ Branch 474 → 473 taken 40 times.
✓ Branch 474 → 475 taken 317 times.
4400 for (i = 0; i < current->curr_subpic_idx; i++) {
3469 2040 slice_idx += pps->num_slices_in_subpic[i];
3470 }
3471
2/4
cbs_h266_read_slice_header:
✗ Branch 367 → 368 not taken.
✓ Branch 367 → 370 taken 2043 times.
cbs_h266_write_slice_header:
✗ Branch 475 → 476 not taken.
✓ Branch 475 → 478 taken 317 times.
2360 if (slice_idx > pps->pps_num_slices_in_pic_minus1) {
3472 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid slice address %d\n", slice_idx);
3473 ✗ return AVERROR_INVALIDDATA;
3474 }
3475
3476
3/4
cbs_h266_read_slice_header:
✓ Branch 370 → 371 taken 523 times.
✓ Branch 370 → 393 taken 1520 times.
cbs_h266_write_slice_header:
✗ Branch 478 → 479 not taken.
✓ Branch 478 → 501 taken 317 times.
2360 if (pps->pps_single_slice_per_subpic_flag) {
3477 int width_in_ctus, height_in_ctus;
3478
2/4
cbs_h266_read_slice_header:
✓ Branch 371 → 372 taken 520 times.
✓ Branch 371 → 373 taken 3 times.
cbs_h266_write_slice_header:
✗ Branch 479 → 480 not taken.
✗ Branch 479 → 481 not taken.
523 if (sps->sps_subpic_info_present_flag) {
3479 520 width_in_ctus = sps->sps_subpic_width_minus1[slice_idx] + 1;
3480 520 height_in_ctus = sps->sps_subpic_height_minus1[slice_idx] + 1;
3481 } else {
3482 3 const int log2_ctb_size = sps->sps_log2_ctu_size_minus5 + 5;
3483 3 const int ctb_size = 1 << log2_ctb_size;
3484 3 width_in_ctus = (pps->pps_pic_width_in_luma_samples + ctb_size - 1) >> log2_ctb_size;
3485 3 height_in_ctus = (pps->pps_pic_height_in_luma_samples + ctb_size - 1) >> log2_ctb_size;
3486 }
3487
3488 523 const int subpic_l = sps->sps_subpic_ctu_top_left_x[slice_idx];
3489 523 const int subpic_r = subpic_l + width_in_ctus;
3490
3491 523 int ctb_x = 0, tile_x = 0;
3492
3/8
cbs_h266_read_slice_header:
✓ Branch 376 → 377 taken 780 times.
✓ Branch 376 → 378 taken 523 times.
✓ Branch 377 → 375 taken 780 times.
✗ Branch 377 → 378 not taken.
cbs_h266_write_slice_header:
✗ Branch 484 → 485 not taken.
✗ Branch 484 → 486 not taken.
✗ Branch 485 → 483 not taken.
✗ Branch 485 → 486 not taken.
1303 for (; ctb_x < subpic_l && tile_x < pps->num_tile_columns; tile_x++)
3493 780 ctb_x += pps->col_width_val[tile_x];
3494
3495 523 width_in_tiles = 0;
3496
3/8
cbs_h266_read_slice_header:
✓ Branch 380 → 381 taken 526 times.
✓ Branch 380 → 382 taken 523 times.
✓ Branch 381 → 379 taken 526 times.
✗ Branch 381 → 382 not taken.
cbs_h266_write_slice_header:
✗ Branch 488 → 489 not taken.
✗ Branch 488 → 490 not taken.
✗ Branch 489 → 487 not taken.
✗ Branch 489 → 490 not taken.
1049 for (; ctb_x < subpic_r && tile_x < pps->num_tile_columns; tile_x++) {
3497 526 ctb_x += pps->col_width_val[tile_x];
3498 526 width_in_tiles++;
3499 }
3500
3501
2/4
cbs_h266_read_slice_header:
✓ Branch 382 → 383 taken 3 times.
✓ Branch 382 → 384 taken 520 times.
cbs_h266_write_slice_header:
✗ Branch 490 → 491 not taken.
✗ Branch 490 → 492 not taken.
523 if (entropy_sync) {
3502 3 height = height_in_ctus;
3503 } else {
3504 520 const int subpic_t = sps->sps_subpic_ctu_top_left_y[slice_idx];
3505 520 const int subpic_b = subpic_t + height_in_ctus;
3506
3507 520 int ctb_y = 0, tile_y = 0, height_in_tiles;
3508
3/8
cbs_h266_read_slice_header:
✓ Branch 386 → 387 taken 260 times.
✓ Branch 386 → 388 taken 520 times.
✓ Branch 387 → 385 taken 260 times.
✗ Branch 387 → 388 not taken.
cbs_h266_write_slice_header:
✗ Branch 494 → 495 not taken.
✗ Branch 494 → 496 not taken.
✗ Branch 495 → 493 not taken.
✗ Branch 495 → 496 not taken.
780 for (; ctb_y < subpic_t && tile_y < pps->num_tile_rows; tile_y++)
3509 260 ctb_y += pps->row_height_val[tile_y];
3510
3511 520 height_in_tiles = 0;
3512
3/8
cbs_h266_read_slice_header:
✓ Branch 390 → 391 taken 520 times.
✓ Branch 390 → 392 taken 520 times.
✓ Branch 391 → 389 taken 520 times.
✗ Branch 391 → 392 not taken.
cbs_h266_write_slice_header:
✗ Branch 498 → 499 not taken.
✗ Branch 498 → 500 not taken.
✗ Branch 499 → 497 not taken.
✗ Branch 499 → 500 not taken.
1040 for (; ctb_y < subpic_b && tile_y < pps->num_tile_rows; tile_y++) {
3513 520 ctb_y += pps->row_height_val[tile_y];
3514 520 height_in_tiles++;
3515 }
3516
3517 520 height = height_in_tiles;
3518 }
3519 } else {
3520 1837 width_in_tiles =
3521 1837 pps->pps_slice_width_in_tiles_minus1[slice_idx] + 1;
3522
3523
2/4
cbs_h266_read_slice_header:
✗ Branch 393 → 394 not taken.
✓ Branch 393 → 395 taken 1520 times.
cbs_h266_write_slice_header:
✗ Branch 501 → 502 not taken.
✓ Branch 501 → 503 taken 317 times.
1837 if (entropy_sync)
3524 ✗ height = pps->slice_height_in_ctus[slice_idx];
3525 else
3526 1837 height = pps->pps_slice_height_in_tiles_minus1[slice_idx] + 1;
3527 }
3528
3529 2360 current->num_entry_points = width_in_tiles * height;
3530 } else {
3531 int tile_idx;
3532 int tile_y;
3533 9154 for (tile_idx = current->sh_slice_address;
3534 18708 tile_idx <=
3535 18708 current->sh_slice_address +
3536
4/4
cbs_h266_read_slice_header:
✓ Branch 402 → 398 taken 7203 times.
✓ Branch 402 → 403 taken 6883 times.
cbs_h266_write_slice_header:
✓ Branch 510 → 506 taken 2351 times.
✓ Branch 510 → 511 taken 2271 times.
18708 current->sh_num_tiles_in_slice_minus1; tile_idx++) {
3537 9554 tile_y = tile_idx / pps->num_tile_columns;
3538 9554 height = pps->row_height_val[tile_y];
3539
4/4
cbs_h266_read_slice_header:
✓ Branch 398 → 399 taken 198 times.
✓ Branch 398 → 400 taken 7005 times.
cbs_h266_write_slice_header:
✓ Branch 506 → 507 taken 49 times.
✓ Branch 506 → 508 taken 2302 times.
9554 current->num_entry_points += (entropy_sync ? height : 1);
3540 }
3541 }
3542 11514 current->num_entry_points--;
3543
2/4
cbs_h266_read_slice_header:
✗ Branch 403 → 404 not taken.
✓ Branch 403 → 406 taken 8926 times.
cbs_h266_write_slice_header:
✗ Branch 511 → 512 not taken.
✓ Branch 511 → 514 taken 2588 times.
11514 if (current->num_entry_points > VVC_MAX_ENTRY_POINTS) {
3544 ✗ av_log(ctx->log_ctx, AV_LOG_ERROR, "Too many entry points: "
3545 "%" PRIu32 ".\n", current->num_entry_points);
3546 ✗ return AVERROR_PATCHWELCOME;
3547 }
3548
4/4
cbs_h266_read_slice_header:
✓ Branch 406 → 407 taken 551 times.
✓ Branch 406 → 416 taken 8375 times.
cbs_h266_write_slice_header:
✓ Branch 514 → 515 taken 81 times.
✓ Branch 514 → 524 taken 2507 times.
11514 if (current->num_entry_points > 0) {
3549
2/4
cbs_h266_read_slice_header:
✗ Branch 408 → 409 not taken.
✓ Branch 408 → 410 taken 551 times.
cbs_h266_write_slice_header:
✗ Branch 516 → 517 not taken.
✓ Branch 516 → 518 taken 81 times.
632 ue(sh_entry_offset_len_minus1, 0, 31);
3550
4/4
cbs_h266_read_slice_header:
✓ Branch 415 → 411 taken 1553 times.
✓ Branch 415 → 416 taken 551 times.
cbs_h266_write_slice_header:
✓ Branch 523 → 519 taken 321 times.
✓ Branch 523 → 524 taken 81 times.
2506 for (i = 0; i < current->num_entry_points; i++) {
3551
2/4
cbs_h266_read_slice_header:
✗ Branch 412 → 413 not taken.
✓ Branch 412 → 414 taken 1553 times.
cbs_h266_write_slice_header:
✗ Branch 520 → 521 not taken.
✓ Branch 520 → 522 taken 321 times.
1874 ubs(current->sh_entry_offset_len_minus1 + 1,
3552 sh_entry_point_offset_minus1[i], 1, i);
3553 }
3554 }
3555 }
3556
2/4
cbs_h266_read_slice_header:
✗ Branch 417 → 418 not taken.
✓ Branch 417 → 419 taken 9110 times.
cbs_h266_write_slice_header:
✗ Branch 525 → 526 not taken.
✓ Branch 525 → 527 taken 2588 times.
11698 CHECK(FUNC(byte_alignment) (ctx, rw));
3557
3558 11698 return 0;
3559 }
3560
3561 5509 static int FUNC(sei) (CodedBitstreamContext *ctx, RWContext *rw,
3562 H266RawSEI *current, int prefix)
3563 {
3564 int err;
3565
3566
4/4
cbs_h266_read_sei:
✓ Branch 2 → 3 taken 181 times.
✓ Branch 2 → 4 taken 3138 times.
cbs_h266_write_sei:
✓ Branch 2 → 3 taken 62 times.
✓ Branch 2 → 4 taken 2128 times.
5509 if (prefix)
3567 243 HEADER("Prefix Supplemental Enhancement Information");
3568 else
3569 5266 HEADER("Suffix Supplemental Enhancement Information");
3570
3571
6/8
cbs_h266_read_sei:
✓ Branch 5 → 6 taken 181 times.
✓ Branch 5 → 7 taken 3138 times.
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 3319 times.
cbs_h266_write_sei:
✓ Branch 5 → 6 taken 62 times.
✓ Branch 5 → 7 taken 2128 times.
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 2190 times.
5509 CHECK(FUNC(nal_unit_header) (ctx, rw, &current->nal_unit_header,
3572 prefix ? VVC_PREFIX_SEI_NUT
3573 : VVC_SUFFIX_SEI_NUT));
3574
3575
2/4
cbs_h266_read_sei:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 14 taken 3319 times.
cbs_h266_write_sei:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 14 taken 2190 times.
5509 CHECK(FUNC_SEI(message_list) (ctx, rw, &current->message_list, prefix));
3576
3577
2/4
cbs_h266_read_sei:
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 17 taken 3319 times.
cbs_h266_write_sei:
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 17 taken 2190 times.
5509 CHECK(FUNC(rbsp_trailing_bits) (ctx, rw));
3578
3579 5509 return 0;
3580 }
3581