| 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 |
|
93 |
static int FUNC(byte_alignment)(CodedBitstreamContext *ctx, RWContext *rw) |
| 20 |
|
|
{ |
| 21 |
|
|
int err; |
| 22 |
|
|
|
| 23 |
|
|
// ISO/IEC 23094-2:2021/FDAM 1:2023(E) 7.3.12 |
| 24 |
4/4
cbs_lcevc_read_byte_alignment:
✓ Branch 8 → 3 taken 174 times.
✓ Branch 8 → 9 taken 31 times.
cbs_lcevc_write_byte_alignment:
✓ Branch 8 → 3 taken 348 times.
✓ Branch 8 → 9 taken 62 times.
|
615 |
while (byte_alignment(rw) != 0) |
| 25 |
2/4
cbs_lcevc_read_byte_alignment:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 174 times.
cbs_lcevc_write_byte_alignment:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 348 times.
|
522 |
fixed(1, alignment_bit_equal_to_zero, 0); |
| 26 |
|
|
|
| 27 |
|
93 |
return 0; |
| 28 |
|
|
} |
| 29 |
|
|
|
| 30 |
|
66 |
static int FUNC(rbsp_trailing_bits)(CodedBitstreamContext *ctx, RWContext *rw) |
| 31 |
|
|
{ |
| 32 |
|
|
int err; |
| 33 |
|
|
|
| 34 |
2/4
cbs_lcevc_read_rbsp_trailing_bits:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 33 times.
cbs_lcevc_write_rbsp_trailing_bits:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 33 times.
|
66 |
fixed(1, rbsp_stop_one_bit, 1); |
| 35 |
4/4
cbs_lcevc_read_rbsp_trailing_bits:
✓ Branch 11 → 6 taken 231 times.
✓ Branch 11 → 12 taken 33 times.
cbs_lcevc_write_rbsp_trailing_bits:
✓ Branch 11 → 6 taken 231 times.
✓ Branch 11 → 12 taken 33 times.
|
528 |
while (byte_alignment(rw) != 0) |
| 36 |
2/4
cbs_lcevc_read_rbsp_trailing_bits:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 231 times.
cbs_lcevc_write_rbsp_trailing_bits:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 231 times.
|
462 |
fixed(1, rbsp_alignment_zero_bit, 0); |
| 37 |
|
|
|
| 38 |
|
66 |
return 0; |
| 39 |
|
|
} |
| 40 |
|
|
|
| 41 |
|
66 |
static int FUNC(nal_unit_header)(CodedBitstreamContext *ctx, RWContext *rw, |
| 42 |
|
|
LCEVCRawNALUnitHeader *current, |
| 43 |
|
|
uint32_t valid_type_mask) |
| 44 |
|
|
{ |
| 45 |
|
|
int err; |
| 46 |
|
|
|
| 47 |
2/4
cbs_lcevc_read_nal_unit_header:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 33 times.
cbs_lcevc_write_nal_unit_header:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 33 times.
|
66 |
fixed(1, forbidden_zero_bit, 0); |
| 48 |
2/4
cbs_lcevc_read_nal_unit_header:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 33 times.
cbs_lcevc_write_nal_unit_header:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 33 times.
|
66 |
fixed(1, forbidden_one_bit, 1); |
| 49 |
2/4
cbs_lcevc_read_nal_unit_header:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 33 times.
cbs_lcevc_write_nal_unit_header:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 33 times.
|
66 |
ub(5, nal_unit_type); |
| 50 |
|
|
|
| 51 |
2/4
cbs_lcevc_read_nal_unit_header:
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 14 taken 33 times.
cbs_lcevc_write_nal_unit_header:
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 14 taken 33 times.
|
66 |
if (!(1 << current->nal_unit_type & valid_type_mask)) { |
| 52 |
|
✗ |
av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid NAL unit type %d.\n", |
| 53 |
|
✗ |
current->nal_unit_type); |
| 54 |
|
✗ |
return AVERROR_INVALIDDATA; |
| 55 |
|
|
} |
| 56 |
|
|
|
| 57 |
2/4
cbs_lcevc_read_nal_unit_header:
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 17 taken 33 times.
cbs_lcevc_write_nal_unit_header:
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 17 taken 33 times.
|
66 |
ub(9, reserved_flag); |
| 58 |
|
|
|
| 59 |
|
66 |
return 0; |
| 60 |
|
|
} |
| 61 |
|
|
|
| 62 |
|
24 |
LCEVC_BLOCK_FUNC(global_config, (CodedBitstreamContext *ctx, RWContext *rw, |
| 63 |
|
|
LCEVCRawGlobalConfig *current, |
| 64 |
|
|
LCEVCProcessBlockState *state, |
| 65 |
|
|
int nal_unit_type)) |
| 66 |
|
|
{ |
| 67 |
|
12 |
CodedBitstreamLCEVCContext *priv = ctx->priv_data; |
| 68 |
|
|
int err; |
| 69 |
|
|
|
| 70 |
|
12 |
HEADER("Global Config"); |
| 71 |
|
|
|
| 72 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 8 times.
|
12 |
flag(processed_planes_type_flag); |
| 73 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 8 times.
|
12 |
ub(6, resolution_type); |
| 74 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 8 times.
|
12 |
ub(1, transform_type); |
| 75 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 8 times.
|
12 |
ub(2, chroma_sampling_type); |
| 76 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 18 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 18 taken 8 times.
|
12 |
ub(2, base_depth_type); |
| 77 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 8 times.
|
12 |
ub(2, enhancement_depth_type); |
| 78 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 24 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 24 taken 8 times.
|
12 |
flag(temporal_step_width_modifier_signalled_flag); |
| 79 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 25 → 26 not taken.
✓ Branch 25 → 27 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 25 → 26 not taken.
✓ Branch 25 → 27 taken 8 times.
|
12 |
flag(predicted_residual_mode_flag); |
| 80 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 28 → 29 not taken.
✓ Branch 28 → 30 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 28 → 29 not taken.
✓ Branch 28 → 30 taken 8 times.
|
12 |
flag(temporal_tile_intra_signalling_enabled_flag); |
| 81 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 31 → 32 not taken.
✓ Branch 31 → 33 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 31 → 32 not taken.
✓ Branch 31 → 33 taken 8 times.
|
12 |
flag(temporal_enabled_flag); |
| 82 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 34 → 35 not taken.
✓ Branch 34 → 36 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 34 → 35 not taken.
✓ Branch 34 → 36 taken 8 times.
|
12 |
ub(3, upsample_type); |
| 83 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 37 → 38 not taken.
✓ Branch 37 → 39 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 37 → 38 not taken.
✓ Branch 37 → 39 taken 8 times.
|
12 |
flag(level1_filtering_signalled_flag); |
| 84 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 40 → 41 not taken.
✓ Branch 40 → 42 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 40 → 41 not taken.
✓ Branch 40 → 42 taken 8 times.
|
12 |
ub(2, scaling_mode_level1); |
| 85 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 43 → 44 not taken.
✓ Branch 43 → 45 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 43 → 44 not taken.
✓ Branch 43 → 45 taken 8 times.
|
12 |
ub(2, scaling_mode_level2); |
| 86 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 46 → 47 not taken.
✓ Branch 46 → 48 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 46 → 47 not taken.
✓ Branch 46 → 48 taken 8 times.
|
12 |
ub(2, tile_dimensions_type); |
| 87 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 49 → 50 not taken.
✓ Branch 49 → 51 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 49 → 50 not taken.
✓ Branch 49 → 51 taken 8 times.
|
12 |
ub(2, user_data_enabled); |
| 88 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 52 → 53 not taken.
✓ Branch 52 → 54 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 52 → 53 not taken.
✓ Branch 52 → 54 taken 8 times.
|
12 |
flag(level1_depth_flag); |
| 89 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 55 → 56 not taken.
✓ Branch 55 → 57 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 55 → 56 not taken.
✓ Branch 55 → 57 taken 8 times.
|
12 |
flag(chroma_step_width_flag); |
| 90 |
|
|
|
| 91 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 57 → 58 not taken.
✓ Branch 57 → 65 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 57 → 58 not taken.
✓ Branch 57 → 64 taken 8 times.
|
12 |
if (current->processed_planes_type_flag) { |
| 92 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 59 → 60 not taken.
✗ Branch 59 → 61 not taken.
cbs_lcevc_write_global_config:
✗ Branch 59 → 60 not taken.
✗ Branch 59 → 61 not taken.
|
✗ |
ub(4, planes_type); |
| 93 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 62 → 63 not taken.
✗ Branch 62 → 64 not taken.
cbs_lcevc_write_global_config:
✗ Branch 62 → 63 not taken.
✗ Branch 62 → 67 not taken.
|
✗ |
ub(4, reserved_zeros_4bit); |
| 94 |
|
|
} else |
| 95 |
1/2
✗ Branch 64 → 65 not taken.
✓ Branch 64 → 67 taken 8 times.
|
12 |
infer(planes_type, 0); |
| 96 |
|
|
|
| 97 |
2/4
cbs_lcevc_read_global_config:
✓ Branch 66 → 67 taken 4 times.
✗ Branch 66 → 71 not taken.
cbs_lcevc_write_global_config:
✓ Branch 67 → 68 taken 8 times.
✗ Branch 67 → 71 not taken.
|
12 |
if (current->temporal_step_width_modifier_signalled_flag) { |
| 98 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 68 → 69 not taken.
✓ Branch 68 → 70 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 69 → 70 not taken.
✓ Branch 69 → 71 taken 8 times.
|
12 |
ub(8, temporal_step_width_modifier); |
| 99 |
|
|
} |
| 100 |
|
|
|
| 101 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 71 → 72 not taken.
✓ Branch 71 → 85 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 71 → 72 not taken.
✓ Branch 71 → 84 taken 8 times.
|
12 |
if (current->upsample_type == 4) { |
| 102 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 73 → 74 not taken.
✗ Branch 73 → 75 not taken.
cbs_lcevc_write_global_config:
✗ Branch 73 → 74 not taken.
✗ Branch 73 → 75 not taken.
|
✗ |
ub(16, upsampler_coeff1); |
| 103 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 76 → 77 not taken.
✗ Branch 76 → 78 not taken.
cbs_lcevc_write_global_config:
✗ Branch 76 → 77 not taken.
✗ Branch 76 → 78 not taken.
|
✗ |
ub(16, upsampler_coeff2); |
| 104 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 79 → 80 not taken.
✗ Branch 79 → 81 not taken.
cbs_lcevc_write_global_config:
✗ Branch 79 → 80 not taken.
✗ Branch 79 → 81 not taken.
|
✗ |
ub(16, upsampler_coeff3); |
| 105 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 82 → 83 not taken.
✗ Branch 82 → 84 not taken.
cbs_lcevc_write_global_config:
✗ Branch 82 → 83 not taken.
✗ Branch 82 → 84 not taken.
|
✗ |
ub(16, upsampler_coeff4); |
| 106 |
|
|
} |
| 107 |
|
|
|
| 108 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 85 → 86 not taken.
✓ Branch 85 → 93 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 84 → 85 not taken.
✓ Branch 84 → 91 taken 8 times.
|
12 |
if (current->level1_filtering_signalled_flag) { |
| 109 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 87 → 88 not taken.
✗ Branch 87 → 89 not taken.
cbs_lcevc_write_global_config:
✗ Branch 86 → 87 not taken.
✗ Branch 86 → 88 not taken.
|
✗ |
ub(4, level1_filtering_first_coefficient); |
| 110 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 90 → 91 not taken.
✗ Branch 90 → 92 not taken.
cbs_lcevc_write_global_config:
✗ Branch 89 → 90 not taken.
✗ Branch 89 → 91 not taken.
|
✗ |
ub(4, level1_filtering_second_coefficient); |
| 111 |
|
|
} |
| 112 |
|
|
|
| 113 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 93 → 94 not taken.
✓ Branch 93 → 112 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 91 → 92 not taken.
✓ Branch 91 → 108 taken 8 times.
|
12 |
if (current->tile_dimensions_type > 0) { |
| 114 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 94 → 95 not taken.
✗ Branch 94 → 102 not taken.
cbs_lcevc_write_global_config:
✗ Branch 92 → 93 not taken.
✗ Branch 92 → 99 not taken.
|
✗ |
if (current->tile_dimensions_type == 3) { |
| 115 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 96 → 97 not taken.
✗ Branch 96 → 98 not taken.
cbs_lcevc_write_global_config:
✗ Branch 94 → 95 not taken.
✗ Branch 94 → 96 not taken.
|
✗ |
ub(16, custom_tile_width); |
| 116 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 99 → 100 not taken.
✗ Branch 99 → 101 not taken.
cbs_lcevc_write_global_config:
✗ Branch 97 → 98 not taken.
✗ Branch 97 → 99 not taken.
|
✗ |
ub(16, custom_tile_height); |
| 117 |
|
|
} |
| 118 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 103 → 104 not taken.
✗ Branch 103 → 105 not taken.
cbs_lcevc_write_global_config:
✗ Branch 100 → 101 not taken.
✗ Branch 100 → 102 not taken.
|
✗ |
ub(5, reserved_zeros_5bit); |
| 119 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 106 → 107 not taken.
✗ Branch 106 → 108 not taken.
cbs_lcevc_write_global_config:
✗ Branch 103 → 104 not taken.
✗ Branch 103 → 105 not taken.
|
✗ |
flag(compression_type_entropy_enabled_per_tile_flag); |
| 120 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 109 → 110 not taken.
✗ Branch 109 → 111 not taken.
cbs_lcevc_write_global_config:
✗ Branch 106 → 107 not taken.
✗ Branch 106 → 108 not taken.
|
✗ |
ub(2, compression_type_size_per_tile); |
| 121 |
|
|
} |
| 122 |
|
|
|
| 123 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 112 → 113 not taken.
✓ Branch 112 → 120 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 108 → 109 not taken.
✓ Branch 108 → 115 taken 8 times.
|
12 |
if (current->resolution_type == 63) { |
| 124 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 114 → 115 not taken.
✗ Branch 114 → 116 not taken.
cbs_lcevc_write_global_config:
✗ Branch 110 → 111 not taken.
✗ Branch 110 → 112 not taken.
|
✗ |
ub(16, custom_resolution_width); |
| 125 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 117 → 118 not taken.
✗ Branch 117 → 119 not taken.
cbs_lcevc_write_global_config:
✗ Branch 113 → 114 not taken.
✗ Branch 113 → 115 not taken.
|
✗ |
ub(16, custom_resolution_height); |
| 126 |
|
|
} |
| 127 |
2/4
cbs_lcevc_read_global_config:
✗ Branch 120 → 121 not taken.
✓ Branch 120 → 125 taken 4 times.
cbs_lcevc_write_global_config:
✗ Branch 115 → 116 not taken.
✓ Branch 115 → 119 taken 8 times.
|
12 |
if (current->chroma_step_width_flag) { |
| 128 |
0/4
cbs_lcevc_read_global_config:
✗ Branch 122 → 123 not taken.
✗ Branch 122 → 124 not taken.
cbs_lcevc_write_global_config:
✗ Branch 117 → 118 not taken.
✗ Branch 117 → 122 not taken.
|
✗ |
ub(8, chroma_step_width_multiplier); |
| 129 |
|
|
} else { |
| 130 |
1/2
✗ Branch 119 → 120 not taken.
✓ Branch 119 → 122 taken 8 times.
|
12 |
infer(chroma_step_width_multiplier, 64); |
| 131 |
|
|
} |
| 132 |
|
|
|
| 133 |
|
12 |
av_refstruct_replace(&priv->gc, current); |
| 134 |
|
|
|
| 135 |
|
12 |
return 0; |
| 136 |
|
|
} |
| 137 |
|
|
|
| 138 |
|
24 |
LCEVC_BLOCK_FUNC(sequence_config, (CodedBitstreamContext *ctx, RWContext *rw, |
| 139 |
|
|
LCEVCRawSequenceConfig *current, |
| 140 |
|
|
LCEVCProcessBlockState *state, |
| 141 |
|
|
int nal_unit_type)) |
| 142 |
|
|
{ |
| 143 |
|
12 |
CodedBitstreamLCEVCContext *priv = ctx->priv_data; |
| 144 |
|
|
int err; |
| 145 |
|
|
|
| 146 |
|
12 |
HEADER("Sequence Config"); |
| 147 |
|
|
|
| 148 |
2/4
cbs_lcevc_read_sequence_config:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 4 times.
cbs_lcevc_write_sequence_config:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 8 times.
|
12 |
ub(4, profile_idc); |
| 149 |
2/4
cbs_lcevc_read_sequence_config:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 4 times.
cbs_lcevc_write_sequence_config:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 8 times.
|
12 |
ub(4, level_idc); |
| 150 |
2/4
cbs_lcevc_read_sequence_config:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 4 times.
cbs_lcevc_write_sequence_config:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 8 times.
|
12 |
ub(2, sublevel_idc); |
| 151 |
2/4
cbs_lcevc_read_sequence_config:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 4 times.
cbs_lcevc_write_sequence_config:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 8 times.
|
12 |
flag(conformance_window_flag); |
| 152 |
2/4
cbs_lcevc_read_sequence_config:
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 18 taken 4 times.
cbs_lcevc_write_sequence_config:
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 18 taken 8 times.
|
12 |
ub(5, reserved_zeros_5bit); |
| 153 |
|
|
|
| 154 |
4/8
cbs_lcevc_read_sequence_config:
✓ Branch 18 → 19 taken 4 times.
✗ Branch 18 → 20 not taken.
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 30 taken 4 times.
cbs_lcevc_write_sequence_config:
✓ Branch 18 → 19 taken 8 times.
✗ Branch 18 → 20 not taken.
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 29 taken 8 times.
|
12 |
if (current->profile_idc == 15 || current->level_idc == 15) { |
| 155 |
0/4
cbs_lcevc_read_sequence_config:
✗ Branch 21 → 22 not taken.
✗ Branch 21 → 23 not taken.
cbs_lcevc_write_sequence_config:
✗ Branch 21 → 22 not taken.
✗ Branch 21 → 23 not taken.
|
✗ |
ub(3, profile_idc); |
| 156 |
0/4
cbs_lcevc_read_sequence_config:
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 26 not taken.
cbs_lcevc_write_sequence_config:
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 26 not taken.
|
✗ |
ub(4, level_idc); |
| 157 |
0/4
cbs_lcevc_read_sequence_config:
✗ Branch 27 → 28 not taken.
✗ Branch 27 → 29 not taken.
cbs_lcevc_write_sequence_config:
✗ Branch 27 → 28 not taken.
✗ Branch 27 → 29 not taken.
|
✗ |
ub(1, reserved_zeros_1bit); |
| 158 |
|
|
} |
| 159 |
2/4
cbs_lcevc_read_sequence_config:
✗ Branch 30 → 31 not taken.
✓ Branch 30 → 44 taken 4 times.
cbs_lcevc_write_sequence_config:
✗ Branch 29 → 30 not taken.
✓ Branch 29 → 42 taken 8 times.
|
12 |
if (current->conformance_window_flag == 1) { |
| 160 |
0/4
cbs_lcevc_read_sequence_config:
✗ Branch 32 → 33 not taken.
✗ Branch 32 → 34 not taken.
cbs_lcevc_write_sequence_config:
✗ Branch 31 → 32 not taken.
✗ Branch 31 → 33 not taken.
|
✗ |
mb(conf_win_left_offset); |
| 161 |
0/4
cbs_lcevc_read_sequence_config:
✗ Branch 35 → 36 not taken.
✗ Branch 35 → 37 not taken.
cbs_lcevc_write_sequence_config:
✗ Branch 34 → 35 not taken.
✗ Branch 34 → 36 not taken.
|
✗ |
mb(conf_win_right_offset); |
| 162 |
0/4
cbs_lcevc_read_sequence_config:
✗ Branch 38 → 39 not taken.
✗ Branch 38 → 40 not taken.
cbs_lcevc_write_sequence_config:
✗ Branch 37 → 38 not taken.
✗ Branch 37 → 39 not taken.
|
✗ |
mb(conf_win_top_offset); |
| 163 |
0/4
cbs_lcevc_read_sequence_config:
✗ Branch 41 → 42 not taken.
✗ Branch 41 → 43 not taken.
cbs_lcevc_write_sequence_config:
✗ Branch 40 → 41 not taken.
✗ Branch 40 → 42 not taken.
|
✗ |
mb(conf_win_bottom_offset); |
| 164 |
|
|
} |
| 165 |
|
|
|
| 166 |
|
12 |
av_refstruct_replace(&priv->sc, current); |
| 167 |
|
|
|
| 168 |
|
12 |
return 0; |
| 169 |
|
|
} |
| 170 |
|
|
|
| 171 |
|
186 |
LCEVC_BLOCK_FUNC(picture_config, (CodedBitstreamContext *ctx, RWContext *rw, |
| 172 |
|
|
LCEVCRawPictureConfig *current, |
| 173 |
|
|
LCEVCProcessBlockState *state, |
| 174 |
|
|
int nal_unit_type)) |
| 175 |
|
|
{ |
| 176 |
|
93 |
CodedBitstreamLCEVCContext *priv = ctx->priv_data; |
| 177 |
|
|
int nlayers, err; |
| 178 |
|
|
|
| 179 |
|
93 |
HEADER("Picture Config"); |
| 180 |
|
|
|
| 181 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 31 times.
cbs_lcevc_write_picture_config:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 62 times.
|
93 |
if (!priv->gc) |
| 182 |
|
✗ |
return AVERROR_INVALIDDATA; |
| 183 |
|
|
|
| 184 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 31 times.
cbs_lcevc_write_picture_config:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 62 times.
|
93 |
flag(no_enhancement_bit_flag); |
| 185 |
4/4
cbs_lcevc_read_picture_config:
✓ Branch 8 → 9 taken 27 times.
✓ Branch 8 → 35 taken 4 times.
cbs_lcevc_write_picture_config:
✓ Branch 8 → 9 taken 54 times.
✓ Branch 8 → 41 taken 8 times.
|
93 |
if (current->no_enhancement_bit_flag == 0) { |
| 186 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 27 times.
cbs_lcevc_write_picture_config:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 54 times.
|
81 |
ub(3, quant_matrix_mode); |
| 187 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 27 times.
cbs_lcevc_write_picture_config:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 15 taken 54 times.
|
81 |
flag(dequant_offset_signalled_flag); |
| 188 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 18 taken 27 times.
cbs_lcevc_write_picture_config:
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 18 taken 54 times.
|
81 |
flag(picture_type_bit_flag); |
| 189 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 27 times.
cbs_lcevc_write_picture_config:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 54 times.
|
81 |
flag(temporal_refresh_bit_flag); |
| 190 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 24 taken 27 times.
cbs_lcevc_write_picture_config:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 24 taken 54 times.
|
81 |
flag(step_width_sublayer1_enabled_flag); |
| 191 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 25 → 26 not taken.
✓ Branch 25 → 27 taken 27 times.
cbs_lcevc_write_picture_config:
✗ Branch 25 → 26 not taken.
✓ Branch 25 → 27 taken 54 times.
|
81 |
ub(15, step_width_sublayer2); |
| 192 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 28 → 29 not taken.
✓ Branch 28 → 30 taken 27 times.
cbs_lcevc_write_picture_config:
✗ Branch 28 → 29 not taken.
✓ Branch 28 → 30 taken 54 times.
|
81 |
flag(dithering_control_flag); |
| 193 |
|
81 |
priv->dithering_control_flag = current->dithering_control_flag; |
| 194 |
9/14
cbs_lcevc_read_picture_config:
✓ Branch 30 → 31 taken 26 times.
✓ Branch 30 → 33 taken 1 time.
✓ Branch 31 → 32 taken 25 times.
✓ Branch 31 → 33 taken 1 time.
cbs_lcevc_write_picture_config:
✓ Branch 30 → 31 taken 52 times.
✓ Branch 30 → 33 taken 2 times.
✓ Branch 31 → 32 taken 50 times.
✓ Branch 31 → 33 taken 2 times.
✗ Branch 34 → 35 not taken.
✓ Branch 34 → 71 taken 54 times.
✗ Branch 35 → 36 not taken.
✗ Branch 35 → 38 not taken.
✗ Branch 36 → 37 not taken.
✗ Branch 36 → 38 not taken.
|
81 |
infer(temporal_signalling_present_flag, priv->gc->temporal_enabled_flag && |
| 195 |
|
|
!current->temporal_refresh_bit_flag); |
| 196 |
|
|
} else { |
| 197 |
1/2
✗ Branch 41 → 42 not taken.
✓ Branch 41 → 44 taken 8 times.
|
12 |
infer(quant_matrix_mode, 0); |
| 198 |
1/2
✗ Branch 44 → 45 not taken.
✓ Branch 44 → 47 taken 8 times.
|
12 |
infer(dequant_offset_signalled_flag, 0); |
| 199 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 36 → 37 not taken.
✓ Branch 36 → 38 taken 4 times.
cbs_lcevc_write_picture_config:
✗ Branch 48 → 49 not taken.
✓ Branch 48 → 50 taken 8 times.
|
12 |
ub(4, reserved_zeros_4bit); |
| 200 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 39 → 40 not taken.
✓ Branch 39 → 41 taken 4 times.
cbs_lcevc_write_picture_config:
✗ Branch 51 → 52 not taken.
✓ Branch 51 → 53 taken 8 times.
|
12 |
flag(picture_type_bit_flag); |
| 201 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 42 → 43 not taken.
✓ Branch 42 → 44 taken 4 times.
cbs_lcevc_write_picture_config:
✗ Branch 54 → 55 not taken.
✓ Branch 54 → 56 taken 8 times.
|
12 |
flag(temporal_refresh_bit_flag); |
| 202 |
1/2
✗ Branch 56 → 57 not taken.
✓ Branch 56 → 59 taken 8 times.
|
12 |
infer(step_width_sublayer1_enabled_flag, 0); |
| 203 |
3/8
cbs_lcevc_read_picture_config:
✓ Branch 44 → 45 taken 4 times.
✗ Branch 44 → 46 not taken.
cbs_lcevc_write_picture_config:
✓ Branch 59 → 60 taken 8 times.
✗ Branch 59 → 61 not taken.
✗ Branch 62 → 63 not taken.
✓ Branch 62 → 68 taken 8 times.
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
|
12 |
infer(dithering_control_flag, nal_unit_type == LCEVC_IDR_NUT |
| 204 |
|
|
? 0 |
| 205 |
|
|
: priv->dithering_control_flag); |
| 206 |
|
12 |
priv->dithering_control_flag = current->dithering_control_flag; |
| 207 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 48 → 49 not taken.
✓ Branch 48 → 50 taken 4 times.
cbs_lcevc_write_picture_config:
✗ Branch 69 → 70 not taken.
✓ Branch 69 → 71 taken 8 times.
|
12 |
flag(temporal_signalling_present_flag); |
| 208 |
|
|
} |
| 209 |
|
|
|
| 210 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 51 → 52 not taken.
✓ Branch 51 → 59 taken 31 times.
cbs_lcevc_write_picture_config:
✗ Branch 71 → 72 not taken.
✓ Branch 71 → 78 taken 62 times.
|
93 |
if (current->picture_type_bit_flag == 1) { |
| 211 |
0/4
cbs_lcevc_read_picture_config:
✗ Branch 53 → 54 not taken.
✗ Branch 53 → 55 not taken.
cbs_lcevc_write_picture_config:
✗ Branch 73 → 74 not taken.
✗ Branch 73 → 75 not taken.
|
✗ |
flag(field_type_bit_flag); |
| 212 |
0/4
cbs_lcevc_read_picture_config:
✗ Branch 56 → 57 not taken.
✗ Branch 56 → 58 not taken.
cbs_lcevc_write_picture_config:
✗ Branch 76 → 77 not taken.
✗ Branch 76 → 78 not taken.
|
✗ |
ub(7, reserved_zeros_7bit); |
| 213 |
|
|
} |
| 214 |
|
|
|
| 215 |
4/4
cbs_lcevc_read_picture_config:
✓ Branch 59 → 60 taken 1 time.
✓ Branch 59 → 67 taken 30 times.
cbs_lcevc_write_picture_config:
✓ Branch 78 → 79 taken 2 times.
✓ Branch 78 → 85 taken 60 times.
|
93 |
if (current->step_width_sublayer1_enabled_flag == 1) { |
| 216 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 61 → 62 not taken.
✓ Branch 61 → 63 taken 1 time.
cbs_lcevc_write_picture_config:
✗ Branch 80 → 81 not taken.
✓ Branch 80 → 82 taken 2 times.
|
3 |
ub(15, step_width_sublayer1); |
| 217 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 64 → 65 not taken.
✓ Branch 64 → 66 taken 1 time.
cbs_lcevc_write_picture_config:
✗ Branch 83 → 84 not taken.
✓ Branch 83 → 88 taken 2 times.
|
3 |
flag(level1_filtering_enabled_flag); |
| 218 |
|
|
} else |
| 219 |
1/2
✗ Branch 85 → 86 not taken.
✓ Branch 85 → 88 taken 60 times.
|
90 |
infer(level1_filtering_enabled_flag, 0); |
| 220 |
|
|
|
| 221 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 68 → 69 not taken.
✓ Branch 68 → 70 taken 31 times.
cbs_lcevc_write_picture_config:
✗ Branch 88 → 89 not taken.
✓ Branch 88 → 90 taken 62 times.
|
93 |
nlayers = priv->gc->transform_type ? 16 : 4; |
| 222 |
4/4
cbs_lcevc_read_picture_config:
✓ Branch 71 → 72 taken 30 times.
✓ Branch 71 → 74 taken 1 time.
cbs_lcevc_write_picture_config:
✓ Branch 91 → 92 taken 60 times.
✓ Branch 91 → 94 taken 2 times.
|
93 |
if (current->quant_matrix_mode == 2 || |
| 223 |
2/4
cbs_lcevc_read_picture_config:
✓ Branch 72 → 73 taken 30 times.
✗ Branch 72 → 74 not taken.
cbs_lcevc_write_picture_config:
✓ Branch 92 → 93 taken 60 times.
✗ Branch 92 → 94 not taken.
|
90 |
current->quant_matrix_mode == 3 || |
| 224 |
4/4
cbs_lcevc_read_picture_config:
✓ Branch 73 → 74 taken 1 time.
✓ Branch 73 → 80 taken 29 times.
cbs_lcevc_write_picture_config:
✓ Branch 93 → 94 taken 2 times.
✓ Branch 93 → 100 taken 58 times.
|
90 |
current->quant_matrix_mode == 5) { |
| 225 |
4/4
cbs_lcevc_read_picture_config:
✓ Branch 79 → 75 taken 8 times.
✓ Branch 79 → 80 taken 2 times.
cbs_lcevc_write_picture_config:
✓ Branch 99 → 95 taken 16 times.
✓ Branch 99 → 100 taken 4 times.
|
30 |
for (int layer_idx = 0; layer_idx < nlayers; layer_idx++) |
| 226 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 76 → 77 not taken.
✓ Branch 76 → 78 taken 8 times.
cbs_lcevc_write_picture_config:
✗ Branch 96 → 97 not taken.
✓ Branch 96 → 98 taken 16 times.
|
24 |
ubs(8, qm_coefficient_0[layer_idx], 1, layer_idx); |
| 227 |
|
|
} |
| 228 |
|
|
|
| 229 |
6/8
cbs_lcevc_read_picture_config:
✓ Branch 80 → 81 taken 31 times.
✗ Branch 80 → 82 not taken.
✓ Branch 81 → 82 taken 1 time.
✓ Branch 81 → 88 taken 30 times.
cbs_lcevc_write_picture_config:
✓ Branch 100 → 101 taken 62 times.
✗ Branch 100 → 102 not taken.
✓ Branch 101 → 102 taken 2 times.
✓ Branch 101 → 108 taken 60 times.
|
93 |
if (current->quant_matrix_mode == 4 || current->quant_matrix_mode == 5) { |
| 230 |
4/4
cbs_lcevc_read_picture_config:
✓ Branch 87 → 83 taken 4 times.
✓ Branch 87 → 88 taken 1 time.
cbs_lcevc_write_picture_config:
✓ Branch 107 → 103 taken 8 times.
✓ Branch 107 → 108 taken 2 times.
|
15 |
for (int layer_idx = 0; layer_idx < nlayers; layer_idx++) |
| 231 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 84 → 85 not taken.
✓ Branch 84 → 86 taken 4 times.
cbs_lcevc_write_picture_config:
✗ Branch 104 → 105 not taken.
✓ Branch 104 → 106 taken 8 times.
|
12 |
ubs(8, qm_coefficient_1[layer_idx], 1, layer_idx); |
| 232 |
|
|
} |
| 233 |
|
|
|
| 234 |
4/4
cbs_lcevc_read_picture_config:
✓ Branch 88 → 89 taken 26 times.
✓ Branch 88 → 96 taken 5 times.
cbs_lcevc_write_picture_config:
✓ Branch 108 → 109 taken 52 times.
✓ Branch 108 → 115 taken 10 times.
|
93 |
if (current->dequant_offset_signalled_flag) { |
| 235 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 90 → 91 not taken.
✓ Branch 90 → 92 taken 26 times.
cbs_lcevc_write_picture_config:
✗ Branch 110 → 111 not taken.
✓ Branch 110 → 112 taken 52 times.
|
78 |
flag(dequant_offset_mode_flag); |
| 236 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 93 → 94 not taken.
✓ Branch 93 → 95 taken 26 times.
cbs_lcevc_write_picture_config:
✗ Branch 113 → 114 not taken.
✓ Branch 113 → 115 taken 52 times.
|
78 |
ub(7, dequant_offset); |
| 237 |
|
|
} |
| 238 |
|
|
|
| 239 |
4/4
cbs_lcevc_read_picture_config:
✓ Branch 96 → 97 taken 30 times.
✓ Branch 96 → 112 taken 1 time.
cbs_lcevc_write_picture_config:
✓ Branch 115 → 116 taken 60 times.
✓ Branch 115 → 129 taken 2 times.
|
93 |
if (current->dithering_control_flag == 1) { |
| 240 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 98 → 99 not taken.
✓ Branch 98 → 100 taken 30 times.
cbs_lcevc_write_picture_config:
✗ Branch 117 → 118 not taken.
✓ Branch 117 → 119 taken 60 times.
|
90 |
ub(2, dithering_type); |
| 241 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 101 → 102 not taken.
✓ Branch 101 → 103 taken 30 times.
cbs_lcevc_write_picture_config:
✗ Branch 120 → 121 not taken.
✓ Branch 120 → 122 taken 60 times.
|
90 |
ub(1, reserverd_zero); |
| 242 |
2/4
cbs_lcevc_read_picture_config:
✓ Branch 103 → 104 taken 30 times.
✗ Branch 103 → 108 not taken.
cbs_lcevc_write_picture_config:
✓ Branch 122 → 123 taken 60 times.
✗ Branch 122 → 126 not taken.
|
90 |
if (current->dithering_type != 0) { |
| 243 |
2/4
cbs_lcevc_read_picture_config:
✗ Branch 105 → 106 not taken.
✓ Branch 105 → 107 taken 30 times.
cbs_lcevc_write_picture_config:
✗ Branch 124 → 125 not taken.
✓ Branch 124 → 129 taken 60 times.
|
90 |
ub(5, dithering_strength); |
| 244 |
|
|
} else { |
| 245 |
0/4
cbs_lcevc_read_picture_config:
✗ Branch 109 → 110 not taken.
✗ Branch 109 → 111 not taken.
cbs_lcevc_write_picture_config:
✗ Branch 127 → 128 not taken.
✗ Branch 127 → 129 not taken.
|
✗ |
ub(5, reserved_zeros_5bit); |
| 246 |
|
|
} |
| 247 |
|
|
} |
| 248 |
|
|
|
| 249 |
|
93 |
av_refstruct_replace(&priv->pc, current); |
| 250 |
|
93 |
av_refstruct_replace(¤t->gc, priv->gc); |
| 251 |
|
|
|
| 252 |
|
93 |
return 0; |
| 253 |
|
|
} |
| 254 |
|
|
|
| 255 |
|
186 |
LCEVC_BLOCK_FUNC(encoded_data, (CodedBitstreamContext *ctx, RWContext *rw, |
| 256 |
|
|
LCEVCRawEncodedData *current, |
| 257 |
|
|
LCEVCProcessBlockState *state, |
| 258 |
|
|
int nal_unit_type)) |
| 259 |
|
|
{ |
| 260 |
|
93 |
CodedBitstreamLCEVCContext *priv = ctx->priv_data; |
| 261 |
|
|
int nplanes, nlayers, err; |
| 262 |
|
|
#ifdef READ |
| 263 |
|
31 |
int start = get_bits_count(rw); |
| 264 |
|
|
#endif |
| 265 |
|
|
|
| 266 |
|
93 |
HEADER("Encoded Data"); |
| 267 |
|
|
|
| 268 |
4/8
cbs_lcevc_read_encoded_data:
✓ Branch 4 → 5 taken 31 times.
✗ Branch 4 → 6 not taken.
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 7 taken 31 times.
cbs_lcevc_write_encoded_data:
✓ Branch 3 → 4 taken 62 times.
✗ Branch 3 → 5 not taken.
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 62 times.
|
93 |
if (!priv->gc || !priv->pc) |
| 269 |
|
✗ |
return AVERROR_INVALIDDATA; |
| 270 |
|
|
|
| 271 |
2/4
cbs_lcevc_read_encoded_data:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 31 times.
cbs_lcevc_write_encoded_data:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 62 times.
|
93 |
nplanes = priv->gc->planes_type ? 3 : 1; |
| 272 |
2/4
cbs_lcevc_read_encoded_data:
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 31 times.
cbs_lcevc_write_encoded_data:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 62 times.
|
93 |
nlayers = priv->gc->transform_type ? 16 : 4; |
| 273 |
4/4
cbs_lcevc_read_encoded_data:
✓ Branch 36 → 14 taken 31 times.
✓ Branch 36 → 37 taken 31 times.
cbs_lcevc_write_encoded_data:
✓ Branch 35 → 13 taken 62 times.
✓ Branch 35 → 36 taken 62 times.
|
186 |
for (int plane_idx = 0; plane_idx < nplanes; plane_idx++) { |
| 274 |
4/4
cbs_lcevc_read_encoded_data:
✓ Branch 14 → 15 taken 27 times.
✓ Branch 14 → 27 taken 4 times.
cbs_lcevc_write_encoded_data:
✓ Branch 13 → 14 taken 54 times.
✓ Branch 13 → 26 taken 8 times.
|
93 |
if (priv->pc->no_enhancement_bit_flag == 0) { |
| 275 |
4/4
cbs_lcevc_read_encoded_data:
✓ Branch 26 → 16 taken 54 times.
✓ Branch 26 → 27 taken 27 times.
cbs_lcevc_write_encoded_data:
✓ Branch 25 → 15 taken 108 times.
✓ Branch 25 → 26 taken 54 times.
|
243 |
for (int level_idx = 1; level_idx <= 2; level_idx++) { |
| 276 |
4/4
cbs_lcevc_read_encoded_data:
✓ Branch 24 → 17 taken 216 times.
✓ Branch 24 → 25 taken 54 times.
cbs_lcevc_write_encoded_data:
✓ Branch 23 → 16 taken 432 times.
✓ Branch 23 → 24 taken 108 times.
|
810 |
for (int layer_idx = 0; layer_idx < nlayers; layer_idx++) { |
| 277 |
2/4
cbs_lcevc_read_encoded_data:
✗ Branch 18 → 19 not taken.
✓ Branch 18 → 20 taken 216 times.
cbs_lcevc_write_encoded_data:
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 19 taken 432 times.
|
648 |
ubs(1, surfaces_entropy_enabled_flag[plane_idx][level_idx][layer_idx], 3, plane_idx, level_idx, layer_idx); |
| 278 |
2/4
cbs_lcevc_read_encoded_data:
✗ Branch 21 → 22 not taken.
✓ Branch 21 → 23 taken 216 times.
cbs_lcevc_write_encoded_data:
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 22 taken 432 times.
|
648 |
ubs(1, surfaces_rle_only_flag[plane_idx][level_idx][layer_idx], 3, plane_idx, level_idx, layer_idx); |
| 279 |
|
|
} |
| 280 |
|
|
} |
| 281 |
|
|
} |
| 282 |
4/4
cbs_lcevc_read_encoded_data:
✓ Branch 27 → 28 taken 29 times.
✓ Branch 27 → 35 taken 2 times.
cbs_lcevc_write_encoded_data:
✓ Branch 26 → 27 taken 58 times.
✓ Branch 26 → 34 taken 4 times.
|
93 |
if (priv->pc->temporal_signalling_present_flag == 1) { |
| 283 |
2/4
cbs_lcevc_read_encoded_data:
✗ Branch 29 → 30 not taken.
✓ Branch 29 → 31 taken 29 times.
cbs_lcevc_write_encoded_data:
✗ Branch 28 → 29 not taken.
✓ Branch 28 → 30 taken 58 times.
|
87 |
ubs(1, temporal_surfaces_entropy_enabled_flag[plane_idx], 1, plane_idx); |
| 284 |
2/4
cbs_lcevc_read_encoded_data:
✗ Branch 32 → 33 not taken.
✓ Branch 32 → 34 taken 29 times.
cbs_lcevc_write_encoded_data:
✗ Branch 31 → 32 not taken.
✓ Branch 31 → 33 taken 58 times.
|
87 |
ubs(1, temporal_surfaces_rle_only_flag[plane_idx], 1, plane_idx); |
| 285 |
|
|
} |
| 286 |
|
|
} |
| 287 |
|
|
|
| 288 |
2/4
cbs_lcevc_read_encoded_data:
✗ Branch 38 → 39 not taken.
✓ Branch 38 → 40 taken 31 times.
cbs_lcevc_write_encoded_data:
✗ Branch 37 → 38 not taken.
✓ Branch 37 → 39 taken 62 times.
|
93 |
CHECK(FUNC(byte_alignment)(ctx, rw)); |
| 289 |
|
|
|
| 290 |
|
|
#ifdef READ |
| 291 |
1/2
✗ Branch 41 → 42 not taken.
✓ Branch 41 → 43 taken 31 times.
|
31 |
if (!ff_cbs_h2645_read_more_rbsp_data(rw)) |
| 292 |
|
✗ |
return AVERROR_INVALIDDATA; |
| 293 |
|
|
|
| 294 |
|
31 |
int pos = get_bits_count(rw) - start; |
| 295 |
|
31 |
int len = state->payload_size; |
| 296 |
|
|
|
| 297 |
|
31 |
current->data_offset = get_bits_count(rw) / 8; |
| 298 |
|
31 |
current->data_size = len - pos / 8; |
| 299 |
|
31 |
skip_bits_long(rw, current->data_size * 8); |
| 300 |
|
|
#else |
| 301 |
|
62 |
err = ff_cbs_h2645_write_slice_data(ctx, rw, current->data, |
| 302 |
|
|
current->data_size, 0); |
| 303 |
1/2
✗ Branch 40 → 41 not taken.
✓ Branch 40 → 42 taken 62 times.
|
62 |
if (err < 0) |
| 304 |
|
✗ |
return err; |
| 305 |
|
|
#endif |
| 306 |
|
|
|
| 307 |
|
93 |
av_refstruct_replace(¤t->sc, priv->sc); |
| 308 |
|
93 |
av_refstruct_replace(¤t->gc, priv->gc); |
| 309 |
|
93 |
av_refstruct_replace(¤t->pc, priv->pc); |
| 310 |
|
|
|
| 311 |
|
93 |
return 0; |
| 312 |
|
|
} |
| 313 |
|
|
|
| 314 |
|
12 |
static int FUNC(sei_payload)(CodedBitstreamContext *ctx, RWContext *rw, |
| 315 |
|
|
LCEVCRawSEI *current, int payload_size) |
| 316 |
|
|
{ |
| 317 |
|
12 |
SEIRawMessage *message = ¤t->message; |
| 318 |
|
|
int sei_type; |
| 319 |
|
|
int i, err; |
| 320 |
|
|
|
| 321 |
2/4
cbs_lcevc_read_sei_payload:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 4 times.
cbs_lcevc_write_sei_payload:
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 8 times.
|
12 |
ub(8, payload_type); |
| 322 |
|
|
|
| 323 |
2/4
cbs_lcevc_read_sei_payload:
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 7 taken 4 times.
cbs_lcevc_write_sei_payload:
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 7 taken 8 times.
|
12 |
if (current->payload_type == 1) |
| 324 |
|
✗ |
sei_type = SEI_TYPE_MASTERING_DISPLAY_COLOUR_VOLUME; |
| 325 |
2/4
cbs_lcevc_read_sei_payload:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 4 times.
cbs_lcevc_write_sei_payload:
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 8 times.
|
12 |
else if (current->payload_type == 2) |
| 326 |
|
✗ |
sei_type = SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO; |
| 327 |
2/4
cbs_lcevc_read_sei_payload:
✓ Branch 9 → 10 taken 4 times.
✗ Branch 9 → 11 not taken.
cbs_lcevc_write_sei_payload:
✓ Branch 9 → 10 taken 8 times.
✗ Branch 9 → 11 not taken.
|
12 |
else if (current->payload_type == 4) |
| 328 |
|
12 |
sei_type = SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35; |
| 329 |
0/4
cbs_lcevc_read_sei_payload:
✗ Branch 11 → 12 not taken.
✗ Branch 11 → 13 not taken.
cbs_lcevc_write_sei_payload:
✗ Branch 11 → 12 not taken.
✗ Branch 11 → 13 not taken.
|
✗ |
else if (current->payload_type == 5) |
| 330 |
|
✗ |
sei_type = SEI_TYPE_USER_DATA_UNREGISTERED; |
| 331 |
|
|
else { |
| 332 |
|
|
uint8_t *data; |
| 333 |
|
|
|
| 334 |
|
|
#ifdef READ |
| 335 |
|
✗ |
current->payload_size = payload_size; |
| 336 |
0/2
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 16 not taken.
|
✗ |
allocate(current->payload_ref, current->payload_size); |
| 337 |
|
✗ |
current->payload = current->payload_ref; |
| 338 |
|
|
#else |
| 339 |
0/2
✗ Branch 13 → 14 not taken.
✗ Branch 13 → 16 not taken.
|
✗ |
allocate(current->payload, current->payload_size); |
| 340 |
|
|
#endif |
| 341 |
|
✗ |
data = current->payload; |
| 342 |
|
|
|
| 343 |
0/4
cbs_lcevc_read_sei_payload:
✗ Branch 21 → 17 not taken.
✗ Branch 21 → 22 not taken.
cbs_lcevc_write_sei_payload:
✗ Branch 21 → 17 not taken.
✗ Branch 21 → 22 not taken.
|
✗ |
for (i = 0; i < current->payload_size; i++) |
| 344 |
0/4
cbs_lcevc_read_sei_payload:
✗ Branch 18 → 19 not taken.
✗ Branch 18 → 20 not taken.
cbs_lcevc_write_sei_payload:
✗ Branch 18 → 19 not taken.
✗ Branch 18 → 20 not taken.
|
✗ |
xu(8, reserved_sei_message_payload_byte[i], data[i], 0, 255, 1, i); |
| 345 |
|
|
|
| 346 |
|
✗ |
return 0; |
| 347 |
|
|
} |
| 348 |
|
|
|
| 349 |
|
12 |
message->payload_type = sei_type; |
| 350 |
|
12 |
message->payload_size = payload_size; |
| 351 |
|
|
|
| 352 |
2/4
cbs_lcevc_read_sei_payload:
✗ Branch 24 → 25 not taken.
✓ Branch 24 → 26 taken 4 times.
cbs_lcevc_write_sei_payload:
✗ Branch 24 → 25 not taken.
✓ Branch 24 → 26 taken 8 times.
|
12 |
CHECK(FUNC_SEI(message)(ctx, rw, message)); |
| 353 |
|
|
|
| 354 |
|
12 |
return 0; |
| 355 |
|
|
} |
| 356 |
|
|
|
| 357 |
|
6 |
static int FUNC(vui_parameters)(CodedBitstreamContext *ctx, RWContext *rw, |
| 358 |
|
|
LCEVCRawVUI *current) |
| 359 |
|
|
{ |
| 360 |
|
|
int err; |
| 361 |
|
|
|
| 362 |
|
6 |
HEADER("VUI Parameters"); |
| 363 |
|
|
|
| 364 |
2/4
cbs_lcevc_read_vui_parameters:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 2 times.
cbs_lcevc_write_vui_parameters:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 4 times.
|
6 |
flag(aspect_ratio_info_present_flag); |
| 365 |
2/4
cbs_lcevc_read_vui_parameters:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 18 taken 2 times.
cbs_lcevc_write_vui_parameters:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 17 taken 4 times.
|
6 |
if (current->aspect_ratio_info_present_flag) { |
| 366 |
0/4
cbs_lcevc_read_vui_parameters:
✗ Branch 8 → 9 not taken.
✗ Branch 8 → 10 not taken.
cbs_lcevc_write_vui_parameters:
✗ Branch 8 → 9 not taken.
✗ Branch 8 → 10 not taken.
|
✗ |
ub(8, aspect_ratio_idc); |
| 367 |
|
|
|
| 368 |
0/4
cbs_lcevc_read_vui_parameters:
✗ Branch 10 → 11 not taken.
✗ Branch 10 → 19 not taken.
cbs_lcevc_write_vui_parameters:
✗ Branch 10 → 11 not taken.
✗ Branch 10 → 20 not taken.
|
✗ |
if (current->aspect_ratio_idc == 255) { |
| 369 |
0/4
cbs_lcevc_read_vui_parameters:
✗ Branch 12 → 13 not taken.
✗ Branch 12 → 14 not taken.
cbs_lcevc_write_vui_parameters:
✗ Branch 12 → 13 not taken.
✗ Branch 12 → 14 not taken.
|
✗ |
ub(16, sar_width); |
| 370 |
0/4
cbs_lcevc_read_vui_parameters:
✗ Branch 15 → 16 not taken.
✗ Branch 15 → 17 not taken.
cbs_lcevc_write_vui_parameters:
✗ Branch 15 → 16 not taken.
✗ Branch 15 → 20 not taken.
|
✗ |
ub(16, sar_height); |
| 371 |
|
|
} |
| 372 |
|
|
} else { |
| 373 |
1/2
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 20 taken 4 times.
|
6 |
infer(aspect_ratio_idc, 0); |
| 374 |
|
|
} |
| 375 |
|
|
|
| 376 |
2/4
cbs_lcevc_read_vui_parameters:
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 22 taken 2 times.
cbs_lcevc_write_vui_parameters:
✗ Branch 21 → 22 not taken.
✓ Branch 21 → 23 taken 4 times.
|
6 |
flag(overscan_info_present_flag); |
| 377 |
2/4
cbs_lcevc_read_vui_parameters:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 27 taken 2 times.
cbs_lcevc_write_vui_parameters:
✗ Branch 23 → 24 not taken.
✓ Branch 23 → 27 taken 4 times.
|
6 |
if (current->overscan_info_present_flag) |
| 378 |
0/4
cbs_lcevc_read_vui_parameters:
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 26 not taken.
cbs_lcevc_write_vui_parameters:
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 30 not taken.
|
✗ |
flag(overscan_appropriate_flag); |
| 379 |
|
|
else |
| 380 |
1/2
✗ Branch 27 → 28 not taken.
✓ Branch 27 → 30 taken 4 times.
|
6 |
infer(overscan_appropriate_flag, 0); |
| 381 |
|
|
|
| 382 |
2/4
cbs_lcevc_read_vui_parameters:
✗ Branch 29 → 30 not taken.
✓ Branch 29 → 31 taken 2 times.
cbs_lcevc_write_vui_parameters:
✗ Branch 31 → 32 not taken.
✓ Branch 31 → 33 taken 4 times.
|
6 |
flag(video_signal_type_present_flag); |
| 383 |
2/4
cbs_lcevc_read_vui_parameters:
✓ Branch 31 → 32 taken 2 times.
✗ Branch 31 → 53 not taken.
cbs_lcevc_write_vui_parameters:
✓ Branch 33 → 34 taken 4 times.
✗ Branch 33 → 62 not taken.
|
6 |
if (current->video_signal_type_present_flag) { |
| 384 |
2/4
cbs_lcevc_read_vui_parameters:
✗ Branch 33 → 34 not taken.
✓ Branch 33 → 35 taken 2 times.
cbs_lcevc_write_vui_parameters:
✗ Branch 35 → 36 not taken.
✓ Branch 35 → 37 taken 4 times.
|
6 |
u(3, video_format, 0, 5); |
| 385 |
2/4
cbs_lcevc_read_vui_parameters:
✗ Branch 36 → 37 not taken.
✓ Branch 36 → 38 taken 2 times.
cbs_lcevc_write_vui_parameters:
✗ Branch 38 → 39 not taken.
✓ Branch 38 → 40 taken 4 times.
|
6 |
flag(video_full_range_flag); |
| 386 |
2/4
cbs_lcevc_read_vui_parameters:
✗ Branch 39 → 40 not taken.
✓ Branch 39 → 41 taken 2 times.
cbs_lcevc_write_vui_parameters:
✗ Branch 41 → 42 not taken.
✓ Branch 41 → 43 taken 4 times.
|
6 |
flag(colour_description_present_flag); |
| 387 |
2/4
cbs_lcevc_read_vui_parameters:
✓ Branch 41 → 42 taken 2 times.
✗ Branch 41 → 52 not taken.
cbs_lcevc_write_vui_parameters:
✓ Branch 43 → 44 taken 4 times.
✗ Branch 43 → 53 not taken.
|
6 |
if (current->colour_description_present_flag) { |
| 388 |
2/4
cbs_lcevc_read_vui_parameters:
✗ Branch 43 → 44 not taken.
✓ Branch 43 → 45 taken 2 times.
cbs_lcevc_write_vui_parameters:
✗ Branch 45 → 46 not taken.
✓ Branch 45 → 47 taken 4 times.
|
6 |
ub(8, colour_primaries); |
| 389 |
2/4
cbs_lcevc_read_vui_parameters:
✗ Branch 46 → 47 not taken.
✓ Branch 46 → 48 taken 2 times.
cbs_lcevc_write_vui_parameters:
✗ Branch 48 → 49 not taken.
✓ Branch 48 → 50 taken 4 times.
|
6 |
ub(8, transfer_characteristics); |
| 390 |
2/4
cbs_lcevc_read_vui_parameters:
✗ Branch 49 → 50 not taken.
✓ Branch 49 → 51 taken 2 times.
cbs_lcevc_write_vui_parameters:
✗ Branch 51 → 52 not taken.
✓ Branch 51 → 80 taken 4 times.
|
6 |
ub(8, matrix_coefficients); |
| 391 |
|
|
} else { |
| 392 |
0/2
✗ Branch 53 → 54 not taken.
✗ Branch 53 → 56 not taken.
|
✗ |
infer(colour_primaries, 2); |
| 393 |
0/2
✗ Branch 56 → 57 not taken.
✗ Branch 56 → 59 not taken.
|
✗ |
infer(transfer_characteristics, 2); |
| 394 |
0/2
✗ Branch 59 → 60 not taken.
✗ Branch 59 → 80 not taken.
|
✗ |
infer(matrix_coefficients, 2); |
| 395 |
|
|
} |
| 396 |
|
|
} else { |
| 397 |
0/2
✗ Branch 62 → 63 not taken.
✗ Branch 62 → 65 not taken.
|
✗ |
infer(video_format, 5); |
| 398 |
0/2
✗ Branch 65 → 66 not taken.
✗ Branch 65 → 68 not taken.
|
✗ |
infer(video_full_range_flag, 0); |
| 399 |
0/2
✗ Branch 68 → 69 not taken.
✗ Branch 68 → 71 not taken.
|
✗ |
infer(colour_description_present_flag, 0); |
| 400 |
0/2
✗ Branch 71 → 72 not taken.
✗ Branch 71 → 74 not taken.
|
✗ |
infer(colour_primaries, 2); |
| 401 |
0/2
✗ Branch 74 → 75 not taken.
✗ Branch 74 → 77 not taken.
|
✗ |
infer(transfer_characteristics, 2); |
| 402 |
0/2
✗ Branch 77 → 78 not taken.
✗ Branch 77 → 80 not taken.
|
✗ |
infer(matrix_coefficients, 2); |
| 403 |
|
|
} |
| 404 |
2/4
cbs_lcevc_read_vui_parameters:
✗ Branch 55 → 56 not taken.
✓ Branch 55 → 57 taken 2 times.
cbs_lcevc_write_vui_parameters:
✗ Branch 81 → 82 not taken.
✓ Branch 81 → 83 taken 4 times.
|
6 |
flag(chroma_loc_info_present_flag); |
| 405 |
2/4
cbs_lcevc_read_vui_parameters:
✗ Branch 57 → 58 not taken.
✓ Branch 57 → 65 taken 2 times.
cbs_lcevc_write_vui_parameters:
✗ Branch 83 → 84 not taken.
✓ Branch 83 → 91 taken 4 times.
|
6 |
if (current->chroma_loc_info_present_flag) { |
| 406 |
0/4
cbs_lcevc_read_vui_parameters:
✗ Branch 59 → 60 not taken.
✗ Branch 59 → 61 not taken.
cbs_lcevc_write_vui_parameters:
✗ Branch 85 → 86 not taken.
✗ Branch 85 → 87 not taken.
|
✗ |
ue(chroma_sample_loc_type_top_field, 0, 5); |
| 407 |
0/4
cbs_lcevc_read_vui_parameters:
✗ Branch 62 → 63 not taken.
✗ Branch 62 → 64 not taken.
cbs_lcevc_write_vui_parameters:
✗ Branch 88 → 89 not taken.
✗ Branch 88 → 90 not taken.
|
✗ |
ue(chroma_sample_loc_type_bottom_field, 0, 5); |
| 408 |
|
|
} else { |
| 409 |
1/2
✗ Branch 91 → 92 not taken.
✓ Branch 91 → 94 taken 4 times.
|
6 |
infer(chroma_sample_loc_type_top_field, 0); |
| 410 |
1/2
✗ Branch 94 → 95 not taken.
✓ Branch 94 → 97 taken 4 times.
|
6 |
infer(chroma_sample_loc_type_bottom_field, 0); |
| 411 |
|
|
} |
| 412 |
|
|
|
| 413 |
|
6 |
return 0; |
| 414 |
|
|
} |
| 415 |
|
|
|
| 416 |
|
48 |
LCEVC_BLOCK_FUNC(additional_info, (CodedBitstreamContext *ctx, RWContext *rw, |
| 417 |
|
|
LCEVCRawAdditionalInfo *current, |
| 418 |
|
|
LCEVCProcessBlockState *state, |
| 419 |
|
|
int nal_unit_type)) |
| 420 |
|
|
{ |
| 421 |
|
|
int i, err; |
| 422 |
|
|
|
| 423 |
|
24 |
HEADER("Additional Info"); |
| 424 |
|
|
|
| 425 |
2/4
cbs_lcevc_read_additional_info:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 8 times.
cbs_lcevc_write_additional_info:
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 16 times.
|
24 |
ub(8, additional_info_type); |
| 426 |
|
|
|
| 427 |
4/4
cbs_lcevc_read_additional_info:
✓ Branch 6 → 7 taken 4 times.
✓ Branch 6 → 10 taken 4 times.
cbs_lcevc_write_additional_info:
✓ Branch 6 → 7 taken 8 times.
✓ Branch 6 → 10 taken 8 times.
|
24 |
if (current->additional_info_type == LCEVC_ADDITIONAL_INFO_TYPE_SEI) { |
| 428 |
2/4
cbs_lcevc_read_additional_info:
✗ Branch 8 → 9 not taken.
✓ Branch 8 → 23 taken 4 times.
cbs_lcevc_write_additional_info:
✗ Branch 8 → 9 not taken.
✓ Branch 8 → 23 taken 8 times.
|
12 |
CHECK(FUNC(sei_payload)(ctx, rw, ¤t->sei, state->payload_size - 2)); |
| 429 |
4/4
cbs_lcevc_read_additional_info:
✓ Branch 10 → 11 taken 2 times.
✓ Branch 10 → 14 taken 2 times.
cbs_lcevc_write_additional_info:
✓ Branch 10 → 11 taken 4 times.
✓ Branch 10 → 14 taken 4 times.
|
12 |
} else if (current->additional_info_type == LCEVC_ADDITIONAL_INFO_TYPE_VUI) |
| 430 |
2/4
cbs_lcevc_read_additional_info:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 23 taken 2 times.
cbs_lcevc_write_additional_info:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 23 taken 4 times.
|
6 |
CHECK(FUNC(vui_parameters)(ctx, rw, ¤t->vui)); |
| 431 |
|
|
else { |
| 432 |
|
|
uint8_t *data; |
| 433 |
|
|
|
| 434 |
|
|
#ifdef READ |
| 435 |
|
2 |
current->payload_size = state->payload_size - 1; |
| 436 |
1/2
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 17 taken 2 times.
|
2 |
allocate(current->payload_ref, current->payload_size); |
| 437 |
|
2 |
current->payload = current->payload_ref; |
| 438 |
|
|
#else |
| 439 |
1/2
✗ Branch 14 → 15 not taken.
✓ Branch 14 → 17 taken 4 times.
|
4 |
allocate(current->payload, current->payload_size); |
| 440 |
|
|
#endif |
| 441 |
|
6 |
data = current->payload; |
| 442 |
|
|
|
| 443 |
4/4
cbs_lcevc_read_additional_info:
✓ Branch 22 → 18 taken 2 times.
✓ Branch 22 → 23 taken 2 times.
cbs_lcevc_write_additional_info:
✓ Branch 22 → 18 taken 4 times.
✓ Branch 22 → 23 taken 4 times.
|
12 |
for (i = 0; i < current->payload_size; i++) |
| 444 |
2/4
cbs_lcevc_read_additional_info:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 2 times.
cbs_lcevc_write_additional_info:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 4 times.
|
6 |
xu(8, additional_info_byte[i], data[i], 0, 255, 1, i); |
| 445 |
|
|
} |
| 446 |
|
|
|
| 447 |
|
24 |
return 0; |
| 448 |
|
|
} |
| 449 |
|
|
|
| 450 |
|
✗ |
LCEVC_BLOCK_FUNC(filler, (CodedBitstreamContext *ctx, RWContext *rw, |
| 451 |
|
|
LCEVCRawFiller *current, |
| 452 |
|
|
LCEVCProcessBlockState *state, |
| 453 |
|
|
int nal_unit_type)) |
| 454 |
|
|
{ |
| 455 |
|
|
int err; |
| 456 |
|
|
|
| 457 |
|
✗ |
HEADER("Filler"); |
| 458 |
|
|
|
| 459 |
|
|
|
| 460 |
|
|
#ifdef READ |
| 461 |
0/2
✗ Branch 9 → 4 not taken.
✗ Branch 9 → 10 not taken.
|
✗ |
while (show_bits(rw, 8) == 0xaa) { |
| 462 |
0/2
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 7 not taken.
|
✗ |
fixed(8, filler_byte, 0xaa); |
| 463 |
|
✗ |
++current->filler_size; |
| 464 |
|
|
} |
| 465 |
0/2
✗ Branch 10 → 11 not taken.
✗ Branch 10 → 12 not taken.
|
✗ |
if (state->payload_size != current->filler_size) |
| 466 |
|
✗ |
return AVERROR_INVALIDDATA; |
| 467 |
|
|
|
| 468 |
|
|
#else |
| 469 |
0/2
✗ Branch 8 → 4 not taken.
✗ Branch 8 → 9 not taken.
|
✗ |
for (int i = 0; i < current->filler_size; i++) |
| 470 |
0/2
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 7 not taken.
|
✗ |
fixed(8, filler_byte, 0xaa); |
| 471 |
|
|
#endif |
| 472 |
|
|
|
| 473 |
|
✗ |
return 0; |
| 474 |
|
|
} |
| 475 |
|
|
|
| 476 |
|
234 |
static int FUNC(process_block)(CodedBitstreamContext *ctx, RWContext *rw, |
| 477 |
|
|
LCEVCRawProcessBlock *current, |
| 478 |
|
|
int nal_unit_type) |
| 479 |
|
|
{ |
| 480 |
|
|
const LCEVCProcessBlockTypeDescriptor *desc; |
| 481 |
|
|
int err, i; |
| 482 |
|
|
|
| 483 |
|
234 |
desc = ff_cbs_lcevc_process_block_find_type(ctx, current->payload_type); |
| 484 |
2/4
cbs_lcevc_read_process_block:
✓ Branch 3 → 4 taken 78 times.
✗ Branch 3 → 46 not taken.
cbs_lcevc_write_process_block:
✓ Branch 3 → 4 taken 156 times.
✗ Branch 3 → 36 not taken.
|
234 |
if (desc) { |
| 485 |
|
234 |
LCEVCProcessBlockState state = { |
| 486 |
|
234 |
.payload_type = current->payload_type, |
| 487 |
|
234 |
.payload_size = current->payload_size, |
| 488 |
|
234 |
.extension_present = current->extension_bit_length > 0, |
| 489 |
|
|
}; |
| 490 |
|
|
int start_position, current_position, bits_written; |
| 491 |
|
|
|
| 492 |
|
|
#ifdef READ |
| 493 |
1/2
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 7 taken 78 times.
|
78 |
CHECK(ff_cbs_lcevc_alloc_process_block_payload(current, desc)); |
| 494 |
|
|
#endif |
| 495 |
|
|
|
| 496 |
|
234 |
start_position = bit_position(rw); |
| 497 |
|
|
|
| 498 |
2/4
cbs_lcevc_read_process_block:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 78 times.
cbs_lcevc_write_process_block:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 156 times.
|
234 |
CHECK(desc->READWRITE(ctx, rw, current->payload, &state, nal_unit_type)); |
| 499 |
|
|
|
| 500 |
|
234 |
current_position = bit_position(rw); |
| 501 |
|
234 |
bits_written = current_position - start_position; |
| 502 |
|
|
|
| 503 |
6/8
cbs_lcevc_read_process_block:
✓ Branch 13 → 14 taken 76 times.
✓ Branch 13 → 16 taken 2 times.
✓ Branch 14 → 15 taken 76 times.
✗ Branch 14 → 16 not taken.
cbs_lcevc_write_process_block:
✓ Branch 10 → 11 taken 152 times.
✓ Branch 10 → 13 taken 4 times.
✓ Branch 11 → 12 taken 152 times.
✗ Branch 11 → 13 not taken.
|
234 |
if (byte_alignment(rw) || state.extension_present || |
| 504 |
2/4
cbs_lcevc_read_process_block:
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 44 taken 76 times.
cbs_lcevc_write_process_block:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 33 taken 152 times.
|
228 |
bits_written < 8 * current->payload_size) { |
| 505 |
|
|
size_t bits_left; |
| 506 |
|
|
|
| 507 |
|
|
#ifdef READ |
| 508 |
|
2 |
GetBitContext tmp = *rw; |
| 509 |
|
|
int trailing_bits, trailing_zero_bits; |
| 510 |
|
|
|
| 511 |
|
2 |
bits_left = 8 * current->payload_size - bits_written; |
| 512 |
1/2
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 18 taken 2 times.
|
2 |
if (bits_left > 8) |
| 513 |
|
✗ |
skip_bits_long(&tmp, bits_left - 8); |
| 514 |
|
2 |
trailing_bits = get_bits(&tmp, FFMIN(bits_left, 8)); |
| 515 |
1/2
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 22 taken 2 times.
|
2 |
if (trailing_bits == 0) { |
| 516 |
|
|
// The trailing bits must contain a payload_bit_equal_to_one, so |
| 517 |
|
|
// they can't all be zero. |
| 518 |
|
|
// Don't error out as encodings following a faulty specification |
| 519 |
|
|
// syntax trigger this. |
| 520 |
|
✗ |
av_log(ctx->log_ctx, AV_LOG_DEBUG, "Missing alignment bits in Process Block\n"); |
| 521 |
|
✗ |
return 0; |
| 522 |
|
|
} |
| 523 |
|
2 |
trailing_zero_bits = ff_ctz(trailing_bits); |
| 524 |
|
2 |
current->extension_bit_length = |
| 525 |
|
2 |
bits_left - 1 - trailing_zero_bits; |
| 526 |
|
|
#endif |
| 527 |
|
|
|
| 528 |
2/4
cbs_lcevc_read_process_block:
✗ Branch 22 → 23 not taken.
✓ Branch 22 → 32 taken 2 times.
cbs_lcevc_write_process_block:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 23 taken 4 times.
|
6 |
if (current->extension_bit_length > 0) { |
| 529 |
0/4
cbs_lcevc_read_process_block:
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 26 not taken.
cbs_lcevc_write_process_block:
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 17 not taken.
|
✗ |
allocate(current->extension_data, |
| 530 |
|
|
(current->extension_bit_length + 7) / 8); |
| 531 |
|
|
|
| 532 |
|
✗ |
bits_left = current->extension_bit_length; |
| 533 |
0/4
cbs_lcevc_read_process_block:
✗ Branch 31 → 27 not taken.
✗ Branch 31 → 32 not taken.
cbs_lcevc_write_process_block:
✗ Branch 22 → 18 not taken.
✗ Branch 22 → 23 not taken.
|
✗ |
for (i = 0; bits_left > 0; i++) { |
| 534 |
|
✗ |
int length = FFMIN(bits_left, 8); |
| 535 |
0/4
cbs_lcevc_read_process_block:
✗ Branch 28 → 29 not taken.
✗ Branch 28 → 30 not taken.
cbs_lcevc_write_process_block:
✗ Branch 19 → 20 not taken.
✗ Branch 19 → 21 not taken.
|
✗ |
xu(length, reserved_payload_extension_data, |
| 536 |
|
|
current->extension_data[i], |
| 537 |
|
|
0, MAX_UINT_BITS(length), 0); |
| 538 |
|
✗ |
bits_left -= length; |
| 539 |
|
|
} |
| 540 |
|
|
} |
| 541 |
|
|
|
| 542 |
2/4
cbs_lcevc_read_process_block:
✗ Branch 33 → 34 not taken.
✓ Branch 33 → 35 taken 2 times.
cbs_lcevc_write_process_block:
✗ Branch 24 → 25 not taken.
✓ Branch 24 → 26 taken 4 times.
|
6 |
fixed(1, payload_bit_equal_to_one, 1); |
| 543 |
4/4
cbs_lcevc_read_process_block:
✓ Branch 41 → 36 taken 12 times.
✓ Branch 41 → 42 taken 2 times.
cbs_lcevc_write_process_block:
✓ Branch 32 → 27 taken 24 times.
✓ Branch 32 → 33 taken 4 times.
|
42 |
while (byte_alignment(rw)) |
| 544 |
2/4
cbs_lcevc_read_process_block:
✗ Branch 37 → 38 not taken.
✓ Branch 37 → 39 taken 12 times.
cbs_lcevc_write_process_block:
✗ Branch 28 → 29 not taken.
✓ Branch 28 → 30 taken 24 times.
|
36 |
fixed(1, payload_bit_equal_to_zero, 0); |
| 545 |
|
|
} |
| 546 |
|
|
|
| 547 |
|
|
#ifdef WRITE |
| 548 |
|
156 |
current->payload_size = (put_bits_count(rw) - start_position) / 8; |
| 549 |
|
|
#endif |
| 550 |
|
|
} else { |
| 551 |
|
|
uint8_t *data; |
| 552 |
|
|
|
| 553 |
|
|
#ifdef READ |
| 554 |
0/2
✗ Branch 47 → 48 not taken.
✗ Branch 47 → 49 not taken.
|
✗ |
allocate(current->payload_ref, current->payload_size); |
| 555 |
|
✗ |
current->payload = current->payload_ref; |
| 556 |
|
|
#else |
| 557 |
0/2
✗ Branch 36 → 37 not taken.
✗ Branch 36 → 39 not taken.
|
✗ |
allocate(current->payload, current->payload_size); |
| 558 |
|
|
#endif |
| 559 |
|
✗ |
data = current->payload; |
| 560 |
|
|
|
| 561 |
0/4
cbs_lcevc_read_process_block:
✗ Branch 54 → 50 not taken.
✗ Branch 54 → 55 not taken.
cbs_lcevc_write_process_block:
✗ Branch 44 → 40 not taken.
✗ Branch 44 → 45 not taken.
|
✗ |
for (i = 0; i < current->payload_size; i++) |
| 562 |
0/4
cbs_lcevc_read_process_block:
✗ Branch 51 → 52 not taken.
✗ Branch 51 → 53 not taken.
cbs_lcevc_write_process_block:
✗ Branch 41 → 42 not taken.
✗ Branch 41 → 43 not taken.
|
✗ |
xu(8, payload_byte[i], data[i], 0, 255, 1, i); |
| 563 |
|
|
} |
| 564 |
|
|
|
| 565 |
|
234 |
return 0; |
| 566 |
|
|
} |
| 567 |
|
|
|
| 568 |
|
66 |
static int FUNC(process_block_list)(CodedBitstreamContext *ctx, RWContext *rw, |
| 569 |
|
|
LCEVCRawProcessBlockList *current, |
| 570 |
|
|
int nal_unit_type) |
| 571 |
|
|
{ |
| 572 |
|
|
LCEVCRawProcessBlock *block; |
| 573 |
|
|
int err, k; |
| 574 |
|
|
|
| 575 |
|
|
#ifdef READ |
| 576 |
|
78 |
for (k = 0;; k++) { |
| 577 |
|
|
int payload_size_type; |
| 578 |
|
|
int payload_type; |
| 579 |
|
|
uint32_t payload_size; |
| 580 |
|
|
uint32_t tmp; |
| 581 |
|
|
GetBitContext payload_gbc; |
| 582 |
|
|
|
| 583 |
|
78 |
HEADER("Process Block"); |
| 584 |
|
|
|
| 585 |
1/2
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 7 taken 78 times.
|
78 |
xu(3, payload_size_type, tmp, 0, MAX_UINT_BITS(3), 0); |
| 586 |
|
78 |
payload_size_type = tmp; |
| 587 |
1/2
✗ Branch 8 → 9 not taken.
✓ Branch 8 → 10 taken 78 times.
|
78 |
xu(5, payload_type, tmp, 0, MAX_UINT_BITS(5), 0); |
| 588 |
|
78 |
payload_type = tmp; |
| 589 |
|
|
|
| 590 |
1/2
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 13 taken 78 times.
|
78 |
if (payload_size_type == 6) { |
| 591 |
|
✗ |
av_log(ctx->log_ctx, AV_LOG_ERROR, "payload_size_type == 6\n"); |
| 592 |
|
✗ |
return AVERROR_INVALIDDATA; |
| 593 |
|
|
} |
| 594 |
|
|
|
| 595 |
|
78 |
payload_size = payload_size_type; |
| 596 |
2/2
✓ Branch 13 → 14 taken 39 times.
✓ Branch 13 → 18 taken 39 times.
|
78 |
if (payload_size_type == 7) |
| 597 |
1/2
✗ Branch 15 → 16 not taken.
✓ Branch 15 → 17 taken 39 times.
|
39 |
xmb(custom_byte_size, payload_size); |
| 598 |
|
|
|
| 599 |
|
|
// There must be space remaining for the payload |
| 600 |
1/2
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 22 taken 78 times.
|
78 |
if (payload_size > get_bits_left(rw) / 8) { |
| 601 |
|
✗ |
av_log(ctx->log_ctx, AV_LOG_ERROR, |
| 602 |
|
|
"Invalid process block: payload_size too large " |
| 603 |
|
|
"(%"PRIu32" bytes).\n", payload_size); |
| 604 |
|
✗ |
return AVERROR_INVALIDDATA; |
| 605 |
|
|
} |
| 606 |
1/2
✗ Branch 24 → 25 not taken.
✓ Branch 24 → 26 taken 78 times.
|
78 |
CHECK(init_get_bits(&payload_gbc, rw->buffer, |
| 607 |
|
|
get_bits_count(rw) + 8 * payload_size)); |
| 608 |
|
78 |
skip_bits_long(&payload_gbc, get_bits_count(rw)); |
| 609 |
|
|
|
| 610 |
1/2
✗ Branch 29 → 30 not taken.
✓ Branch 29 → 31 taken 78 times.
|
78 |
CHECK(ff_cbs_lcevc_list_add(current, -1)); |
| 611 |
|
78 |
block = ¤t->blocks[k]; |
| 612 |
|
|
|
| 613 |
|
78 |
block->payload_type = payload_type; |
| 614 |
|
78 |
block->payload_size = payload_size; |
| 615 |
|
|
|
| 616 |
1/2
✗ Branch 32 → 33 not taken.
✓ Branch 32 → 34 taken 78 times.
|
78 |
CHECK(FUNC(process_block)(ctx, &payload_gbc, block, nal_unit_type)); |
| 617 |
|
|
|
| 618 |
|
78 |
skip_bits_long(rw, 8 * payload_size); |
| 619 |
|
|
|
| 620 |
2/2
✓ Branch 36 → 37 taken 33 times.
✓ Branch 36 → 38 taken 45 times.
|
78 |
if (!ff_cbs_h2645_read_more_rbsp_data(rw)) |
| 621 |
|
33 |
break; |
| 622 |
|
|
} |
| 623 |
|
|
#else |
| 624 |
2/2
✓ Branch 23 → 3 taken 78 times.
✓ Branch 23 → 24 taken 33 times.
|
111 |
for (k = 0; k < current->nb_blocks; k++) { |
| 625 |
|
|
PutBitContext start_state; |
| 626 |
|
|
uint32_t tmp; |
| 627 |
|
|
int trace, i; |
| 628 |
|
|
|
| 629 |
|
78 |
block = ¤t->blocks[k]; |
| 630 |
|
|
|
| 631 |
|
|
// We write the payload twice in order to find the size. Trace |
| 632 |
|
|
// output is switched off for the first write. |
| 633 |
|
78 |
trace = ctx->trace_enable; |
| 634 |
|
78 |
ctx->trace_enable = 0; |
| 635 |
|
|
|
| 636 |
|
78 |
start_state = *rw; |
| 637 |
2/2
✓ Branch 20 → 4 taken 156 times.
✓ Branch 20 → 21 taken 78 times.
|
234 |
for (i = 0; i < 2; i++) { |
| 638 |
|
156 |
*rw = start_state; |
| 639 |
|
|
|
| 640 |
|
156 |
tmp = FFMIN(block->payload_size, 7); |
| 641 |
2/2
✓ Branch 4 → 5 taken 4 times.
✓ Branch 4 → 6 taken 152 times.
|
156 |
if (tmp == 6) |
| 642 |
|
4 |
tmp = 7; |
| 643 |
1/2
✗ Branch 7 → 8 not taken.
✓ Branch 7 → 9 taken 156 times.
|
156 |
xu(3, payload_size_type, tmp, 0, 7, 0); |
| 644 |
1/2
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 12 taken 156 times.
|
156 |
xu(5, payload_type, block->payload_type, 0, MAX_UINT_BITS(5), 0); |
| 645 |
|
|
|
| 646 |
2/2
✓ Branch 12 → 13 taken 78 times.
✓ Branch 12 → 16 taken 78 times.
|
156 |
if (tmp == 7) |
| 647 |
1/2
✗ Branch 14 → 15 not taken.
✓ Branch 14 → 16 taken 78 times.
|
78 |
xmb(custom_byte_size, block->payload_size); |
| 648 |
|
|
|
| 649 |
|
156 |
err = FUNC(process_block)(ctx, rw, block, nal_unit_type); |
| 650 |
|
156 |
ctx->trace_enable = trace; |
| 651 |
1/2
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 19 taken 156 times.
|
156 |
if (err < 0) |
| 652 |
|
✗ |
return err; |
| 653 |
|
|
} |
| 654 |
|
|
} |
| 655 |
|
|
#endif |
| 656 |
|
|
|
| 657 |
|
66 |
return 0; |
| 658 |
|
|
} |
| 659 |
|
|
|
| 660 |
|
66 |
static int FUNC(nal)(CodedBitstreamContext *ctx, RWContext *rw, |
| 661 |
|
|
LCEVCRawNAL *current, int nal_unit_type) |
| 662 |
|
|
{ |
| 663 |
|
|
int err; |
| 664 |
|
|
|
| 665 |
4/4
cbs_lcevc_read_nal:
✓ Branch 2 → 3 taken 29 times.
✓ Branch 2 → 4 taken 4 times.
cbs_lcevc_write_nal:
✓ Branch 2 → 3 taken 29 times.
✓ Branch 2 → 4 taken 4 times.
|
66 |
if (nal_unit_type == LCEVC_NON_IDR_NUT) |
| 666 |
|
58 |
HEADER("Non IDR"); |
| 667 |
|
|
else |
| 668 |
|
8 |
HEADER("IDR"); |
| 669 |
|
|
|
| 670 |
2/4
cbs_lcevc_read_nal:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 33 times.
cbs_lcevc_write_nal:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 33 times.
|
66 |
CHECK(FUNC(nal_unit_header)(ctx, rw, ¤t->nal_unit_header, |
| 671 |
|
|
(1 << LCEVC_IDR_NUT) | (1 << LCEVC_NON_IDR_NUT))); |
| 672 |
|
|
|
| 673 |
2/4
cbs_lcevc_read_nal:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 33 times.
cbs_lcevc_write_nal:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 11 taken 33 times.
|
66 |
CHECK(FUNC(process_block_list) (ctx, rw, ¤t->process_block_list, |
| 674 |
|
|
current->nal_unit_header.nal_unit_type)); |
| 675 |
|
|
|
| 676 |
2/4
cbs_lcevc_read_nal:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 14 taken 33 times.
cbs_lcevc_write_nal:
✗ Branch 12 → 13 not taken.
✓ Branch 12 → 14 taken 33 times.
|
66 |
CHECK(FUNC(rbsp_trailing_bits)(ctx, rw)); |
| 677 |
|
|
|
| 678 |
|
66 |
return 0; |
| 679 |
|
|
} |
| 680 |
|
|
|