| Line |
Branch |
Exec |
Source |
| 1 |
|
|
/* |
| 2 |
|
|
* VVC intra prediction DSP |
| 3 |
|
|
* |
| 4 |
|
|
* Copyright (C) 2021-2023 Nuomi |
| 5 |
|
|
* |
| 6 |
|
|
* This file is part of FFmpeg. |
| 7 |
|
|
* |
| 8 |
|
|
* FFmpeg is free software; you can redistribute it and/or |
| 9 |
|
|
* modify it under the terms of the GNU Lesser General Public |
| 10 |
|
|
* License as published by the Free Software Foundation; either |
| 11 |
|
|
* version 2.1 of the License, or (at your option) any later version. |
| 12 |
|
|
* |
| 13 |
|
|
* FFmpeg is distributed in the hope that it will be useful, |
| 14 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
|
|
* Lesser General Public License for more details. |
| 17 |
|
|
* |
| 18 |
|
|
* You should have received a copy of the GNU Lesser General Public |
| 19 |
|
|
* License along with FFmpeg; if not, write to the Free Software |
| 20 |
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 21 |
|
|
*/ |
| 22 |
|
|
|
| 23 |
|
|
#include "libavutil/avassert.h" |
| 24 |
|
|
#include "libavcodec/bit_depth_template.c" |
| 25 |
|
|
|
| 26 |
|
|
#include "intra.h" |
| 27 |
|
|
|
| 28 |
|
|
#define POS(x, y) src[(x) + stride * (y)] |
| 29 |
|
|
|
| 30 |
|
101936 |
static av_always_inline void FUNC(cclm_linear_pred)(VVCFrameContext *fc, const int x0, const int y0, |
| 31 |
|
|
const int w, const int h, const pixel* pdsy, const int *a, const int *b, const int *k) |
| 32 |
|
|
{ |
| 33 |
|
101936 |
const VVCSPS *sps = fc->ps.sps; |
| 34 |
4/6
cclm_linear_pred_10:
✓ Branch 10 → 3 taken 194154 times.
✓ Branch 10 → 11 taken 97077 times.
cclm_linear_pred_12:
✗ Branch 10 → 3 not taken.
✗ Branch 10 → 11 not taken.
cclm_linear_pred_8:
✓ Branch 10 → 3 taken 9718 times.
✓ Branch 10 → 11 taken 4859 times.
|
305808 |
for (int i = 0; i < VVC_MAX_SAMPLE_ARRAYS - 1; i++) { |
| 35 |
|
203872 |
const int c_idx = i + 1; |
| 36 |
|
203872 |
const int x = x0 >> sps->hshift[c_idx]; |
| 37 |
|
203872 |
const int y = y0 >> sps->vshift[c_idx]; |
| 38 |
|
203872 |
const ptrdiff_t stride = fc->frame->linesize[c_idx] / sizeof(pixel); |
| 39 |
|
203872 |
pixel *src = (pixel*)fc->frame->data[c_idx] + x + y * stride; |
| 40 |
4/6
cclm_linear_pred_10:
✓ Branch 8 → 4 taken 1915388 times.
✓ Branch 8 → 9 taken 194154 times.
cclm_linear_pred_12:
✗ Branch 8 → 4 not taken.
✗ Branch 8 → 9 not taken.
cclm_linear_pred_8:
✓ Branch 8 → 4 taken 56124 times.
✓ Branch 8 → 9 taken 9718 times.
|
2175384 |
for (int y = 0; y < h; y++) { |
| 41 |
4/6
cclm_linear_pred_10:
✓ Branch 6 → 5 taken 28549568 times.
✓ Branch 6 → 7 taken 1915388 times.
cclm_linear_pred_12:
✗ Branch 6 → 5 not taken.
✗ Branch 6 → 7 not taken.
cclm_linear_pred_8:
✓ Branch 6 → 5 taken 399776 times.
✓ Branch 6 → 7 taken 56124 times.
|
30920856 |
for (int x = 0; x < w; x++) { |
| 42 |
|
28949344 |
const int dsy = pdsy[y * w + x]; |
| 43 |
|
28949344 |
const int pred = ((dsy * a[i]) >> k[i]) + b[i]; |
| 44 |
|
28949344 |
POS(x, y) = CLIP(pred); |
| 45 |
|
|
} |
| 46 |
|
|
} |
| 47 |
|
|
} |
| 48 |
|
101936 |
} |
| 49 |
|
|
|
| 50 |
|
|
#define MAX_PICK_POS 4 |
| 51 |
|
|
#define TOP 0 |
| 52 |
|
|
#define LEFT 1 |
| 53 |
|
|
|
| 54 |
|
831 |
static av_always_inline void FUNC(cclm_get_params_default)(int *a, int *b, int *k) |
| 55 |
|
|
{ |
| 56 |
4/6
cclm_get_params_default_10:
✓ Branch 4 → 3 taken 1598 times.
✓ Branch 4 → 5 taken 799 times.
cclm_get_params_default_12:
✗ Branch 4 → 3 not taken.
✗ Branch 4 → 5 not taken.
cclm_get_params_default_8:
✓ Branch 4 → 3 taken 64 times.
✓ Branch 4 → 5 taken 32 times.
|
2493 |
for (int i = 0; i < 2; i++) { |
| 57 |
|
1662 |
a[i] = k[i] = 0; |
| 58 |
|
1662 |
b[i] = 1 << (BIT_DEPTH - 1); |
| 59 |
|
|
} |
| 60 |
|
831 |
} |
| 61 |
|
|
|
| 62 |
|
101936 |
static av_always_inline int FUNC(cclm_get_select_pos)(const VVCLocalContext *lc, |
| 63 |
|
|
const int x, const int y, const int w, const int h, const int avail_t, const int avail_l, |
| 64 |
|
|
int cnt[2], int pos[2][MAX_PICK_POS]) |
| 65 |
|
|
{ |
| 66 |
|
101936 |
const enum IntraPredMode mode = lc->cu->intra_pred_mode_c; |
| 67 |
12/18
cclm_get_select_pos_10:
✓ Branch 2 → 3 taken 93769 times.
✓ Branch 2 → 5 taken 3308 times.
✓ Branch 3 → 4 taken 91163 times.
✓ Branch 3 → 5 taken 2606 times.
✓ Branch 4 → 5 taken 40263 times.
✓ Branch 4 → 6 taken 50900 times.
cclm_get_select_pos_12:
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 5 not taken.
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 5 not taken.
✗ Branch 4 → 5 not taken.
✗ Branch 4 → 6 not taken.
cclm_get_select_pos_8:
✓ Branch 2 → 3 taken 4738 times.
✓ Branch 2 → 5 taken 121 times.
✓ Branch 3 → 4 taken 4637 times.
✓ Branch 3 → 5 taken 101 times.
✓ Branch 4 → 5 taken 2521 times.
✓ Branch 4 → 6 taken 2116 times.
|
101936 |
const int num_is4 = !avail_t || !avail_l || mode != INTRA_LT_CCLM; |
| 68 |
|
|
int num_samp[2]; |
| 69 |
|
|
|
| 70 |
4/6
cclm_get_select_pos_10:
✓ Branch 7 → 8 taken 54944 times.
✓ Branch 7 → 15 taken 42133 times.
cclm_get_select_pos_12:
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 15 not taken.
cclm_get_select_pos_8:
✓ Branch 7 → 8 taken 2242 times.
✓ Branch 7 → 15 taken 2617 times.
|
101936 |
if (mode == INTRA_LT_CCLM) { |
| 71 |
4/6
cclm_get_select_pos_10:
✓ Branch 8 → 9 taken 52506 times.
✓ Branch 8 → 10 taken 2438 times.
cclm_get_select_pos_12:
✗ Branch 8 → 9 not taken.
✗ Branch 8 → 10 not taken.
cclm_get_select_pos_8:
✓ Branch 8 → 9 taken 2154 times.
✓ Branch 8 → 10 taken 88 times.
|
57186 |
num_samp[TOP] = avail_t ? w : 0; |
| 72 |
4/6
cclm_get_select_pos_10:
✓ Branch 11 → 12 taken 53338 times.
✓ Branch 11 → 13 taken 1606 times.
cclm_get_select_pos_12:
✗ Branch 11 → 12 not taken.
✗ Branch 11 → 13 not taken.
cclm_get_select_pos_8:
✓ Branch 11 → 12 taken 2204 times.
✓ Branch 11 → 13 taken 38 times.
|
57186 |
num_samp[LEFT] = avail_l ? h : 0; |
| 73 |
|
|
} else { |
| 74 |
8/12
cclm_get_select_pos_10:
✓ Branch 15 → 16 taken 41263 times.
✓ Branch 15 → 18 taken 870 times.
✓ Branch 16 → 17 taken 22010 times.
✓ Branch 16 → 18 taken 19253 times.
cclm_get_select_pos_12:
✗ Branch 15 → 16 not taken.
✗ Branch 15 → 18 not taken.
✗ Branch 16 → 17 not taken.
✗ Branch 16 → 18 not taken.
cclm_get_select_pos_8:
✓ Branch 15 → 16 taken 2584 times.
✓ Branch 15 → 18 taken 33 times.
✓ Branch 16 → 17 taken 1170 times.
✓ Branch 16 → 18 taken 1414 times.
|
44750 |
num_samp[TOP] = (avail_t && mode == INTRA_T_CCLM) ? ff_vvc_get_top_available(lc, x, y, w + FFMIN(w, h), 1) : 0; |
| 75 |
8/12
cclm_get_select_pos_10:
✓ Branch 19 → 20 taken 41133 times.
✓ Branch 19 → 22 taken 1000 times.
✓ Branch 20 → 21 taken 19324 times.
✓ Branch 20 → 22 taken 21809 times.
cclm_get_select_pos_12:
✗ Branch 19 → 20 not taken.
✗ Branch 19 → 22 not taken.
✗ Branch 20 → 21 not taken.
✗ Branch 20 → 22 not taken.
cclm_get_select_pos_8:
✓ Branch 19 → 20 taken 2554 times.
✓ Branch 19 → 22 taken 63 times.
✓ Branch 20 → 21 taken 1415 times.
✓ Branch 20 → 22 taken 1139 times.
|
44750 |
num_samp[LEFT] = (avail_l && mode == INTRA_L_CCLM) ? ff_vvc_get_left_available(lc, x, y, h + FFMIN(w, h), 1) : 0; |
| 76 |
|
|
} |
| 77 |
8/12
cclm_get_select_pos_10:
✓ Branch 24 → 25 taken 22561 times.
✓ Branch 24 → 27 taken 74516 times.
✓ Branch 25 → 26 taken 799 times.
✓ Branch 25 → 27 taken 21762 times.
cclm_get_select_pos_12:
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 27 not taken.
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 27 not taken.
cclm_get_select_pos_8:
✓ Branch 24 → 25 taken 1535 times.
✓ Branch 24 → 27 taken 3324 times.
✓ Branch 25 → 26 taken 32 times.
✓ Branch 25 → 27 taken 1503 times.
|
101936 |
if (!num_samp[TOP] && !num_samp[LEFT]) { |
| 78 |
|
831 |
return 0; |
| 79 |
|
|
} |
| 80 |
4/6
cclm_get_select_pos_10:
✓ Branch 32 → 28 taken 192556 times.
✓ Branch 32 → 33 taken 96278 times.
cclm_get_select_pos_12:
✗ Branch 32 → 28 not taken.
✗ Branch 32 → 33 not taken.
cclm_get_select_pos_8:
✓ Branch 32 → 28 taken 9654 times.
✓ Branch 32 → 33 taken 4827 times.
|
303315 |
for (int i = TOP; i <= LEFT; i++) { |
| 81 |
|
202210 |
const int start = num_samp[i] >> (2 + num_is4); |
| 82 |
|
202210 |
const int step = FFMAX(1, num_samp[i] >> (1 + num_is4)) ; |
| 83 |
|
202210 |
cnt[i] = FFMIN(num_samp[i], (1 + num_is4) << 1); |
| 84 |
4/6
cclm_get_select_pos_10:
✓ Branch 30 → 29 taken 383730 times.
✓ Branch 30 → 31 taken 192556 times.
cclm_get_select_pos_12:
✗ Branch 30 → 29 not taken.
✗ Branch 30 → 31 not taken.
cclm_get_select_pos_8:
✓ Branch 30 → 29 taken 19296 times.
✓ Branch 30 → 31 taken 9654 times.
|
605236 |
for (int c = 0; c < cnt[i]; c++) |
| 85 |
|
403026 |
pos[i][c] = start + c * step; |
| 86 |
|
|
} |
| 87 |
|
101105 |
return 1; |
| 88 |
|
|
} |
| 89 |
|
|
|
| 90 |
|
26020 |
static av_always_inline void FUNC(cclm_select_luma_444)(const pixel *src, const int step, |
| 91 |
|
|
const int cnt, const int pos[MAX_PICK_POS], pixel *sel_luma) |
| 92 |
|
|
{ |
| 93 |
2/6
cclm_select_luma_444_10:
✓ Branch 4 → 3 taken 52040 times.
✓ Branch 4 → 5 taken 26020 times.
cclm_select_luma_444_12:
✗ Branch 4 → 3 not taken.
✗ Branch 4 → 5 not taken.
cclm_select_luma_444_8:
✗ Branch 4 → 3 not taken.
✗ Branch 4 → 5 not taken.
|
78060 |
for (int i = 0; i < cnt; i++) |
| 94 |
|
52040 |
sel_luma[i] = src[pos[i] * step]; |
| 95 |
|
26020 |
} |
| 96 |
|
|
|
| 97 |
|
101105 |
static av_always_inline void FUNC(cclm_select_luma)(const VVCFrameContext *fc, |
| 98 |
|
|
const int x0, const int y0, const int avail_t, const int avail_l, const int cnt[2], const int pos[2][MAX_PICK_POS], |
| 99 |
|
|
pixel *sel_luma) |
| 100 |
|
|
{ |
| 101 |
|
101105 |
const VVCSPS *sps = fc->ps.sps; |
| 102 |
|
|
|
| 103 |
|
101105 |
const int b_ctu_boundary = !av_zero_extend(y0, sps->ctb_log2_size_y); |
| 104 |
|
101105 |
const int hs = sps->hshift[1]; |
| 105 |
|
101105 |
const int vs = sps->vshift[1]; |
| 106 |
|
101105 |
const ptrdiff_t stride = fc->frame->linesize[0] / sizeof(pixel); |
| 107 |
|
|
|
| 108 |
4/12
cclm_select_luma_10:
✓ Branch 2 → 3 taken 13010 times.
✓ Branch 2 → 7 taken 83268 times.
✓ Branch 3 → 4 taken 13010 times.
✗ Branch 3 → 7 not taken.
cclm_select_luma_12:
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 7 not taken.
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 7 not taken.
cclm_select_luma_8:
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 7 taken 4827 times.
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 7 not taken.
|
114115 |
if (!hs && !vs) { |
| 109 |
|
13010 |
const pixel* src = (pixel*)fc->frame->data[0] + x0 + y0 * stride; |
| 110 |
|
13010 |
FUNC(cclm_select_luma_444)(src - avail_t * stride, 1, cnt[TOP], pos[TOP], sel_luma); |
| 111 |
|
13010 |
FUNC(cclm_select_luma_444)(src - avail_l, stride, cnt[LEFT], pos[LEFT], sel_luma + cnt[TOP]); |
| 112 |
|
|
} else { |
| 113 |
|
|
// top |
| 114 |
7/12
cclm_select_luma_10:
✓ Branch 7 → 8 taken 75341 times.
✓ Branch 7 → 26 taken 7927 times.
✓ Branch 8 → 9 taken 64576 times.
✓ Branch 8 → 26 taken 10765 times.
cclm_select_luma_12:
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 26 not taken.
✗ Branch 8 → 9 not taken.
✗ Branch 8 → 26 not taken.
cclm_select_luma_8:
✓ Branch 7 → 8 taken 4827 times.
✗ Branch 7 → 26 not taken.
✓ Branch 8 → 9 taken 3630 times.
✓ Branch 8 → 26 taken 1197 times.
|
156301 |
if (vs && !b_ctu_boundary) { |
| 115 |
|
68206 |
const pixel *source = (pixel *)fc->frame->data[0] + x0 + (y0 - 2) * stride; |
| 116 |
4/6
cclm_select_luma_10:
✓ Branch 24 → 10 taken 135702 times.
✓ Branch 24 → 25 taken 64576 times.
cclm_select_luma_12:
✗ Branch 24 → 10 not taken.
✗ Branch 24 → 25 not taken.
cclm_select_luma_8:
✓ Branch 24 → 10 taken 6732 times.
✓ Branch 24 → 25 taken 3630 times.
|
210640 |
for (int i = 0; i < cnt[TOP]; i++) { |
| 117 |
|
142434 |
const int x = pos[TOP][i] << hs; |
| 118 |
|
142434 |
const pixel *src = source + x; |
| 119 |
8/12
cclm_select_luma_10:
✓ Branch 10 → 11 taken 2441 times.
✓ Branch 10 → 12 taken 133261 times.
✓ Branch 11 → 12 taken 2198 times.
✓ Branch 11 → 13 taken 243 times.
cclm_select_luma_12:
✗ Branch 10 → 11 not taken.
✗ Branch 10 → 12 not taken.
✗ Branch 11 → 12 not taken.
✗ Branch 11 → 13 not taken.
cclm_select_luma_8:
✓ Branch 10 → 11 taken 262 times.
✓ Branch 10 → 12 taken 6470 times.
✓ Branch 11 → 12 taken 258 times.
✓ Branch 11 → 13 taken 4 times.
|
142434 |
const int has_left = x || avail_l; |
| 120 |
4/6
cclm_select_luma_10:
✓ Branch 14 → 15 taken 135459 times.
✓ Branch 14 → 16 taken 243 times.
cclm_select_luma_12:
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 16 not taken.
cclm_select_luma_8:
✓ Branch 14 → 15 taken 6728 times.
✓ Branch 14 → 16 taken 4 times.
|
142434 |
const pixel l = has_left ? POS(-1, 0) : POS(0, 0); |
| 121 |
3/6
cclm_select_luma_10:
✓ Branch 17 → 18 taken 4240 times.
✓ Branch 17 → 19 taken 131462 times.
cclm_select_luma_12:
✗ Branch 17 → 18 not taken.
✗ Branch 17 → 19 not taken.
cclm_select_luma_8:
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 19 taken 6732 times.
|
142434 |
if (sps->r->sps_chroma_vertical_collocated_flag) { |
| 122 |
|
4240 |
sel_luma[i] = (POS(0, -1) + l + 4 * POS(0, 0) + POS(1, 0) + POS(0, 1) + 4) >> 3; |
| 123 |
|
|
} else { |
| 124 |
4/6
cclm_select_luma_10:
✓ Branch 19 → 20 taken 131219 times.
✓ Branch 19 → 21 taken 243 times.
cclm_select_luma_12:
✗ Branch 19 → 20 not taken.
✗ Branch 19 → 21 not taken.
cclm_select_luma_8:
✓ Branch 19 → 20 taken 6728 times.
✓ Branch 19 → 21 taken 4 times.
|
138194 |
const pixel l1 = has_left ? POS(-1, 1) : POS(0, 1); |
| 125 |
|
138194 |
sel_luma[i] = (l + l1 + 2 * (POS(0, 0) + POS(0, 1)) + POS(1, 0) + POS(1, 1) + 4) >> 3; |
| 126 |
|
|
} |
| 127 |
|
|
} |
| 128 |
|
|
} else { |
| 129 |
|
19889 |
const pixel *source = (pixel*)fc->frame->data[0] + x0 + (y0 - 1) * stride; |
| 130 |
4/6
cclm_select_luma_10:
✓ Branch 35 → 27 taken 33880 times.
✓ Branch 35 → 36 taken 18692 times.
cclm_select_luma_12:
✗ Branch 35 → 27 not taken.
✗ Branch 35 → 36 not taken.
cclm_select_luma_8:
✓ Branch 35 → 27 taken 2332 times.
✓ Branch 35 → 36 taken 1197 times.
|
56101 |
for (int i = 0; i < cnt[TOP]; i++) { |
| 131 |
|
36212 |
const int x = pos[TOP][i] << hs; |
| 132 |
|
36212 |
const pixel *src = source + x; |
| 133 |
8/12
cclm_select_luma_10:
✓ Branch 27 → 28 taken 644 times.
✓ Branch 27 → 29 taken 33236 times.
✓ Branch 28 → 29 taken 607 times.
✓ Branch 28 → 30 taken 37 times.
cclm_select_luma_12:
✗ Branch 27 → 28 not taken.
✗ Branch 27 → 29 not taken.
✗ Branch 28 → 29 not taken.
✗ Branch 28 → 30 not taken.
cclm_select_luma_8:
✓ Branch 27 → 28 taken 9 times.
✓ Branch 27 → 29 taken 2323 times.
✓ Branch 28 → 29 taken 1 time.
✓ Branch 28 → 30 taken 8 times.
|
36212 |
const int has_left = x || avail_l; |
| 134 |
4/6
cclm_select_luma_10:
✓ Branch 31 → 32 taken 33843 times.
✓ Branch 31 → 33 taken 37 times.
cclm_select_luma_12:
✗ Branch 31 → 32 not taken.
✗ Branch 31 → 33 not taken.
cclm_select_luma_8:
✓ Branch 31 → 32 taken 2324 times.
✓ Branch 31 → 33 taken 8 times.
|
36212 |
const pixel l = has_left ? POS(-1, 0) : POS(0, 0); |
| 135 |
|
36212 |
sel_luma[i] = (l + 2 * POS(0, 0) + POS(1, 0) + 2) >> 2; |
| 136 |
|
|
} |
| 137 |
|
|
} |
| 138 |
|
|
|
| 139 |
|
|
// left |
| 140 |
|
|
{ |
| 141 |
|
|
const pixel *left; |
| 142 |
|
88095 |
const pixel *source = (pixel *)fc->frame->data[0] + x0 + y0 * stride - (1 + hs) * avail_l; |
| 143 |
|
88095 |
left = source - avail_l; |
| 144 |
|
|
|
| 145 |
4/6
cclm_select_luma_10:
✓ Branch 50 → 37 taken 162108 times.
✓ Branch 50 → 51 taken 83268 times.
cclm_select_luma_12:
✗ Branch 50 → 37 not taken.
✗ Branch 50 → 51 not taken.
cclm_select_luma_8:
✓ Branch 50 → 37 taken 10232 times.
✓ Branch 50 → 51 taken 4827 times.
|
260435 |
for (int i = 0; i < cnt[LEFT]; i++) { |
| 146 |
|
172340 |
const int y = pos[LEFT][i] << vs; |
| 147 |
|
172340 |
const int offset = y * stride; |
| 148 |
|
172340 |
const pixel *l = left + offset; |
| 149 |
|
172340 |
const pixel *src = source + offset; |
| 150 |
|
|
pixel pred; |
| 151 |
3/6
cclm_select_luma_10:
✓ Branch 37 → 38 taken 14282 times.
✓ Branch 37 → 39 taken 147826 times.
cclm_select_luma_12:
✗ Branch 37 → 38 not taken.
✗ Branch 37 → 39 not taken.
cclm_select_luma_8:
✗ Branch 37 → 38 not taken.
✓ Branch 37 → 39 taken 10232 times.
|
172340 |
if (!vs) { |
| 152 |
|
14282 |
pred = (*l + 2 * POS(0, 0) + POS(1, 0) + 2) >> 2; |
| 153 |
|
|
} else { |
| 154 |
3/6
cclm_select_luma_10:
✓ Branch 39 → 40 taken 6058 times.
✓ Branch 39 → 48 taken 141768 times.
cclm_select_luma_12:
✗ Branch 39 → 40 not taken.
✗ Branch 39 → 48 not taken.
cclm_select_luma_8:
✗ Branch 39 → 40 not taken.
✓ Branch 39 → 48 taken 10232 times.
|
158058 |
if (sps->r->sps_chroma_vertical_collocated_flag) { |
| 155 |
3/12
cclm_select_luma_10:
✓ Branch 40 → 41 taken 94 times.
✓ Branch 40 → 42 taken 5964 times.
✓ Branch 41 → 42 taken 94 times.
✗ Branch 41 → 43 not taken.
cclm_select_luma_12:
✗ Branch 40 → 41 not taken.
✗ Branch 40 → 42 not taken.
✗ Branch 41 → 42 not taken.
✗ Branch 41 → 43 not taken.
cclm_select_luma_8:
✗ Branch 40 → 41 not taken.
✗ Branch 40 → 42 not taken.
✗ Branch 41 → 42 not taken.
✗ Branch 41 → 43 not taken.
|
6058 |
const int has_top = y || avail_t; |
| 156 |
1/6
cclm_select_luma_10:
✓ Branch 44 → 45 taken 6058 times.
✗ Branch 44 → 46 not taken.
cclm_select_luma_12:
✗ Branch 44 → 45 not taken.
✗ Branch 44 → 46 not taken.
cclm_select_luma_8:
✗ Branch 44 → 45 not taken.
✗ Branch 44 → 46 not taken.
|
6058 |
const pixel t = has_top ? POS(0, -1) : POS(0, 0); |
| 157 |
|
6058 |
pred = (*l + t + 4 * POS(0, 0) + POS(1, 0) + POS(0, 1) + 4) >> 3; |
| 158 |
|
|
} else { |
| 159 |
|
152000 |
pred = (*l + *(l + stride) + 2 * POS(0, 0) + 2 * POS(0, 1) + POS(1, 0) + POS(1, 1) + 4) >> 3; |
| 160 |
|
|
} |
| 161 |
|
|
} |
| 162 |
|
172340 |
sel_luma[i + cnt[TOP]] = pred; |
| 163 |
|
|
} |
| 164 |
|
|
} |
| 165 |
|
|
} |
| 166 |
|
101105 |
} |
| 167 |
|
|
|
| 168 |
|
101105 |
static av_always_inline void FUNC(cclm_select_chroma)(const VVCFrameContext *fc, |
| 169 |
|
|
const int x, const int y, const int cnt[2], const int pos[2][MAX_PICK_POS], |
| 170 |
|
|
pixel sel[][MAX_PICK_POS * 2]) |
| 171 |
|
|
{ |
| 172 |
4/6
cclm_select_chroma_10:
✓ Branch 10 → 3 taken 192556 times.
✓ Branch 10 → 11 taken 96278 times.
cclm_select_chroma_12:
✗ Branch 10 → 3 not taken.
✗ Branch 10 → 11 not taken.
cclm_select_chroma_8:
✓ Branch 10 → 3 taken 9654 times.
✓ Branch 10 → 11 taken 4827 times.
|
303315 |
for (int c_idx = 1; c_idx < VVC_MAX_SAMPLE_ARRAYS; c_idx++) { |
| 173 |
|
202210 |
const ptrdiff_t stride = fc->frame->linesize[c_idx] / sizeof(pixel); |
| 174 |
|
|
|
| 175 |
|
|
//top |
| 176 |
|
202210 |
const pixel *src = (pixel*)fc->frame->data[c_idx] + x + (y - 1)* stride; |
| 177 |
4/6
cclm_select_chroma_10:
✓ Branch 5 → 4 taken 392528 times.
✓ Branch 5 → 6 taken 192556 times.
cclm_select_chroma_12:
✗ Branch 5 → 4 not taken.
✗ Branch 5 → 6 not taken.
cclm_select_chroma_8:
✓ Branch 5 → 4 taken 18128 times.
✓ Branch 5 → 6 taken 9654 times.
|
612866 |
for (int i = 0; i < cnt[TOP]; i++) { |
| 178 |
|
410656 |
sel[c_idx][i] = src[pos[TOP][i]]; |
| 179 |
|
|
} |
| 180 |
|
|
|
| 181 |
|
|
//left |
| 182 |
|
202210 |
src = (pixel*)fc->frame->data[c_idx] + x - 1 + y * stride; |
| 183 |
4/6
cclm_select_chroma_10:
✓ Branch 8 → 7 taken 374932 times.
✓ Branch 8 → 9 taken 192556 times.
cclm_select_chroma_12:
✗ Branch 8 → 7 not taken.
✗ Branch 8 → 9 not taken.
cclm_select_chroma_8:
✓ Branch 8 → 7 taken 20464 times.
✓ Branch 8 → 9 taken 9654 times.
|
597606 |
for (int i = 0; i < cnt[LEFT]; i++) { |
| 184 |
|
395396 |
sel[c_idx][i + cnt[TOP]] = src[pos[LEFT][i] * stride]; |
| 185 |
|
|
} |
| 186 |
|
|
} |
| 187 |
|
101105 |
} |
| 188 |
|
|
|
| 189 |
|
101936 |
static av_always_inline int FUNC(cclm_select_samples)(const VVCLocalContext *lc, |
| 190 |
|
|
const int x0, const int y0, const int w, const int h, const int avail_t, const int avail_l, |
| 191 |
|
|
pixel sel[][MAX_PICK_POS * 2]) |
| 192 |
|
|
{ |
| 193 |
|
101936 |
const VVCFrameContext *fc = lc->fc; |
| 194 |
|
101936 |
const VVCSPS *sps = fc->ps.sps; |
| 195 |
|
101936 |
const int x = x0 >> sps->hshift[1]; |
| 196 |
|
101936 |
const int y = y0 >> sps->vshift[1]; |
| 197 |
|
|
int cnt[2], pos[2][MAX_PICK_POS]; |
| 198 |
|
|
|
| 199 |
4/6
cclm_select_samples_10:
✓ Branch 3 → 4 taken 799 times.
✓ Branch 3 → 5 taken 96278 times.
cclm_select_samples_12:
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 5 not taken.
cclm_select_samples_8:
✓ Branch 3 → 4 taken 32 times.
✓ Branch 3 → 5 taken 4827 times.
|
101936 |
if (!FUNC(cclm_get_select_pos)(lc, x, y, w, h, avail_t, avail_l, cnt, pos)) |
| 200 |
|
831 |
return 0; |
| 201 |
|
|
|
| 202 |
|
101105 |
FUNC(cclm_select_luma)(fc, x0, y0, avail_t, avail_l, cnt, pos, sel[LUMA]); |
| 203 |
|
101105 |
FUNC(cclm_select_chroma)(fc, x, y, cnt, pos, sel); |
| 204 |
|
|
|
| 205 |
4/6
cclm_select_samples_10:
✓ Branch 7 → 8 taken 691 times.
✓ Branch 7 → 11 taken 95587 times.
cclm_select_samples_12:
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 11 not taken.
cclm_select_samples_8:
✓ Branch 7 → 8 taken 6 times.
✓ Branch 7 → 11 taken 4821 times.
|
101105 |
if (cnt[TOP] + cnt[LEFT] == 2) { |
| 206 |
4/6
cclm_select_samples_10:
✓ Branch 10 → 9 taken 2073 times.
✓ Branch 10 → 11 taken 691 times.
cclm_select_samples_12:
✗ Branch 10 → 9 not taken.
✗ Branch 10 → 11 not taken.
cclm_select_samples_8:
✓ Branch 10 → 9 taken 18 times.
✓ Branch 10 → 11 taken 6 times.
|
2788 |
for (int c_idx = 0; c_idx < VVC_MAX_SAMPLE_ARRAYS; c_idx++) { |
| 207 |
|
2091 |
sel[c_idx][3] = sel[c_idx][0]; |
| 208 |
|
2091 |
sel[c_idx][2] = sel[c_idx][1]; |
| 209 |
|
2091 |
sel[c_idx][0] = sel[c_idx][1]; |
| 210 |
|
2091 |
sel[c_idx][1] = sel[c_idx][3]; |
| 211 |
|
|
} |
| 212 |
|
|
} |
| 213 |
|
101105 |
return 1; |
| 214 |
|
|
} |
| 215 |
|
|
|
| 216 |
|
101105 |
static av_always_inline void FUNC(cclm_get_min_max)( |
| 217 |
|
|
const pixel sel[][MAX_PICK_POS * 2], int *min, int *max) |
| 218 |
|
|
{ |
| 219 |
|
101105 |
int min_grp_idx[] = { 0, 2 }; |
| 220 |
|
101105 |
int max_grp_idx[] = { 1, 3 }; |
| 221 |
|
|
|
| 222 |
4/6
cclm_get_min_max_10:
✓ Branch 2 → 3 taken 44312 times.
✓ Branch 2 → 4 taken 51966 times.
cclm_get_min_max_12:
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 4 not taken.
cclm_get_min_max_8:
✓ Branch 2 → 3 taken 2448 times.
✓ Branch 2 → 4 taken 2379 times.
|
101105 |
if (sel[LUMA][min_grp_idx[0]] > sel[LUMA][min_grp_idx[1]]) |
| 223 |
|
46760 |
FFSWAP(int, min_grp_idx[0], min_grp_idx[1]); |
| 224 |
4/6
cclm_get_min_max_10:
✓ Branch 4 → 5 taken 44725 times.
✓ Branch 4 → 6 taken 51553 times.
cclm_get_min_max_12:
✗ Branch 4 → 5 not taken.
✗ Branch 4 → 6 not taken.
cclm_get_min_max_8:
✓ Branch 4 → 5 taken 2561 times.
✓ Branch 4 → 6 taken 2266 times.
|
101105 |
if (sel[LUMA][max_grp_idx[0]] > sel[LUMA][max_grp_idx[1]]) |
| 225 |
|
47286 |
FFSWAP(int, max_grp_idx[0], max_grp_idx[1]); |
| 226 |
4/6
cclm_get_min_max_10:
✓ Branch 6 → 7 taken 9037 times.
✓ Branch 6 → 8 taken 87241 times.
cclm_get_min_max_12:
✗ Branch 6 → 7 not taken.
✗ Branch 6 → 8 not taken.
cclm_get_min_max_8:
✓ Branch 6 → 7 taken 469 times.
✓ Branch 6 → 8 taken 4358 times.
|
101105 |
if (sel[LUMA][min_grp_idx[0]] > sel[LUMA][max_grp_idx[1]]) { |
| 227 |
|
9506 |
FFSWAP(int, min_grp_idx[0], max_grp_idx[0]); |
| 228 |
|
9506 |
FFSWAP(int, min_grp_idx[1], max_grp_idx[1]); |
| 229 |
|
|
} |
| 230 |
4/6
cclm_get_min_max_10:
✓ Branch 8 → 9 taken 70452 times.
✓ Branch 8 → 10 taken 25826 times.
cclm_get_min_max_12:
✗ Branch 8 → 9 not taken.
✗ Branch 8 → 10 not taken.
cclm_get_min_max_8:
✓ Branch 8 → 9 taken 3827 times.
✓ Branch 8 → 10 taken 1000 times.
|
101105 |
if (sel[LUMA][min_grp_idx[1]] > sel[LUMA][max_grp_idx[0]]) |
| 231 |
|
74279 |
FFSWAP(int, min_grp_idx[1], max_grp_idx[0]); |
| 232 |
4/6
cclm_get_min_max_10:
✓ Branch 12 → 11 taken 288834 times.
✓ Branch 12 → 13 taken 96278 times.
cclm_get_min_max_12:
✗ Branch 12 → 11 not taken.
✗ Branch 12 → 13 not taken.
cclm_get_min_max_8:
✓ Branch 12 → 11 taken 14481 times.
✓ Branch 12 → 13 taken 4827 times.
|
404420 |
for (int c_idx = 0; c_idx < VVC_MAX_SAMPLE_ARRAYS; c_idx++) { |
| 233 |
|
303315 |
max[c_idx] = (sel[c_idx][max_grp_idx[0]] + sel[c_idx][max_grp_idx[1]] + 1) >> 1; |
| 234 |
|
303315 |
min[c_idx] = (sel[c_idx][min_grp_idx[0]] + sel[c_idx][min_grp_idx[1]] + 1) >> 1; |
| 235 |
|
|
} |
| 236 |
|
101105 |
} |
| 237 |
|
|
|
| 238 |
|
101936 |
static av_always_inline void FUNC(cclm_get_params)(const VVCLocalContext *lc, |
| 239 |
|
|
const int x0, const int y0, const int w, const int h, const int avail_t, const int avail_l, |
| 240 |
|
|
int *a, int *b, int *k) |
| 241 |
|
|
{ |
| 242 |
|
|
pixel sel[VVC_MAX_SAMPLE_ARRAYS][MAX_PICK_POS * 2]; |
| 243 |
|
|
int max[VVC_MAX_SAMPLE_ARRAYS], min[VVC_MAX_SAMPLE_ARRAYS]; |
| 244 |
|
|
int diff; |
| 245 |
|
|
|
| 246 |
4/6
cclm_get_params_10:
✓ Branch 3 → 4 taken 799 times.
✓ Branch 3 → 6 taken 96278 times.
cclm_get_params_12:
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 6 not taken.
cclm_get_params_8:
✓ Branch 3 → 4 taken 32 times.
✓ Branch 3 → 6 taken 4827 times.
|
101936 |
if (!FUNC(cclm_select_samples)(lc, x0, y0, w, h, avail_t, avail_l, sel)) { |
| 247 |
|
831 |
FUNC(cclm_get_params_default)(a, b, k); |
| 248 |
|
6990 |
return; |
| 249 |
|
|
} |
| 250 |
|
|
|
| 251 |
|
101105 |
FUNC(cclm_get_min_max)(sel, min, max); |
| 252 |
|
|
|
| 253 |
|
101105 |
diff = max[LUMA] - min[LUMA]; |
| 254 |
4/6
cclm_get_params_10:
✓ Branch 7 → 8 taken 6114 times.
✓ Branch 7 → 12 taken 90164 times.
cclm_get_params_12:
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 12 not taken.
cclm_get_params_8:
✓ Branch 7 → 8 taken 45 times.
✓ Branch 7 → 12 taken 4782 times.
|
101105 |
if (diff == 0) { |
| 255 |
4/6
cclm_get_params_10:
✓ Branch 10 → 9 taken 12228 times.
✓ Branch 10 → 11 taken 6114 times.
cclm_get_params_12:
✗ Branch 10 → 9 not taken.
✗ Branch 10 → 11 not taken.
cclm_get_params_8:
✓ Branch 10 → 9 taken 90 times.
✓ Branch 10 → 11 taken 45 times.
|
18477 |
for (int i = 0; i < 2; i++) { |
| 256 |
|
12318 |
a[i] = k[i] = 0; |
| 257 |
|
12318 |
b[i] = min[i + 1]; |
| 258 |
|
|
} |
| 259 |
|
6159 |
return; |
| 260 |
|
|
} |
| 261 |
4/6
cclm_get_params_10:
✓ Branch 23 → 13 taken 180328 times.
✓ Branch 23 → 24 taken 90164 times.
cclm_get_params_12:
✗ Branch 23 → 13 not taken.
✗ Branch 23 → 24 not taken.
cclm_get_params_8:
✓ Branch 23 → 13 taken 9564 times.
✓ Branch 23 → 24 taken 4782 times.
|
284838 |
for (int i = 0; i < 2; i++) { |
| 262 |
|
|
const static int div_sig_table[] = {0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0}; |
| 263 |
|
189892 |
const int diffc = max[i + 1] - min[i + 1]; |
| 264 |
|
189892 |
int x = av_log2(diff); |
| 265 |
|
|
int y, v, sign, add; |
| 266 |
|
189892 |
const int norm_diff = ((diff << 4) >> x) & 15; |
| 267 |
|
189892 |
x += (norm_diff) ? 1 : 0; |
| 268 |
4/6
cclm_get_params_10:
✓ Branch 13 → 14 taken 161977 times.
✓ Branch 13 → 15 taken 18351 times.
cclm_get_params_12:
✗ Branch 13 → 14 not taken.
✗ Branch 13 → 15 not taken.
cclm_get_params_8:
✓ Branch 13 → 14 taken 7753 times.
✓ Branch 13 → 15 taken 1811 times.
|
189892 |
y = abs(diffc) > 0 ? av_log2(abs(diffc)) + 1 : 0; |
| 269 |
|
189892 |
v = div_sig_table[norm_diff] | 8; |
| 270 |
|
189892 |
add = (1 << y >> 1); |
| 271 |
|
189892 |
a[i] = (diffc * v + add) >> y; |
| 272 |
|
189892 |
k[i] = FFMAX(1, 3 + x -y); |
| 273 |
4/6
cclm_get_params_10:
✓ Branch 16 → 17 taken 79713 times.
✓ Branch 16 → 18 taken 100615 times.
cclm_get_params_12:
✗ Branch 16 → 17 not taken.
✗ Branch 16 → 18 not taken.
cclm_get_params_8:
✓ Branch 16 → 17 taken 4498 times.
✓ Branch 16 → 18 taken 5066 times.
|
189892 |
sign = a[i] < 0 ? -1 : (a[i] > 0); |
| 274 |
3/6
cclm_get_params_10:
✓ Branch 19 → 20 taken 1731 times.
✓ Branch 19 → 21 taken 178597 times.
cclm_get_params_12:
✗ Branch 19 → 20 not taken.
✗ Branch 19 → 21 not taken.
cclm_get_params_8:
✗ Branch 19 → 20 not taken.
✓ Branch 19 → 21 taken 9564 times.
|
189892 |
a[i] = ((3 + x - y) < 1) ? sign * 15 : a[i]; |
| 275 |
|
189892 |
b[i] = min[i + 1] - ((a[i] * min[0]) >> k[i]); |
| 276 |
|
|
} |
| 277 |
|
|
|
| 278 |
|
|
} |
| 279 |
|
|
|
| 280 |
|
|
#undef TOP |
| 281 |
|
|
#undef LEFT |
| 282 |
|
|
|
| 283 |
|
101936 |
static av_always_inline void FUNC(cclm_get_luma_rec_pixels)(const VVCFrameContext *fc, |
| 284 |
|
|
const int x0, const int y0, const int w, const int h, const int avail_t, const int avail_l, |
| 285 |
|
|
pixel *pdsy) |
| 286 |
|
|
{ |
| 287 |
|
101936 |
const int hs = fc->ps.sps->hshift[1]; |
| 288 |
|
101936 |
const int vs = fc->ps.sps->vshift[1]; |
| 289 |
|
101936 |
const ptrdiff_t stride = fc->frame->linesize[0] / sizeof(pixel); |
| 290 |
|
101936 |
const pixel *source = (pixel*)fc->frame->data[0] + x0 + y0 * stride; |
| 291 |
|
101936 |
const pixel *left = source - avail_l; |
| 292 |
|
101936 |
const pixel *top = source - avail_t * stride; |
| 293 |
|
|
|
| 294 |
|
101936 |
const VVCSPS *sps = fc->ps.sps; |
| 295 |
4/12
cclm_get_luma_rec_pixels_10:
✓ Branch 2 → 3 taken 13013 times.
✓ Branch 2 → 8 taken 84064 times.
✓ Branch 3 → 4 taken 13013 times.
✗ Branch 3 → 8 not taken.
cclm_get_luma_rec_pixels_12:
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 8 not taken.
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 8 not taken.
cclm_get_luma_rec_pixels_8:
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 8 taken 4859 times.
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 8 not taken.
|
101936 |
if (!hs && !vs) { |
| 296 |
2/6
cclm_get_luma_rec_pixels_10:
✓ Branch 6 → 5 taken 179928 times.
✓ Branch 6 → 7 taken 13013 times.
cclm_get_luma_rec_pixels_12:
✗ Branch 6 → 5 not taken.
✗ Branch 6 → 7 not taken.
cclm_get_luma_rec_pixels_8:
✗ Branch 6 → 5 not taken.
✗ Branch 6 → 7 not taken.
|
192941 |
for (int i = 0; i < h; i++) |
| 297 |
|
179928 |
memcpy(pdsy + i * w, source + i * stride, w * sizeof(pixel)); |
| 298 |
|
13013 |
return; |
| 299 |
|
|
} |
| 300 |
4/6
cclm_get_luma_rec_pixels_10:
✓ Branch 21 → 9 taken 777766 times.
✓ Branch 21 → 22 taken 84064 times.
cclm_get_luma_rec_pixels_12:
✗ Branch 21 → 9 not taken.
✗ Branch 21 → 22 not taken.
cclm_get_luma_rec_pixels_8:
✓ Branch 21 → 9 taken 28062 times.
✓ Branch 21 → 22 taken 4859 times.
|
894751 |
for (int i = 0; i < h; i++) { |
| 301 |
|
805828 |
const pixel *src = source; |
| 302 |
|
805828 |
const pixel *l = left; |
| 303 |
|
805828 |
const pixel *t = top; |
| 304 |
3/6
cclm_get_luma_rec_pixels_10:
✓ Branch 9 → 10 taken 93912 times.
✓ Branch 9 → 13 taken 683854 times.
cclm_get_luma_rec_pixels_12:
✗ Branch 9 → 10 not taken.
✗ Branch 9 → 13 not taken.
cclm_get_luma_rec_pixels_8:
✗ Branch 9 → 10 not taken.
✓ Branch 9 → 13 taken 28062 times.
|
805828 |
if (!vs) { |
| 305 |
2/6
cclm_get_luma_rec_pixels_10:
✓ Branch 12 → 11 taken 657504 times.
✓ Branch 12 → 20 taken 93912 times.
cclm_get_luma_rec_pixels_12:
✗ Branch 12 → 11 not taken.
✗ Branch 12 → 20 not taken.
cclm_get_luma_rec_pixels_8:
✗ Branch 12 → 11 not taken.
✗ Branch 12 → 20 not taken.
|
751416 |
for (int j = 0; j < w; j++) { |
| 306 |
|
657504 |
pixel pred = (*l + 2 * POS(0, 0) + POS(1, 0) + 2) >> 2; |
| 307 |
|
657504 |
pdsy[i * w + j] = pred; |
| 308 |
|
657504 |
src += 2; |
| 309 |
|
657504 |
l = src - 1; |
| 310 |
|
|
} |
| 311 |
|
|
|
| 312 |
|
|
} else { |
| 313 |
3/6
cclm_get_luma_rec_pixels_10:
✓ Branch 13 → 14 taken 54676 times.
✓ Branch 13 → 17 taken 629178 times.
cclm_get_luma_rec_pixels_12:
✗ Branch 13 → 14 not taken.
✗ Branch 13 → 17 not taken.
cclm_get_luma_rec_pixels_8:
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 17 taken 28062 times.
|
711916 |
if (sps->r->sps_chroma_vertical_collocated_flag) { |
| 314 |
2/6
cclm_get_luma_rec_pixels_10:
✓ Branch 16 → 15 taken 1396000 times.
✓ Branch 16 → 20 taken 54676 times.
cclm_get_luma_rec_pixels_12:
✗ Branch 16 → 15 not taken.
✗ Branch 16 → 20 not taken.
cclm_get_luma_rec_pixels_8:
✗ Branch 16 → 15 not taken.
✗ Branch 16 → 20 not taken.
|
1450676 |
for (int j = 0; j < w; j++) { |
| 315 |
|
1396000 |
pixel pred = (*l + *t + 4 * POS(0, 0) + POS(1, 0) + POS(0, 1) + 4) >> 3; |
| 316 |
|
1396000 |
pdsy[i * w + j] = pred; |
| 317 |
|
1396000 |
src += 2; |
| 318 |
|
1396000 |
t += 2; |
| 319 |
|
1396000 |
l = src - 1; |
| 320 |
|
|
} |
| 321 |
|
|
} else { |
| 322 |
4/6
cclm_get_luma_rec_pixels_10:
✓ Branch 19 → 18 taken 8766576 times.
✓ Branch 19 → 20 taken 629178 times.
cclm_get_luma_rec_pixels_12:
✗ Branch 19 → 18 not taken.
✗ Branch 19 → 20 not taken.
cclm_get_luma_rec_pixels_8:
✓ Branch 19 → 18 taken 199888 times.
✓ Branch 19 → 20 taken 28062 times.
|
9623704 |
for (int j = 0; j < w; j++) { |
| 323 |
|
8966464 |
pixel pred = (*l + *(l + stride) + 2 * POS(0, 0) + 2 * POS(0, 1) + POS(1, 0) + POS(1, 1) + 4) >> 3; |
| 324 |
|
|
|
| 325 |
|
8966464 |
pdsy[i * w + j] = pred; |
| 326 |
|
8966464 |
src += 2; |
| 327 |
|
8966464 |
l = src - 1; |
| 328 |
|
|
} |
| 329 |
|
|
} |
| 330 |
|
|
} |
| 331 |
|
805828 |
source += (stride << vs); |
| 332 |
|
805828 |
left += (stride << vs); |
| 333 |
|
805828 |
top = source - stride; |
| 334 |
|
|
} |
| 335 |
|
|
} |
| 336 |
|
|
|
| 337 |
|
305 |
static av_always_inline void FUNC(cclm_pred_default)(VVCFrameContext *fc, |
| 338 |
|
|
const int x, const int y, const int w, const int h, const int avail_t, const int avail_l) |
| 339 |
|
|
{ |
| 340 |
4/6
cclm_pred_default_10:
✓ Branch 10 → 3 taken 578 times.
✓ Branch 10 → 11 taken 289 times.
cclm_pred_default_12:
✗ Branch 10 → 3 not taken.
✗ Branch 10 → 11 not taken.
cclm_pred_default_8:
✓ Branch 10 → 3 taken 32 times.
✓ Branch 10 → 11 taken 16 times.
|
915 |
for (int c_idx = 1; c_idx < VVC_MAX_SAMPLE_ARRAYS; c_idx++) { |
| 341 |
|
610 |
const ptrdiff_t stride = fc->frame->linesize[c_idx] / sizeof(pixel); |
| 342 |
|
610 |
pixel *dst = (pixel*)fc->frame->data[c_idx] + x + y * stride; |
| 343 |
4/6
cclm_pred_default_10:
✓ Branch 8 → 4 taken 10336 times.
✓ Branch 8 → 9 taken 578 times.
cclm_pred_default_12:
✗ Branch 8 → 4 not taken.
✗ Branch 8 → 9 not taken.
cclm_pred_default_8:
✓ Branch 8 → 4 taken 432 times.
✓ Branch 8 → 9 taken 32 times.
|
11378 |
for (int i = 0; i < h; i++) { |
| 344 |
4/6
cclm_pred_default_10:
✓ Branch 6 → 5 taken 266304 times.
✓ Branch 6 → 7 taken 10336 times.
cclm_pred_default_12:
✗ Branch 6 → 5 not taken.
✗ Branch 6 → 7 not taken.
cclm_pred_default_8:
✓ Branch 6 → 5 taken 6272 times.
✓ Branch 6 → 7 taken 432 times.
|
283344 |
for (int j = 0; j < w; j++) { |
| 345 |
|
272576 |
dst[j] = 1 << (BIT_DEPTH - 1); |
| 346 |
|
|
} |
| 347 |
|
10768 |
dst += stride; |
| 348 |
|
|
} |
| 349 |
|
|
} |
| 350 |
|
305 |
} |
| 351 |
|
|
|
| 352 |
|
|
//8.4.5.2.14 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction mode |
| 353 |
|
102241 |
static void FUNC(intra_cclm_pred)(const VVCLocalContext *lc, const int x0, const int y0, |
| 354 |
|
|
const int width, const int height) |
| 355 |
|
|
{ |
| 356 |
|
102241 |
VVCFrameContext *fc = lc->fc; |
| 357 |
|
102241 |
const VVCSPS *sps = fc->ps.sps; |
| 358 |
|
102241 |
const int avail_t = ff_vvc_get_top_available(lc, x0, y0, 1, 0); |
| 359 |
|
102241 |
const int avail_l = ff_vvc_get_left_available(lc, x0, y0, 1, 0); |
| 360 |
|
102241 |
const int hs = sps->hshift[1]; |
| 361 |
|
102241 |
const int vs = sps->vshift[1]; |
| 362 |
|
102241 |
const int x = x0 >> hs; |
| 363 |
|
102241 |
const int y = y0 >> vs; |
| 364 |
|
102241 |
const int w = width >> hs; |
| 365 |
|
102241 |
const int h = height >> vs; |
| 366 |
|
|
int a[2], b[2], k[2]; |
| 367 |
|
|
|
| 368 |
|
|
pixel dsy[MAX_TB_SIZE * MAX_TB_SIZE]; |
| 369 |
8/12
intra_cclm_pred_10:
✓ Branch 4 → 5 taken 3597 times.
✓ Branch 4 → 8 taken 93769 times.
✓ Branch 5 → 6 taken 289 times.
✓ Branch 5 → 8 taken 3308 times.
intra_cclm_pred_12:
✗ Branch 4 → 5 not taken.
✗ Branch 4 → 8 not taken.
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 8 not taken.
intra_cclm_pred_8:
✓ Branch 4 → 5 taken 137 times.
✓ Branch 4 → 8 taken 4738 times.
✓ Branch 5 → 6 taken 16 times.
✓ Branch 5 → 8 taken 121 times.
|
102241 |
if (!avail_t && !avail_l) { |
| 370 |
|
305 |
FUNC(cclm_pred_default)(fc, x, y, w, h, avail_t, avail_l); |
| 371 |
|
305 |
return; |
| 372 |
|
|
} |
| 373 |
|
101936 |
FUNC(cclm_get_luma_rec_pixels)(fc, x0, y0, w, h, avail_t, avail_l, dsy); |
| 374 |
|
101936 |
FUNC(cclm_get_params) (lc, x0, y0, w, h, avail_t, avail_l, a, b, k); |
| 375 |
|
101936 |
FUNC(cclm_linear_pred)(fc, x0, y0, w, h, dsy, a, b, k); |
| 376 |
|
|
} |
| 377 |
|
|
|
| 378 |
|
21759 |
static int FUNC(lmcs_sum_samples)(const pixel *start, ptrdiff_t stride, const int avail, const int target_size) |
| 379 |
|
|
{ |
| 380 |
|
21759 |
const int size = FFMIN(avail, target_size); |
| 381 |
|
21759 |
int sum = 0; |
| 382 |
2/6
lmcs_sum_samples_10:
✓ Branch 4 → 3 taken 1368440 times.
✓ Branch 4 → 5 taken 21759 times.
lmcs_sum_samples_12:
✗ Branch 4 → 3 not taken.
✗ Branch 4 → 5 not taken.
lmcs_sum_samples_8:
✗ Branch 4 → 3 not taken.
✗ Branch 4 → 5 not taken.
|
1390199 |
for (int i = 0; i < size; i++) { |
| 383 |
|
1368440 |
sum += *start; |
| 384 |
|
1368440 |
start += stride; |
| 385 |
|
|
} |
| 386 |
|
21759 |
sum += *(start - stride) * (target_size - size); |
| 387 |
|
21759 |
return sum; |
| 388 |
|
|
} |
| 389 |
|
|
|
| 390 |
|
|
// 8.7.5.3 Picture reconstruction with luma dependent chroma residual scaling process for chroma samples |
| 391 |
|
157766 |
static int FUNC(lmcs_derive_chroma_scale)(VVCLocalContext *lc, const int x0, const int y0) |
| 392 |
|
|
{ |
| 393 |
|
157766 |
VVCFrameContext *fc = lc->fc; |
| 394 |
|
157766 |
const VVCLMCS *lmcs = &fc->ps.lmcs; |
| 395 |
|
157766 |
const int size_y = FFMIN(fc->ps.sps->ctb_size_y, 64); |
| 396 |
|
|
|
| 397 |
|
157766 |
const int x = x0 & ~(size_y - 1); |
| 398 |
|
157766 |
const int y = y0 & ~(size_y - 1); |
| 399 |
4/12
lmcs_derive_chroma_scale_10:
✓ Branch 2 → 3 taken 146229 times.
✓ Branch 2 → 4 taken 11537 times.
✓ Branch 3 → 4 taken 930 times.
✓ Branch 3 → 21 taken 145299 times.
lmcs_derive_chroma_scale_12:
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 4 not taken.
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 21 not taken.
lmcs_derive_chroma_scale_8:
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 4 not taken.
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 21 not taken.
|
157766 |
if (lc->lmcs.x_vpdu != x || lc->lmcs.y_vpdu != y) { |
| 400 |
|
12467 |
int cnt = 0, luma = 0, i; |
| 401 |
|
12467 |
const pixel *src = (const pixel *)(fc->frame->data[LUMA] + y * fc->frame->linesize[LUMA] + (x << fc->ps.sps->pixel_shift)); |
| 402 |
|
12467 |
const ptrdiff_t stride = fc->frame->linesize[LUMA] / sizeof(pixel); |
| 403 |
|
12467 |
const int avail_t = ff_vvc_get_top_available (lc, x, y, 1, 0); |
| 404 |
|
12467 |
const int avail_l = ff_vvc_get_left_available(lc, x, y, 1, 0); |
| 405 |
2/6
lmcs_derive_chroma_scale_10:
✓ Branch 6 → 7 taken 11112 times.
✓ Branch 6 → 9 taken 1355 times.
lmcs_derive_chroma_scale_12:
✗ Branch 6 → 7 not taken.
✗ Branch 6 → 9 not taken.
lmcs_derive_chroma_scale_8:
✗ Branch 6 → 7 not taken.
✗ Branch 6 → 9 not taken.
|
12467 |
if (avail_l) { |
| 406 |
|
11112 |
luma += FUNC(lmcs_sum_samples)(src - 1, stride, fc->ps.pps->height - y, size_y); |
| 407 |
|
11112 |
cnt = size_y; |
| 408 |
|
|
} |
| 409 |
2/6
lmcs_derive_chroma_scale_10:
✓ Branch 9 → 10 taken 10647 times.
✓ Branch 9 → 12 taken 1820 times.
lmcs_derive_chroma_scale_12:
✗ Branch 9 → 10 not taken.
✗ Branch 9 → 12 not taken.
lmcs_derive_chroma_scale_8:
✗ Branch 9 → 10 not taken.
✗ Branch 9 → 12 not taken.
|
12467 |
if (avail_t) { |
| 410 |
|
10647 |
luma += FUNC(lmcs_sum_samples)(src - stride, 1, fc->ps.pps->width - x, size_y); |
| 411 |
|
10647 |
cnt += size_y; |
| 412 |
|
|
} |
| 413 |
2/6
lmcs_derive_chroma_scale_10:
✓ Branch 12 → 13 taken 12127 times.
✓ Branch 12 → 14 taken 340 times.
lmcs_derive_chroma_scale_12:
✗ Branch 12 → 13 not taken.
✗ Branch 12 → 14 not taken.
lmcs_derive_chroma_scale_8:
✗ Branch 12 → 13 not taken.
✗ Branch 12 → 14 not taken.
|
12467 |
if (cnt) |
| 414 |
|
12127 |
luma = (luma + (cnt >> 1)) >> av_log2(cnt); |
| 415 |
|
|
else |
| 416 |
|
340 |
luma = 1 << (BIT_DEPTH - 1); |
| 417 |
|
|
|
| 418 |
2/6
lmcs_derive_chroma_scale_10:
✓ Branch 19 → 16 taken 81442 times.
✓ Branch 19 → 20 taken 466 times.
lmcs_derive_chroma_scale_12:
✗ Branch 19 → 16 not taken.
✗ Branch 19 → 20 not taken.
lmcs_derive_chroma_scale_8:
✗ Branch 19 → 16 not taken.
✗ Branch 19 → 20 not taken.
|
81908 |
for (i = lmcs->min_bin_idx; i <= lmcs->max_bin_idx; i++) { |
| 419 |
2/6
lmcs_derive_chroma_scale_10:
✓ Branch 16 → 17 taken 12001 times.
✓ Branch 16 → 18 taken 69441 times.
lmcs_derive_chroma_scale_12:
✗ Branch 16 → 17 not taken.
✗ Branch 16 → 18 not taken.
lmcs_derive_chroma_scale_8:
✗ Branch 16 → 17 not taken.
✗ Branch 16 → 18 not taken.
|
81442 |
if (luma < lmcs->pivot[i + 1]) |
| 420 |
|
12001 |
break; |
| 421 |
|
|
} |
| 422 |
|
12467 |
i = FFMIN(i, LMCS_MAX_BIN_SIZE - 1); |
| 423 |
|
|
|
| 424 |
|
12467 |
lc->lmcs.chroma_scale = lmcs->chroma_scale_coeff[i]; |
| 425 |
|
12467 |
lc->lmcs.x_vpdu = x; |
| 426 |
|
12467 |
lc->lmcs.y_vpdu = y; |
| 427 |
|
|
} |
| 428 |
|
157766 |
return lc->lmcs.chroma_scale; |
| 429 |
|
|
} |
| 430 |
|
|
|
| 431 |
|
|
// 8.7.5.3 Picture reconstruction with luma dependent chroma residual scaling process for chroma samples |
| 432 |
|
157766 |
static void FUNC(lmcs_scale_chroma)(VVCLocalContext *lc, int *coeff, |
| 433 |
|
|
const int width, const int height, const int x0_cu, const int y0_cu) |
| 434 |
|
|
{ |
| 435 |
|
157766 |
const int chroma_scale = FUNC(lmcs_derive_chroma_scale)(lc, x0_cu, y0_cu); |
| 436 |
|
|
|
| 437 |
2/6
lmcs_scale_chroma_10:
✓ Branch 11 → 4 taken 1659712 times.
✓ Branch 11 → 12 taken 157766 times.
lmcs_scale_chroma_12:
✗ Branch 11 → 4 not taken.
✗ Branch 11 → 12 not taken.
lmcs_scale_chroma_8:
✗ Branch 11 → 4 not taken.
✗ Branch 11 → 12 not taken.
|
1817478 |
for (int y = 0; y < height; y++) { |
| 438 |
2/6
lmcs_scale_chroma_10:
✓ Branch 9 → 5 taken 25263528 times.
✓ Branch 9 → 10 taken 1659712 times.
lmcs_scale_chroma_12:
✗ Branch 9 → 5 not taken.
✗ Branch 9 → 10 not taken.
lmcs_scale_chroma_8:
✗ Branch 9 → 5 not taken.
✗ Branch 9 → 10 not taken.
|
26923240 |
for (int x = 0; x < width; x++) { |
| 439 |
|
25263528 |
const int c = av_clip_intp2(*coeff, BIT_DEPTH); |
| 440 |
|
|
|
| 441 |
2/6
lmcs_scale_chroma_10:
✓ Branch 5 → 6 taken 11317251 times.
✓ Branch 5 → 7 taken 13946277 times.
lmcs_scale_chroma_12:
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 7 not taken.
lmcs_scale_chroma_8:
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 7 not taken.
|
25263528 |
if (c > 0) |
| 442 |
|
11317251 |
*coeff = (c * chroma_scale + (1 << 10)) >> 11; |
| 443 |
|
|
else |
| 444 |
|
13946277 |
*coeff = -((-c * chroma_scale + (1 << 10)) >> 11); |
| 445 |
|
25263528 |
coeff++; |
| 446 |
|
|
} |
| 447 |
|
|
} |
| 448 |
|
157766 |
} |
| 449 |
|
|
|
| 450 |
|
120355 |
static av_always_inline void FUNC(ref_filter)(const pixel *left, const pixel *top, |
| 451 |
|
|
pixel *filtered_left, pixel *filtered_top, const int left_size, const int top_size, |
| 452 |
|
|
const int unfilter_last_one) |
| 453 |
|
|
{ |
| 454 |
|
120355 |
filtered_left[-1] = filtered_top[-1] = (left[0] + 2 * left[-1] + top[0] + 2 ) >> 2; |
| 455 |
4/6
ref_filter_10:
✓ Branch 4 → 3 taken 1951790 times.
✓ Branch 4 → 5 taken 116375 times.
ref_filter_12:
✗ Branch 4 → 3 not taken.
✗ Branch 4 → 5 not taken.
ref_filter_8:
✓ Branch 4 → 3 taken 57973 times.
✓ Branch 4 → 5 taken 3980 times.
|
2130118 |
for (int i = 0; i < left_size - unfilter_last_one; i++) { |
| 456 |
|
2009763 |
filtered_left[i] = (left[i- 1] + 2 * left[i] + left[i + 1] + 2) >> 2; |
| 457 |
|
|
} |
| 458 |
4/6
ref_filter_10:
✓ Branch 7 → 6 taken 2276142 times.
✓ Branch 7 → 8 taken 116375 times.
ref_filter_12:
✗ Branch 7 → 6 not taken.
✗ Branch 7 → 8 not taken.
ref_filter_8:
✓ Branch 7 → 6 taken 54517 times.
✓ Branch 7 → 8 taken 3980 times.
|
2451014 |
for (int i = 0; i < top_size - unfilter_last_one; i++) { |
| 459 |
|
2330659 |
filtered_top[i] = (top[i-1] + 2 * top[i] + top[i + 1] + 2) >> 2; |
| 460 |
|
|
} |
| 461 |
4/6
ref_filter_10:
✓ Branch 8 → 9 taken 5004 times.
✓ Branch 8 → 10 taken 111371 times.
ref_filter_12:
✗ Branch 8 → 9 not taken.
✗ Branch 8 → 10 not taken.
ref_filter_8:
✓ Branch 8 → 9 taken 525 times.
✓ Branch 8 → 10 taken 3455 times.
|
120355 |
if (unfilter_last_one) { |
| 462 |
|
5529 |
filtered_top[top_size - 1] = top[top_size - 1]; |
| 463 |
|
5529 |
filtered_left[left_size - 1] = left[left_size - 1]; |
| 464 |
|
|
} |
| 465 |
|
120355 |
} |
| 466 |
|
|
|
| 467 |
|
1140995 |
static av_always_inline void FUNC(prepare_intra_edge_params)(const VVCLocalContext *lc, |
| 468 |
|
|
IntraEdgeParams* edge, const pixel *src, const ptrdiff_t stride, |
| 469 |
|
|
const int x, int y, int w, int h, int c_idx, const int is_intra_mip, |
| 470 |
|
|
const int mode, const int ref_idx, const int need_pdpc) |
| 471 |
|
|
{ |
| 472 |
|
|
#define EXTEND(ptr, val, len) \ |
| 473 |
|
|
do { \ |
| 474 |
|
|
for (i = 0; i < (len); i++) \ |
| 475 |
|
|
*(ptr + i) = val; \ |
| 476 |
|
|
} while (0) |
| 477 |
|
1140995 |
const CodingUnit *cu = lc->cu; |
| 478 |
3/6
prepare_intra_edge_params_10:
✓ Branch 2 → 3 taken 1000162 times.
✓ Branch 2 → 4 taken 113651 times.
prepare_intra_edge_params_12:
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 4 not taken.
prepare_intra_edge_params_8:
✓ Branch 2 → 3 taken 27182 times.
✗ Branch 2 → 4 not taken.
|
1140995 |
const int ref_filter_flag = is_intra_mip ? 0 : ff_vvc_ref_filter_flag_derive(mode); |
| 479 |
8/12
prepare_intra_edge_params_10:
✓ Branch 6 → 7 taken 557896 times.
✓ Branch 6 → 11 taken 510637 times.
✓ Branch 7 → 8 taken 381124 times.
✓ Branch 7 → 11 taken 176772 times.
prepare_intra_edge_params_12:
✗ Branch 6 → 7 not taken.
✗ Branch 6 → 11 not taken.
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 11 not taken.
prepare_intra_edge_params_8:
✓ Branch 6 → 7 taken 10433 times.
✓ Branch 6 → 11 taken 16749 times.
✓ Branch 7 → 8 taken 8231 times.
✓ Branch 7 → 11 taken 2202 times.
|
1095715 |
const int filter_flag = !ref_idx && w * h > 32 && !c_idx && |
| 480 |
10/18
prepare_intra_edge_params_10:
✓ Branch 5 → 6 taken 1068533 times.
✓ Branch 5 → 11 taken 45280 times.
✓ Branch 8 → 9 taken 324236 times.
✓ Branch 8 → 11 taken 56888 times.
✓ Branch 9 → 10 taken 116375 times.
✓ Branch 9 → 11 taken 207861 times.
prepare_intra_edge_params_12:
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 11 not taken.
✗ Branch 8 → 9 not taken.
✗ Branch 8 → 11 not taken.
✗ Branch 9 → 10 not taken.
✗ Branch 9 → 11 not taken.
prepare_intra_edge_params_8:
✓ Branch 5 → 6 taken 27182 times.
✗ Branch 5 → 11 not taken.
✓ Branch 8 → 9 taken 8231 times.
✗ Branch 8 → 11 not taken.
✓ Branch 9 → 10 taken 3980 times.
✓ Branch 9 → 11 taken 4251 times.
|
2236710 |
cu->isp_split_type == ISP_NO_SPLIT && ref_filter_flag; |
| 481 |
|
1140995 |
int cand_up_left = lc->na.cand_up_left; |
| 482 |
|
1140995 |
pixel *left = (pixel*)edge->left_array + MAX_TB_SIZE + 3; |
| 483 |
|
1140995 |
pixel *top = (pixel*)edge->top_array + MAX_TB_SIZE + 3; |
| 484 |
|
1140995 |
pixel *filtered_left = (pixel*)edge->filtered_left_array + MAX_TB_SIZE + 3; |
| 485 |
|
1140995 |
pixel *filtered_top = (pixel*)edge->filtered_top_array + MAX_TB_SIZE + 3; |
| 486 |
|
1140995 |
const int ref_line = ref_idx == 3 ? -4 : (-1 - ref_idx); |
| 487 |
|
|
int left_size, top_size, unfilter_left_size, unfilter_top_size; |
| 488 |
|
|
int left_available, top_available; |
| 489 |
|
|
int refw, refh; |
| 490 |
|
|
int intra_pred_angle, inv_angle; |
| 491 |
|
|
int i; |
| 492 |
|
|
|
| 493 |
7/12
prepare_intra_edge_params_10:
✓ Branch 12 → 13 taken 1000162 times.
✓ Branch 12 → 14 taken 113651 times.
✓ Branch 13 → 14 taken 361151 times.
✓ Branch 13 → 15 taken 639011 times.
prepare_intra_edge_params_12:
✗ Branch 12 → 13 not taken.
✗ Branch 12 → 14 not taken.
✗ Branch 13 → 14 not taken.
✗ Branch 13 → 15 not taken.
prepare_intra_edge_params_8:
✓ Branch 12 → 13 taken 27182 times.
✗ Branch 12 → 14 not taken.
✓ Branch 13 → 14 taken 11021 times.
✓ Branch 13 → 15 taken 16161 times.
|
1140995 |
if (is_intra_mip || mode == INTRA_PLANAR) { |
| 494 |
|
485823 |
left_size = h + 1; |
| 495 |
|
485823 |
top_size = w + 1; |
| 496 |
|
485823 |
unfilter_left_size = left_size + filter_flag; |
| 497 |
|
485823 |
unfilter_top_size = top_size + filter_flag; |
| 498 |
4/6
prepare_intra_edge_params_10:
✓ Branch 15 → 16 taken 74629 times.
✓ Branch 15 → 17 taken 564382 times.
prepare_intra_edge_params_12:
✗ Branch 15 → 16 not taken.
✗ Branch 15 → 17 not taken.
prepare_intra_edge_params_8:
✓ Branch 15 → 16 taken 2571 times.
✓ Branch 15 → 17 taken 13590 times.
|
655172 |
} else if (mode == INTRA_DC) { |
| 499 |
|
77200 |
unfilter_left_size = left_size = h; |
| 500 |
|
77200 |
unfilter_top_size = top_size = w; |
| 501 |
4/6
prepare_intra_edge_params_10:
✓ Branch 17 → 18 taken 85438 times.
✓ Branch 17 → 22 taken 478944 times.
prepare_intra_edge_params_12:
✗ Branch 17 → 18 not taken.
✗ Branch 17 → 22 not taken.
prepare_intra_edge_params_8:
✓ Branch 17 → 18 taken 1216 times.
✓ Branch 17 → 22 taken 12374 times.
|
577972 |
} else if (mode == INTRA_VERT) { |
| 502 |
|
|
//we may need 1 pixel to predict the top left. |
| 503 |
3/6
prepare_intra_edge_params_10:
✓ Branch 18 → 19 taken 65583 times.
✓ Branch 18 → 20 taken 19855 times.
prepare_intra_edge_params_12:
✗ Branch 18 → 19 not taken.
✗ Branch 18 → 20 not taken.
prepare_intra_edge_params_8:
✓ Branch 18 → 19 taken 1216 times.
✗ Branch 18 → 20 not taken.
|
86654 |
unfilter_left_size = left_size = need_pdpc ? h : 1; |
| 504 |
|
86654 |
unfilter_top_size = top_size = w; |
| 505 |
4/6
prepare_intra_edge_params_10:
✓ Branch 22 → 23 taken 85604 times.
✓ Branch 22 → 27 taken 393340 times.
prepare_intra_edge_params_12:
✗ Branch 22 → 23 not taken.
✗ Branch 22 → 27 not taken.
prepare_intra_edge_params_8:
✓ Branch 22 → 23 taken 2298 times.
✓ Branch 22 → 27 taken 10076 times.
|
491318 |
} else if (mode == INTRA_HORZ) { |
| 506 |
|
87902 |
unfilter_left_size = left_size = h; |
| 507 |
|
|
//even need_pdpc == 0, we may need 1 pixel to predict the top left. |
| 508 |
3/6
prepare_intra_edge_params_10:
✓ Branch 23 → 24 taken 62232 times.
✓ Branch 23 → 25 taken 23372 times.
prepare_intra_edge_params_12:
✗ Branch 23 → 24 not taken.
✗ Branch 23 → 25 not taken.
prepare_intra_edge_params_8:
✓ Branch 23 → 24 taken 2298 times.
✗ Branch 23 → 25 not taken.
|
87902 |
unfilter_top_size = top_size = need_pdpc ? w : 1; |
| 509 |
|
|
} else { |
| 510 |
5/12
prepare_intra_edge_params_10:
✓ Branch 27 → 28 taken 92584 times.
✓ Branch 27 → 29 taken 300756 times.
✓ Branch 28 → 29 taken 3012 times.
✓ Branch 28 → 30 taken 89572 times.
prepare_intra_edge_params_12:
✗ Branch 27 → 28 not taken.
✗ Branch 27 → 29 not taken.
✗ Branch 28 → 29 not taken.
✗ Branch 28 → 30 not taken.
prepare_intra_edge_params_8:
✗ Branch 27 → 28 not taken.
✓ Branch 27 → 29 taken 10076 times.
✗ Branch 28 → 29 not taken.
✗ Branch 28 → 30 not taken.
|
403416 |
if (cu->isp_split_type == ISP_NO_SPLIT || c_idx) { |
| 511 |
|
313844 |
refw = w * 2; |
| 512 |
|
313844 |
refh = h * 2; |
| 513 |
|
|
} else { |
| 514 |
|
89572 |
refw = cu->cb_width + w; |
| 515 |
|
89572 |
refh = cu->cb_height + h; |
| 516 |
|
|
} |
| 517 |
|
403416 |
intra_pred_angle = ff_vvc_intra_pred_angle_derive(mode); |
| 518 |
|
403416 |
inv_angle = ff_vvc_intra_inv_angle_derive(intra_pred_angle); |
| 519 |
|
403416 |
unfilter_top_size = top_size = refw; |
| 520 |
|
403416 |
unfilter_left_size = left_size = refh; |
| 521 |
|
|
} |
| 522 |
|
|
|
| 523 |
|
1140995 |
left_available = ff_vvc_get_left_available(lc, x, y, unfilter_left_size, c_idx); |
| 524 |
4/6
prepare_intra_edge_params_10:
✓ Branch 37 → 36 taken 11545067 times.
✓ Branch 37 → 38 taken 1113813 times.
prepare_intra_edge_params_12:
✗ Branch 37 → 36 not taken.
✗ Branch 37 → 38 not taken.
prepare_intra_edge_params_8:
✓ Branch 37 → 36 taken 207799 times.
✓ Branch 37 → 38 taken 27182 times.
|
12893861 |
for (i = 0; i < left_available; i++) |
| 525 |
|
11752866 |
left[i] = POS(ref_line, i); |
| 526 |
|
|
|
| 527 |
|
1140995 |
top_available = ff_vvc_get_top_available(lc, x, y, unfilter_top_size, c_idx); |
| 528 |
|
1140995 |
memcpy(top, src + ref_line * stride, top_available * sizeof(pixel)); |
| 529 |
|
|
|
| 530 |
2/6
prepare_intra_edge_params_10:
✗ Branch 39 → 40 not taken.
✓ Branch 39 → 41 taken 1113813 times.
prepare_intra_edge_params_12:
✗ Branch 39 → 40 not taken.
✗ Branch 39 → 41 not taken.
prepare_intra_edge_params_8:
✗ Branch 39 → 40 not taken.
✓ Branch 39 → 41 taken 27182 times.
|
1140995 |
av_assume(ref_line >= -4); |
| 531 |
|
|
|
| 532 |
4/6
prepare_intra_edge_params_10:
✓ Branch 50 → 42 taken 1185883 times.
✓ Branch 50 → 51 taken 1113813 times.
prepare_intra_edge_params_12:
✗ Branch 50 → 42 not taken.
✗ Branch 50 → 51 not taken.
prepare_intra_edge_params_8:
✓ Branch 50 → 42 taken 27182 times.
✓ Branch 50 → 51 taken 27182 times.
|
2354060 |
for (int i = -1; i >= ref_line; i--) { |
| 533 |
4/6
prepare_intra_edge_params_10:
✓ Branch 42 → 43 taken 1134189 times.
✓ Branch 42 → 44 taken 51694 times.
prepare_intra_edge_params_12:
✗ Branch 42 → 43 not taken.
✗ Branch 42 → 44 not taken.
prepare_intra_edge_params_8:
✓ Branch 42 → 43 taken 26205 times.
✓ Branch 42 → 44 taken 977 times.
|
1213065 |
if (cand_up_left) { |
| 534 |
|
1160394 |
left[i] = POS(ref_line, i); |
| 535 |
|
1160394 |
top[i] = POS(i, ref_line); |
| 536 |
4/6
prepare_intra_edge_params_10:
✓ Branch 44 → 45 taken 23767 times.
✓ Branch 44 → 46 taken 27927 times.
prepare_intra_edge_params_12:
✗ Branch 44 → 45 not taken.
✗ Branch 44 → 46 not taken.
prepare_intra_edge_params_8:
✓ Branch 44 → 45 taken 461 times.
✓ Branch 44 → 46 taken 516 times.
|
52671 |
} else if (left_available) { |
| 537 |
|
24228 |
left[i] = top[i] = left[0]; |
| 538 |
4/6
prepare_intra_edge_params_10:
✓ Branch 46 → 47 taken 26907 times.
✓ Branch 46 → 48 taken 1020 times.
prepare_intra_edge_params_12:
✗ Branch 46 → 47 not taken.
✗ Branch 46 → 48 not taken.
prepare_intra_edge_params_8:
✓ Branch 46 → 47 taken 482 times.
✓ Branch 46 → 48 taken 34 times.
|
28443 |
} else if (top_available) { |
| 539 |
|
27389 |
left[i] = top[i] = top[0]; |
| 540 |
|
|
} else { |
| 541 |
|
1054 |
left[i] = top[i] = 1 << (BIT_DEPTH - 1); |
| 542 |
|
|
} |
| 543 |
|
|
} |
| 544 |
|
|
|
| 545 |
4/6
prepare_intra_edge_params_10:
✓ Branch 53 → 52 taken 3614466 times.
✓ Branch 53 → 54 taken 1113813 times.
prepare_intra_edge_params_12:
✗ Branch 53 → 52 not taken.
✗ Branch 53 → 54 not taken.
prepare_intra_edge_params_8:
✓ Branch 53 → 52 taken 39131 times.
✓ Branch 53 → 54 taken 27182 times.
|
4794592 |
EXTEND(top + top_available, top[top_available-1], unfilter_top_size - top_available); |
| 546 |
4/6
prepare_intra_edge_params_10:
✓ Branch 56 → 55 taken 2752445 times.
✓ Branch 56 → 57 taken 1113813 times.
prepare_intra_edge_params_12:
✗ Branch 56 → 55 not taken.
✗ Branch 56 → 57 not taken.
prepare_intra_edge_params_8:
✓ Branch 56 → 55 taken 66401 times.
✓ Branch 56 → 57 taken 27182 times.
|
3959841 |
EXTEND(left + left_available, left[left_available-1], unfilter_left_size - left_available); |
| 547 |
|
|
|
| 548 |
4/6
prepare_intra_edge_params_10:
✓ Branch 57 → 58 taken 387287 times.
✓ Branch 57 → 64 taken 726526 times.
prepare_intra_edge_params_12:
✗ Branch 57 → 58 not taken.
✗ Branch 57 → 64 not taken.
prepare_intra_edge_params_8:
✓ Branch 57 → 58 taken 12595 times.
✓ Branch 57 → 64 taken 14587 times.
|
1140995 |
if (ref_filter_flag) { |
| 549 |
14/24
prepare_intra_edge_params_10:
✓ Branch 58 → 59 taken 386330 times.
✓ Branch 58 → 64 taken 957 times.
✓ Branch 59 → 60 taken 217743 times.
✓ Branch 59 → 64 taken 168587 times.
✓ Branch 60 → 61 taken 143395 times.
✓ Branch 60 → 64 taken 74348 times.
✓ Branch 61 → 62 taken 116375 times.
✓ Branch 61 → 64 taken 27020 times.
prepare_intra_edge_params_12:
✗ Branch 58 → 59 not taken.
✗ Branch 58 → 64 not taken.
✗ Branch 59 → 60 not taken.
✗ Branch 59 → 64 not taken.
✗ Branch 60 → 61 not taken.
✗ Branch 60 → 64 not taken.
✗ Branch 61 → 62 not taken.
✗ Branch 61 → 64 not taken.
prepare_intra_edge_params_8:
✓ Branch 58 → 59 taken 12595 times.
✗ Branch 58 → 64 not taken.
✓ Branch 59 → 60 taken 4724 times.
✓ Branch 59 → 64 taken 7871 times.
✓ Branch 60 → 61 taken 3980 times.
✓ Branch 60 → 64 taken 744 times.
✓ Branch 61 → 62 taken 3980 times.
✗ Branch 61 → 64 not taken.
|
399882 |
if (!ref_idx && w * h > 32 && !c_idx && cu->isp_split_type == ISP_NO_SPLIT ) { |
| 550 |
|
120355 |
const int unfilter_last_one = left_size == unfilter_left_size; |
| 551 |
|
120355 |
FUNC(ref_filter)(left, top, filtered_left, filtered_top, unfilter_left_size, unfilter_top_size, unfilter_last_one); |
| 552 |
|
120355 |
left = filtered_left; |
| 553 |
|
120355 |
top = filtered_top; |
| 554 |
|
|
} |
| 555 |
|
|
} |
| 556 |
11/18
prepare_intra_edge_params_10:
✓ Branch 64 → 65 taken 1000162 times.
✓ Branch 64 → 89 taken 113651 times.
✓ Branch 65 → 66 taken 639011 times.
✓ Branch 65 → 89 taken 361151 times.
✓ Branch 66 → 67 taken 564382 times.
✓ Branch 66 → 89 taken 74629 times.
prepare_intra_edge_params_12:
✗ Branch 64 → 65 not taken.
✗ Branch 64 → 89 not taken.
✗ Branch 65 → 66 not taken.
✗ Branch 65 → 89 not taken.
✗ Branch 66 → 67 not taken.
✗ Branch 66 → 89 not taken.
prepare_intra_edge_params_8:
✓ Branch 64 → 65 taken 27182 times.
✗ Branch 64 → 89 not taken.
✓ Branch 65 → 66 taken 16161 times.
✓ Branch 65 → 89 taken 11021 times.
✓ Branch 66 → 67 taken 13590 times.
✓ Branch 66 → 89 taken 2571 times.
|
1140995 |
if (!is_intra_mip && mode != INTRA_PLANAR && mode != INTRA_DC) { |
| 557 |
10/18
prepare_intra_edge_params_10:
✓ Branch 67 → 68 taken 538246 times.
✓ Branch 67 → 70 taken 26136 times.
✓ Branch 68 → 69 taken 500014 times.
✓ Branch 68 → 70 taken 38232 times.
✓ Branch 69 → 70 taken 112443 times.
✓ Branch 69 → 71 taken 387571 times.
prepare_intra_edge_params_12:
✗ Branch 67 → 68 not taken.
✗ Branch 67 → 70 not taken.
✗ Branch 68 → 69 not taken.
✗ Branch 68 → 70 not taken.
✗ Branch 69 → 70 not taken.
✗ Branch 69 → 71 not taken.
prepare_intra_edge_params_8:
✓ Branch 67 → 68 taken 12016 times.
✓ Branch 67 → 70 taken 1574 times.
✓ Branch 68 → 69 taken 12016 times.
✗ Branch 68 → 70 not taken.
✗ Branch 69 → 70 not taken.
✓ Branch 69 → 71 taken 12016 times.
|
577972 |
if (ref_filter_flag || ref_idx || cu->isp_split_type != ISP_NO_SPLIT) { |
| 558 |
|
178385 |
edge->filter_flag = 0; |
| 559 |
|
|
} else { |
| 560 |
|
399587 |
const int min_dist_ver_hor = FFMIN(abs(mode - 50), abs(mode - 18)); |
| 561 |
|
399587 |
const int intra_hor_ver_dist_thres[] = {24, 14, 2, 0, 0}; |
| 562 |
|
399587 |
const int ntbs = (av_log2(w) + av_log2(h)) >> 1; |
| 563 |
|
399587 |
edge->filter_flag = min_dist_ver_hor > intra_hor_ver_dist_thres[ntbs - 2]; |
| 564 |
|
|
} |
| 565 |
|
|
|
| 566 |
8/12
prepare_intra_edge_params_10:
✓ Branch 72 → 73 taken 478944 times.
✓ Branch 72 → 89 taken 85438 times.
✓ Branch 73 → 74 taken 393340 times.
✓ Branch 73 → 89 taken 85604 times.
prepare_intra_edge_params_12:
✗ Branch 72 → 73 not taken.
✗ Branch 72 → 89 not taken.
✗ Branch 73 → 74 not taken.
✗ Branch 73 → 89 not taken.
prepare_intra_edge_params_8:
✓ Branch 72 → 73 taken 12374 times.
✓ Branch 72 → 89 taken 1216 times.
✓ Branch 73 → 74 taken 10076 times.
✓ Branch 73 → 89 taken 2298 times.
|
577972 |
if (mode != INTRA_VERT && mode != INTRA_HORZ) { |
| 567 |
4/6
prepare_intra_edge_params_10:
✓ Branch 74 → 75 taken 205238 times.
✓ Branch 74 → 82 taken 188102 times.
prepare_intra_edge_params_12:
✗ Branch 74 → 75 not taken.
✗ Branch 74 → 82 not taken.
prepare_intra_edge_params_8:
✓ Branch 74 → 75 taken 5764 times.
✓ Branch 74 → 82 taken 4312 times.
|
403416 |
if (mode >= INTRA_DIAG) { |
| 568 |
4/6
prepare_intra_edge_params_10:
✓ Branch 75 → 76 taken 105411 times.
✓ Branch 75 → 79 taken 99827 times.
prepare_intra_edge_params_12:
✗ Branch 75 → 76 not taken.
✗ Branch 75 → 79 not taken.
prepare_intra_edge_params_8:
✓ Branch 75 → 76 taken 2142 times.
✓ Branch 75 → 79 taken 3622 times.
|
211002 |
if (intra_pred_angle < 0) { |
| 569 |
|
107553 |
pixel *p = top - (ref_idx + 1); |
| 570 |
4/6
prepare_intra_edge_params_10:
✓ Branch 78 → 77 taken 861580 times.
✓ Branch 78 → 89 taken 105411 times.
prepare_intra_edge_params_12:
✗ Branch 78 → 77 not taken.
✗ Branch 78 → 89 not taken.
prepare_intra_edge_params_8:
✓ Branch 78 → 77 taken 15164 times.
✓ Branch 78 → 89 taken 2142 times.
|
984297 |
for (int x = -h; x < 0; x++) { |
| 571 |
|
876744 |
const int idx = -1 - ref_idx + FFMIN((x*inv_angle + 256) >> 9, h); |
| 572 |
|
876744 |
p[x] = left[idx]; |
| 573 |
|
|
} |
| 574 |
|
|
} else { |
| 575 |
4/6
prepare_intra_edge_params_10:
✓ Branch 81 → 80 taken 218225 times.
✓ Branch 81 → 89 taken 99827 times.
prepare_intra_edge_params_12:
✗ Branch 81 → 80 not taken.
✗ Branch 81 → 89 not taken.
prepare_intra_edge_params_8:
✓ Branch 81 → 80 taken 7244 times.
✓ Branch 81 → 89 taken 3622 times.
|
328918 |
for (int i = refw; i <= refw + FFMAX(1, w/h) * ref_idx + 1; i++) |
| 576 |
|
225469 |
top[i] = top[refw - 1]; |
| 577 |
|
|
} |
| 578 |
|
|
} else { |
| 579 |
4/6
prepare_intra_edge_params_10:
✓ Branch 82 → 83 taken 98294 times.
✓ Branch 82 → 86 taken 89808 times.
prepare_intra_edge_params_12:
✗ Branch 82 → 83 not taken.
✗ Branch 82 → 86 not taken.
prepare_intra_edge_params_8:
✓ Branch 82 → 83 taken 1506 times.
✓ Branch 82 → 86 taken 2806 times.
|
192414 |
if (intra_pred_angle < 0) { |
| 580 |
|
99800 |
pixel *p = left - (ref_idx + 1); |
| 581 |
4/6
prepare_intra_edge_params_10:
✓ Branch 85 → 84 taken 1452016 times.
✓ Branch 85 → 89 taken 98294 times.
prepare_intra_edge_params_12:
✗ Branch 85 → 84 not taken.
✗ Branch 85 → 89 not taken.
prepare_intra_edge_params_8:
✓ Branch 85 → 84 taken 10436 times.
✓ Branch 85 → 89 taken 1506 times.
|
1562252 |
for (int x = -w; x < 0; x++) { |
| 582 |
|
1462452 |
const int idx = -1 - ref_idx + FFMIN((x*inv_angle + 256) >> 9, w); |
| 583 |
|
1462452 |
p[x] = top[idx]; |
| 584 |
|
|
} |
| 585 |
|
|
} else { |
| 586 |
4/6
prepare_intra_edge_params_10:
✓ Branch 88 → 87 taken 196356 times.
✓ Branch 88 → 89 taken 89808 times.
prepare_intra_edge_params_12:
✗ Branch 88 → 87 not taken.
✗ Branch 88 → 89 not taken.
prepare_intra_edge_params_8:
✓ Branch 88 → 87 taken 5612 times.
✓ Branch 88 → 89 taken 2806 times.
|
294582 |
for (int i = refh; i <= refh + FFMAX(1, h/w) * ref_idx + 1; i++) |
| 587 |
|
201968 |
left[i] = left[refh - 1]; |
| 588 |
|
|
} |
| 589 |
|
|
} |
| 590 |
|
|
} |
| 591 |
|
|
} |
| 592 |
|
1140995 |
edge->left = (uint8_t*)left; |
| 593 |
|
1140995 |
edge->top = (uint8_t*)top; |
| 594 |
|
1140995 |
} |
| 595 |
|
|
|
| 596 |
|
|
//8.4.1 General decoding process for coding units coded in intra prediction mode |
| 597 |
|
1140995 |
static void FUNC(intra_pred)(const VVCLocalContext *lc, int x0, int y0, |
| 598 |
|
|
const int width, const int height, int c_idx) |
| 599 |
|
|
{ |
| 600 |
|
1140995 |
VVCFrameContext *fc = lc->fc; |
| 601 |
|
1140995 |
const VVCSPS *sps = fc->ps.sps; |
| 602 |
|
1140995 |
const VVCPPS *pps = fc->ps.pps; |
| 603 |
|
1140995 |
const CodingUnit *cu = lc->cu; |
| 604 |
|
1140995 |
const int log2_min_cb_size = sps->min_cb_log2_size_y; |
| 605 |
|
1140995 |
const int min_cb_width = pps->min_cb_width; |
| 606 |
|
1140995 |
const int x_cb = x0 >> log2_min_cb_size; |
| 607 |
|
1140995 |
const int y_cb = y0 >> log2_min_cb_size; |
| 608 |
|
|
|
| 609 |
|
1140995 |
const int hshift = fc->ps.sps->hshift[c_idx]; |
| 610 |
|
1140995 |
const int vshift = fc->ps.sps->vshift[c_idx]; |
| 611 |
|
1140995 |
const int x = x0 >> hshift; |
| 612 |
|
1140995 |
const int y = y0 >> vshift; |
| 613 |
|
1140995 |
const int w = width >> hshift; |
| 614 |
|
1140995 |
const int h = height >> vshift; |
| 615 |
|
1140995 |
const ptrdiff_t stride = fc->frame->linesize[c_idx] / sizeof(pixel); |
| 616 |
|
|
|
| 617 |
4/6
intra_pred_10:
✓ Branch 2 → 3 taken 345606 times.
✓ Branch 2 → 4 taken 768207 times.
intra_pred_12:
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 4 not taken.
intra_pred_8:
✓ Branch 2 → 3 taken 7900 times.
✓ Branch 2 → 4 taken 19282 times.
|
1140995 |
const int pred_mode = c_idx ? cu->intra_pred_mode_c : cu->intra_pred_mode_y; |
| 618 |
|
1140995 |
const int mode = ff_vvc_wide_angle_mode_mapping(cu, w, h, c_idx, pred_mode); |
| 619 |
|
|
|
| 620 |
|
1140995 |
const int intra_mip_flag = SAMPLE_CTB(fc->tab.imf, x_cb, y_cb); |
| 621 |
7/18
intra_pred_10:
✓ Branch 6 → 7 taken 168305 times.
✓ Branch 6 → 10 taken 945508 times.
✓ Branch 7 → 8 taken 56290 times.
✓ Branch 7 → 9 taken 112015 times.
✓ Branch 8 → 9 taken 1636 times.
✓ Branch 8 → 10 taken 54654 times.
intra_pred_12:
✗ Branch 6 → 7 not taken.
✗ Branch 6 → 10 not taken.
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
✗ Branch 8 → 9 not taken.
✗ Branch 8 → 10 not taken.
intra_pred_8:
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 10 taken 27182 times.
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
✗ Branch 8 → 9 not taken.
✗ Branch 8 → 10 not taken.
|
1140995 |
const int is_intra_mip = intra_mip_flag && (!c_idx || cu->mip_chroma_direct_flag); |
| 622 |
4/6
intra_pred_10:
✓ Branch 11 → 12 taken 768207 times.
✓ Branch 11 → 13 taken 345606 times.
intra_pred_12:
✗ Branch 11 → 12 not taken.
✗ Branch 11 → 13 not taken.
intra_pred_8:
✓ Branch 11 → 12 taken 19282 times.
✓ Branch 11 → 13 taken 7900 times.
|
1140995 |
const int ref_idx = c_idx ? 0 : cu->intra_luma_ref_idx; |
| 623 |
|
1140995 |
const int need_pdpc = ff_vvc_need_pdpc(w, h, cu->bdpcm_flag[c_idx], mode, ref_idx); |
| 624 |
|
|
|
| 625 |
|
|
|
| 626 |
|
1140995 |
pixel *src = (pixel*)fc->frame->data[c_idx] + x + y * stride; |
| 627 |
|
|
IntraEdgeParams edge; |
| 628 |
|
|
|
| 629 |
|
1140995 |
FUNC(prepare_intra_edge_params)(lc, &edge, src, stride, x, y, w, h, c_idx, is_intra_mip, mode, ref_idx, need_pdpc); |
| 630 |
|
|
|
| 631 |
3/6
intra_pred_10:
✓ Branch 16 → 17 taken 113651 times.
✓ Branch 16 → 20 taken 1000162 times.
intra_pred_12:
✗ Branch 16 → 17 not taken.
✗ Branch 16 → 20 not taken.
intra_pred_8:
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 20 taken 27182 times.
|
1140995 |
if (is_intra_mip) { |
| 632 |
|
|
int intra_mip_transposed_flag; |
| 633 |
|
|
int intra_mip_mode; |
| 634 |
|
113651 |
unpack_mip_info(&intra_mip_transposed_flag, &intra_mip_mode, intra_mip_flag); |
| 635 |
|
|
|
| 636 |
|
113651 |
fc->vvcdsp.intra.pred_mip((uint8_t *)src, edge.top, edge.left, |
| 637 |
|
|
w, h, stride, intra_mip_mode, intra_mip_transposed_flag); |
| 638 |
4/6
intra_pred_10:
✓ Branch 20 → 21 taken 361151 times.
✓ Branch 20 → 22 taken 639011 times.
intra_pred_12:
✗ Branch 20 → 21 not taken.
✗ Branch 20 → 22 not taken.
intra_pred_8:
✓ Branch 20 → 21 taken 11021 times.
✓ Branch 20 → 22 taken 16161 times.
|
1027344 |
} else if (mode == INTRA_PLANAR) { |
| 639 |
|
372172 |
fc->vvcdsp.intra.pred_planar((uint8_t *)src, edge.top, edge.left, w, h, stride); |
| 640 |
4/6
intra_pred_10:
✓ Branch 22 → 23 taken 74629 times.
✓ Branch 22 → 24 taken 564382 times.
intra_pred_12:
✗ Branch 22 → 23 not taken.
✗ Branch 22 → 24 not taken.
intra_pred_8:
✓ Branch 22 → 23 taken 2571 times.
✓ Branch 22 → 24 taken 13590 times.
|
655172 |
} else if (mode == INTRA_DC) { |
| 641 |
|
77200 |
fc->vvcdsp.intra.pred_dc((uint8_t *)src, edge.top, edge.left, w, h, stride); |
| 642 |
4/6
intra_pred_10:
✓ Branch 24 → 25 taken 85438 times.
✓ Branch 24 → 26 taken 478944 times.
intra_pred_12:
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 26 not taken.
intra_pred_8:
✓ Branch 24 → 25 taken 1216 times.
✓ Branch 24 → 26 taken 12374 times.
|
577972 |
} else if (mode == INTRA_VERT) { |
| 643 |
|
86654 |
fc->vvcdsp.intra.pred_v((uint8_t *)src, edge.top, w, h, stride); |
| 644 |
4/6
intra_pred_10:
✓ Branch 26 → 27 taken 85604 times.
✓ Branch 26 → 28 taken 393340 times.
intra_pred_12:
✗ Branch 26 → 27 not taken.
✗ Branch 26 → 28 not taken.
intra_pred_8:
✓ Branch 26 → 27 taken 2298 times.
✓ Branch 26 → 28 taken 10076 times.
|
491318 |
} else if (mode == INTRA_HORZ) { |
| 645 |
|
87902 |
fc->vvcdsp.intra.pred_h((uint8_t *)src, edge.left, w, h, stride); |
| 646 |
|
|
} else { |
| 647 |
4/6
intra_pred_10:
✓ Branch 28 → 29 taken 205238 times.
✓ Branch 28 → 30 taken 188102 times.
intra_pred_12:
✗ Branch 28 → 29 not taken.
✗ Branch 28 → 30 not taken.
intra_pred_8:
✓ Branch 28 → 29 taken 5764 times.
✓ Branch 28 → 30 taken 4312 times.
|
403416 |
if (mode >= INTRA_DIAG) { |
| 648 |
|
211002 |
fc->vvcdsp.intra.pred_angular_v((uint8_t *)src, edge.top, edge.left, |
| 649 |
|
|
w, h, stride, c_idx, mode, ref_idx, |
| 650 |
|
|
edge.filter_flag, need_pdpc); |
| 651 |
|
|
} else { |
| 652 |
|
192414 |
fc->vvcdsp.intra.pred_angular_h((uint8_t *)src, edge.top, edge.left, |
| 653 |
|
|
w, h, stride, c_idx, mode, ref_idx, |
| 654 |
|
|
edge.filter_flag, need_pdpc); |
| 655 |
|
|
} |
| 656 |
|
|
} |
| 657 |
4/6
intra_pred_10:
✓ Branch 31 → 32 taken 689476 times.
✓ Branch 31 → 52 taken 424337 times.
intra_pred_12:
✗ Branch 31 → 32 not taken.
✗ Branch 31 → 52 not taken.
intra_pred_8:
✓ Branch 31 → 32 taken 20104 times.
✓ Branch 31 → 52 taken 7078 times.
|
1140995 |
if (need_pdpc) { |
| 658 |
|
|
//8.4.5.2.15 Position-dependent intra prediction sample filtering process |
| 659 |
15/24
intra_pred_10:
✓ Branch 32 → 33 taken 594254 times.
✓ Branch 32 → 52 taken 95222 times.
✓ Branch 33 → 34 taken 269675 times.
✓ Branch 33 → 37 taken 324579 times.
✓ Branch 34 → 35 taken 207133 times.
✓ Branch 34 → 37 taken 62542 times.
✓ Branch 35 → 36 taken 141550 times.
✓ Branch 35 → 37 taken 65583 times.
intra_pred_12:
✗ Branch 32 → 33 not taken.
✗ Branch 32 → 52 not taken.
✗ Branch 33 → 34 not taken.
✗ Branch 33 → 37 not taken.
✗ Branch 34 → 35 not taken.
✗ Branch 34 → 37 not taken.
✗ Branch 35 → 36 not taken.
✗ Branch 35 → 37 not taken.
intra_pred_8:
✓ Branch 32 → 33 taken 20104 times.
✗ Branch 32 → 52 not taken.
✓ Branch 33 → 34 taken 9089 times.
✓ Branch 33 → 37 taken 11015 times.
✓ Branch 34 → 35 taken 6520 times.
✓ Branch 34 → 37 taken 2569 times.
✓ Branch 35 → 36 taken 5304 times.
✓ Branch 35 → 37 taken 1216 times.
|
709580 |
if (!is_intra_mip && (mode == INTRA_PLANAR || mode == INTRA_DC || |
| 660 |
4/6
intra_pred_10:
✓ Branch 36 → 37 taken 62232 times.
✓ Branch 36 → 52 taken 79318 times.
intra_pred_12:
✗ Branch 36 → 37 not taken.
✗ Branch 36 → 52 not taken.
intra_pred_8:
✓ Branch 36 → 37 taken 2298 times.
✓ Branch 36 → 52 taken 3006 times.
|
146854 |
mode == INTRA_VERT || mode == INTRA_HORZ)) { |
| 661 |
|
532034 |
const int scale = (av_log2(w) + av_log2(h) - 2) >> 2; |
| 662 |
|
532034 |
const pixel *left = (pixel*)edge.left; |
| 663 |
|
532034 |
const pixel *top = (pixel*)edge.top; |
| 664 |
4/6
intra_pred_10:
✓ Branch 51 → 38 taken 5552808 times.
✓ Branch 51 → 52 taken 514936 times.
intra_pred_12:
✗ Branch 51 → 38 not taken.
✗ Branch 51 → 52 not taken.
intra_pred_8:
✓ Branch 51 → 38 taken 120076 times.
✓ Branch 51 → 52 taken 17098 times.
|
6204918 |
for (int y = 0; y < h; y++) { |
| 665 |
4/6
intra_pred_10:
✓ Branch 49 → 39 taken 90480448 times.
✓ Branch 49 → 50 taken 5552808 times.
intra_pred_12:
✗ Branch 49 → 39 not taken.
✗ Branch 49 → 50 not taken.
intra_pred_8:
✓ Branch 49 → 39 taken 1146576 times.
✓ Branch 49 → 50 taken 120076 times.
|
97299908 |
for (int x = 0; x < w; x++) { |
| 666 |
|
|
int l, t, wl, wt, pred; |
| 667 |
|
|
pixel val; |
| 668 |
8/12
intra_pred_10:
✓ Branch 39 → 40 taken 30505456 times.
✓ Branch 39 → 41 taken 59974992 times.
✓ Branch 40 → 41 taken 10225376 times.
✓ Branch 40 → 42 taken 20280080 times.
intra_pred_12:
✗ Branch 39 → 40 not taken.
✗ Branch 39 → 41 not taken.
✗ Branch 40 → 41 not taken.
✗ Branch 40 → 42 not taken.
intra_pred_8:
✓ Branch 39 → 40 taken 445072 times.
✓ Branch 39 → 41 taken 701504 times.
✓ Branch 40 → 41 taken 220288 times.
✓ Branch 40 → 42 taken 224784 times.
|
91627024 |
if (mode == INTRA_PLANAR || mode == INTRA_DC) { |
| 669 |
|
71122160 |
l = left[y]; |
| 670 |
|
71122160 |
t = top[x]; |
| 671 |
|
71122160 |
wl = 32 >> FFMIN((x << 1) >> scale, 31); |
| 672 |
|
71122160 |
wt = 32 >> FFMIN((y << 1) >> scale, 31); |
| 673 |
|
|
} else { |
| 674 |
|
20504864 |
l = left[y] - left[-1] + POS(x,y); |
| 675 |
|
20504864 |
t = top[x] - top[-1] + POS(x,y); |
| 676 |
4/6
intra_pred_10:
✓ Branch 42 → 43 taken 9067488 times.
✓ Branch 42 → 44 taken 11212592 times.
intra_pred_12:
✗ Branch 42 → 43 not taken.
✗ Branch 42 → 44 not taken.
intra_pred_8:
✓ Branch 42 → 43 taken 53200 times.
✓ Branch 42 → 44 taken 171584 times.
|
20504864 |
wl = (mode == INTRA_VERT) ? (32 >> FFMIN((x << 1) >> scale, 31)) : 0; |
| 677 |
4/6
intra_pred_10:
✓ Branch 45 → 46 taken 11212592 times.
✓ Branch 45 → 47 taken 9067488 times.
intra_pred_12:
✗ Branch 45 → 46 not taken.
✗ Branch 45 → 47 not taken.
intra_pred_8:
✓ Branch 45 → 46 taken 171584 times.
✓ Branch 45 → 47 taken 53200 times.
|
20504864 |
wt = (mode == INTRA_HORZ) ? (32 >> FFMIN((y << 1) >> scale, 31)) : 0; |
| 678 |
|
|
} |
| 679 |
|
91627024 |
val = POS(x, y); |
| 680 |
|
91627024 |
pred = val + ((wl * (l - val) + wt * (t - val) + 32) >> 6); |
| 681 |
|
91627024 |
POS(x, y) = CLIP(pred); |
| 682 |
|
|
} |
| 683 |
|
|
} |
| 684 |
|
|
} |
| 685 |
|
|
} |
| 686 |
|
1140995 |
} |
| 687 |
|
|
|
| 688 |
|
|
//8.4.5.2.11 Specification of INTRA_PLANAR intra prediction mode |
| 689 |
|
372117 |
static av_always_inline void FUNC(pred_planar)(uint8_t *_src, const uint8_t *_top, |
| 690 |
|
|
const uint8_t *_left, const int w, const int h, const ptrdiff_t stride) |
| 691 |
|
|
{ |
| 692 |
|
|
int x, y; |
| 693 |
|
372117 |
pixel *src = (pixel *)_src; |
| 694 |
|
372117 |
const pixel *top = (const pixel *)_top; |
| 695 |
|
372117 |
const pixel *left = (const pixel *)_left; |
| 696 |
|
372117 |
const int logw = av_log2(w); |
| 697 |
|
372117 |
const int logh = av_log2(h); |
| 698 |
|
372117 |
const int size = w * h; |
| 699 |
|
372117 |
const int shift = (logw + logh + 1); |
| 700 |
6/6
pred_planar_10:
✓ Branch 7 → 3 taken 3596746 times.
✓ Branch 7 → 8 taken 361226 times.
pred_planar_12:
✓ Branch 7 → 3 taken 1394 times.
✓ Branch 7 → 8 taken 75 times.
pred_planar_8:
✓ Branch 7 → 3 taken 73905 times.
✓ Branch 7 → 8 taken 10816 times.
|
4044162 |
for (y = 0; y < h; y++) { |
| 701 |
6/6
pred_planar_10:
✓ Branch 5 → 4 taken 60935048 times.
✓ Branch 5 → 6 taken 3596746 times.
pred_planar_12:
✓ Branch 5 → 4 taken 36952 times.
✓ Branch 5 → 6 taken 1394 times.
pred_planar_8:
✓ Branch 5 → 4 taken 687100 times.
✓ Branch 5 → 6 taken 73905 times.
|
65331145 |
for (x = 0; x < w; x++) { |
| 702 |
|
61659100 |
const int pred_v = ((h - 1 - y) * top[x] + (y + 1) * left[h]) << logw; |
| 703 |
|
61659100 |
const int pred_h = ((w - 1 - x) * left[y] + (x + 1) * top[w]) << logh; |
| 704 |
|
61659100 |
const int pred = (pred_v + pred_h + size) >> shift; |
| 705 |
|
61659100 |
POS(x, y) = pred; |
| 706 |
|
|
} |
| 707 |
|
|
} |
| 708 |
|
372117 |
} |
| 709 |
|
|
|
| 710 |
|
|
//8.4.5.2.3 MIP boundary sample downsampling process |
| 711 |
|
231826 |
static av_always_inline void FUNC(mip_downsampling)(int *reduced, const int boundary_size, |
| 712 |
|
|
const pixel *ref, const int n_tb_s) |
| 713 |
|
|
{ |
| 714 |
|
231826 |
const int b_dwn = n_tb_s / boundary_size; |
| 715 |
|
231826 |
const int log2 = av_log2(b_dwn); |
| 716 |
|
|
|
| 717 |
6/6
mip_downsampling_10:
✓ Branch 2 → 3 taken 41350 times.
✓ Branch 2 → 7 taken 187460 times.
mip_downsampling_12:
✓ Branch 2 → 3 taken 256 times.
✓ Branch 2 → 7 taken 1252 times.
mip_downsampling_8:
✓ Branch 2 → 3 taken 256 times.
✓ Branch 2 → 7 taken 1252 times.
|
231826 |
if (boundary_size == n_tb_s) { |
| 718 |
6/6
mip_downsampling_10:
✓ Branch 5 → 4 taken 165400 times.
✓ Branch 5 → 6 taken 41350 times.
mip_downsampling_12:
✓ Branch 5 → 4 taken 1024 times.
✓ Branch 5 → 6 taken 256 times.
mip_downsampling_8:
✓ Branch 5 → 4 taken 1024 times.
✓ Branch 5 → 6 taken 256 times.
|
209310 |
for (int i = 0; i < n_tb_s; i++) |
| 719 |
|
167448 |
reduced[i] = ref[i]; |
| 720 |
|
41862 |
return; |
| 721 |
|
|
} |
| 722 |
6/6
mip_downsampling_10:
✓ Branch 12 → 8 taken 683432 times.
✓ Branch 12 → 13 taken 187460 times.
mip_downsampling_12:
✓ Branch 12 → 8 taken 4688 times.
✓ Branch 12 → 13 taken 1252 times.
mip_downsampling_8:
✓ Branch 12 → 8 taken 4688 times.
✓ Branch 12 → 13 taken 1252 times.
|
882772 |
for (int i = 0; i < boundary_size; i++) { |
| 723 |
|
|
int r; |
| 724 |
|
692808 |
r = *ref++; |
| 725 |
6/6
mip_downsampling_10:
✓ Branch 10 → 9 taken 1925488 times.
✓ Branch 10 → 11 taken 683432 times.
mip_downsampling_12:
✓ Branch 10 → 9 taken 28272 times.
✓ Branch 10 → 11 taken 4688 times.
mip_downsampling_8:
✓ Branch 10 → 9 taken 28272 times.
✓ Branch 10 → 11 taken 4688 times.
|
2674840 |
for (int j = 1; j < b_dwn; j++) |
| 726 |
|
1982032 |
r += *ref++; |
| 727 |
|
692808 |
reduced[i] = (r + (1 << (log2 - 1))) >> log2; |
| 728 |
|
|
} |
| 729 |
|
|
} |
| 730 |
|
|
|
| 731 |
|
115913 |
static av_always_inline void FUNC(mip_reduced_pred)(pixel *src, const ptrdiff_t stride, |
| 732 |
|
|
const int up_hor, const int up_ver, const int pred_size, const int *reduced, const int reduced_size, |
| 733 |
|
|
const int ow, const int temp0, const uint8_t *matrix, int is_transposed) |
| 734 |
|
|
{ |
| 735 |
|
115913 |
src = &POS(up_hor - 1, up_ver - 1); |
| 736 |
6/6
mip_reduced_pred_10:
✓ Branch 13 → 3 taken 639436 times.
✓ Branch 13 → 14 taken 114405 times.
mip_reduced_pred_12:
✓ Branch 13 → 3 taken 4528 times.
✓ Branch 13 → 14 taken 754 times.
mip_reduced_pred_8:
✓ Branch 13 → 3 taken 4528 times.
✓ Branch 13 → 14 taken 754 times.
|
764405 |
for (int y = 0; y < pred_size; y++) { |
| 737 |
6/6
mip_reduced_pred_10:
✓ Branch 11 → 4 taken 4012272 times.
✓ Branch 11 → 12 taken 639436 times.
mip_reduced_pred_12:
✓ Branch 11 → 4 taken 30208 times.
✓ Branch 11 → 12 taken 4528 times.
mip_reduced_pred_8:
✓ Branch 11 → 4 taken 30208 times.
✓ Branch 11 → 12 taken 4528 times.
|
4721180 |
for (int x = 0; x < pred_size; x++) { |
| 738 |
|
4072688 |
int pred = 0; |
| 739 |
6/6
mip_reduced_pred_10:
✓ Branch 6 → 5 taken 28126592 times.
✓ Branch 6 → 7 taken 4012272 times.
mip_reduced_pred_12:
✓ Branch 6 → 5 taken 212352 times.
✓ Branch 6 → 7 taken 30208 times.
mip_reduced_pred_8:
✓ Branch 6 → 5 taken 212352 times.
✓ Branch 6 → 7 taken 30208 times.
|
32623984 |
for (int i = 0; i < reduced_size; i++) |
| 740 |
|
28551296 |
pred += reduced[i] * matrix[i]; |
| 741 |
|
4072688 |
matrix += reduced_size; |
| 742 |
|
4072688 |
pred = ((pred + ow) >> 6) + temp0; |
| 743 |
|
4072688 |
pred = av_clip(pred, 0, (1<<BIT_DEPTH) - 1); |
| 744 |
6/6
mip_reduced_pred_10:
✓ Branch 7 → 8 taken 2018576 times.
✓ Branch 7 → 9 taken 1993696 times.
mip_reduced_pred_12:
✓ Branch 7 → 8 taken 14336 times.
✓ Branch 7 → 9 taken 15872 times.
mip_reduced_pred_8:
✓ Branch 7 → 8 taken 14336 times.
✓ Branch 7 → 9 taken 15872 times.
|
4072688 |
if (is_transposed) |
| 745 |
|
2047248 |
POS(y * up_hor, x * up_ver) = pred; |
| 746 |
|
|
else |
| 747 |
|
2025440 |
POS(x * up_hor, y * up_ver) = pred; |
| 748 |
|
|
} |
| 749 |
|
|
} |
| 750 |
|
115913 |
} |
| 751 |
|
|
|
| 752 |
|
132253 |
static av_always_inline void FUNC(mip_upsampling_1d)(pixel *dst, const int dst_step, const int dst_stride, const int dst_height, const int factor, |
| 753 |
|
|
const pixel *boundary, const int boundary_step, const int pred_size) |
| 754 |
|
|
{ |
| 755 |
|
|
|
| 756 |
6/6
mip_upsampling_1d_10:
✓ Branch 10 → 3 taken 1243900 times.
✓ Branch 10 → 11 taken 130357 times.
mip_upsampling_1d_12:
✓ Branch 10 → 3 taken 13264 times.
✓ Branch 10 → 11 taken 948 times.
mip_upsampling_1d_8:
✓ Branch 10 → 3 taken 13264 times.
✓ Branch 10 → 11 taken 948 times.
|
1402681 |
for (int i = 0; i < dst_height; i++) { |
| 757 |
|
1270428 |
const pixel *before = boundary; |
| 758 |
|
1270428 |
const pixel *after = dst - dst_step; |
| 759 |
|
1270428 |
pixel *d = dst; |
| 760 |
6/6
mip_upsampling_1d_10:
✓ Branch 8 → 4 taken 8761648 times.
✓ Branch 8 → 9 taken 1243900 times.
mip_upsampling_1d_12:
✓ Branch 8 → 4 taken 100096 times.
✓ Branch 8 → 9 taken 13264 times.
mip_upsampling_1d_8:
✓ Branch 8 → 4 taken 100096 times.
✓ Branch 8 → 9 taken 13264 times.
|
10232268 |
for (int j = 0; j < pred_size; j++) { |
| 761 |
|
8961840 |
after += dst_step * factor; |
| 762 |
6/6
mip_upsampling_1d_10:
✓ Branch 6 → 5 taken 18731760 times.
✓ Branch 6 → 7 taken 8761648 times.
mip_upsampling_1d_12:
✓ Branch 6 → 5 taken 380672 times.
✓ Branch 6 → 7 taken 100096 times.
mip_upsampling_1d_8:
✓ Branch 6 → 5 taken 380672 times.
✓ Branch 6 → 7 taken 100096 times.
|
28454944 |
for (int k = 1; k < factor; k++) { |
| 763 |
|
19493104 |
int mid = (factor - k) * (*before) + k * (*after); |
| 764 |
|
19493104 |
*d = (mid + factor / 2) / factor; |
| 765 |
|
19493104 |
d += dst_step; |
| 766 |
|
|
} |
| 767 |
|
8961840 |
before = after; |
| 768 |
|
8961840 |
d += dst_step; |
| 769 |
|
|
} |
| 770 |
|
1270428 |
boundary += boundary_step; |
| 771 |
|
1270428 |
dst += dst_stride; |
| 772 |
|
|
} |
| 773 |
|
132253 |
} |
| 774 |
|
|
|
| 775 |
|
|
//8.4.5.2.2 Matrix-based intra sample prediction |
| 776 |
|
115913 |
static av_always_inline void FUNC(pred_mip)(uint8_t *_src, const uint8_t *_top, |
| 777 |
|
|
const uint8_t *_left, const int w, const int h, const ptrdiff_t stride, |
| 778 |
|
|
int mode_id, int is_transposed) |
| 779 |
|
|
{ |
| 780 |
|
115913 |
pixel *src = (pixel *)_src; |
| 781 |
|
115913 |
const pixel *top = (const pixel *)_top; |
| 782 |
|
115913 |
const pixel *left = (const pixel *)_left; |
| 783 |
|
|
|
| 784 |
|
115913 |
const int size_id = ff_vvc_get_mip_size_id(w, h); |
| 785 |
|
|
static const int boundary_sizes[] = {2, 4, 4}; |
| 786 |
|
|
static const int pred_sizes[] = {4, 4, 8}; |
| 787 |
|
115913 |
const int boundary_size = boundary_sizes[size_id]; |
| 788 |
|
115913 |
const int pred_size = pred_sizes[size_id]; |
| 789 |
|
115913 |
const int in_size = 2 * boundary_size - ((size_id == 2) ? 1 : 0); |
| 790 |
|
115913 |
const uint8_t *matrix = ff_vvc_get_mip_matrix(size_id, mode_id); |
| 791 |
|
115913 |
const int up_hor = w / pred_size; |
| 792 |
|
115913 |
const int up_ver = h / pred_size; |
| 793 |
|
|
|
| 794 |
|
|
int reduced[16]; |
| 795 |
|
115913 |
int *red_t = reduced; |
| 796 |
|
115913 |
int *red_l = reduced + boundary_size; |
| 797 |
|
115913 |
int off = 1, ow = 0; |
| 798 |
|
|
int temp0; |
| 799 |
|
|
|
| 800 |
6/6
pred_mip_10:
✓ Branch 4 → 5 taken 58331 times.
✓ Branch 4 → 6 taken 56074 times.
pred_mip_12:
✓ Branch 4 → 5 taken 356 times.
✓ Branch 4 → 6 taken 398 times.
pred_mip_8:
✓ Branch 4 → 5 taken 356 times.
✓ Branch 4 → 6 taken 398 times.
|
115913 |
if (is_transposed) { |
| 801 |
|
59043 |
FFSWAP(int*, red_t, red_l); |
| 802 |
|
|
} |
| 803 |
|
115913 |
FUNC(mip_downsampling)(red_t, boundary_size, top, w); |
| 804 |
|
115913 |
FUNC(mip_downsampling)(red_l, boundary_size, left, h); |
| 805 |
|
|
|
| 806 |
|
115913 |
temp0 = reduced[0]; |
| 807 |
6/6
pred_mip_10:
✓ Branch 8 → 9 taken 68951 times.
✓ Branch 8 → 10 taken 45454 times.
pred_mip_12:
✓ Branch 8 → 9 taken 376 times.
✓ Branch 8 → 10 taken 378 times.
pred_mip_8:
✓ Branch 8 → 9 taken 376 times.
✓ Branch 8 → 10 taken 378 times.
|
115913 |
if (size_id != 2) { |
| 808 |
|
69703 |
off = 0; |
| 809 |
|
69703 |
ow = (1 << (BIT_DEPTH - 1)) - temp0; |
| 810 |
|
|
} else { |
| 811 |
|
46210 |
ow = reduced[1] - temp0; |
| 812 |
|
|
} |
| 813 |
|
115913 |
reduced[0] = ow; |
| 814 |
6/6
pred_mip_10:
✓ Branch 13 → 12 taken 688973 times.
✓ Branch 13 → 14 taken 114405 times.
pred_mip_12:
✓ Branch 13 → 12 taken 4580 times.
✓ Branch 13 → 14 taken 754 times.
pred_mip_8:
✓ Branch 13 → 12 taken 4580 times.
✓ Branch 13 → 14 taken 754 times.
|
814046 |
for (int i = 1; i < in_size; i++) { |
| 815 |
|
698133 |
reduced[i] = reduced[i + off] - temp0; |
| 816 |
|
698133 |
ow += reduced[i]; |
| 817 |
|
|
} |
| 818 |
|
115913 |
ow = 32 - 32 * ow; |
| 819 |
|
|
|
| 820 |
|
115913 |
FUNC(mip_reduced_pred)(src, stride, up_hor, up_ver, pred_size, reduced, in_size, ow, temp0, matrix, is_transposed); |
| 821 |
12/12
pred_mip_10:
✓ Branch 15 → 16 taken 40974 times.
✓ Branch 15 → 17 taken 73431 times.
✓ Branch 16 → 17 taken 24372 times.
✓ Branch 16 → 21 taken 16602 times.
pred_mip_12:
✓ Branch 15 → 16 taken 280 times.
✓ Branch 15 → 17 taken 474 times.
✓ Branch 16 → 17 taken 200 times.
✓ Branch 16 → 21 taken 80 times.
pred_mip_8:
✓ Branch 15 → 16 taken 280 times.
✓ Branch 15 → 17 taken 474 times.
✓ Branch 16 → 17 taken 200 times.
✓ Branch 16 → 21 taken 80 times.
|
115913 |
if (up_hor > 1 || up_ver > 1) { |
| 822 |
6/6
pred_mip_10:
✓ Branch 17 → 18 taken 73431 times.
✓ Branch 17 → 19 taken 24372 times.
pred_mip_12:
✓ Branch 17 → 18 taken 474 times.
✓ Branch 17 → 19 taken 200 times.
pred_mip_8:
✓ Branch 17 → 18 taken 474 times.
✓ Branch 17 → 19 taken 200 times.
|
99151 |
if (up_hor > 1) |
| 823 |
|
74379 |
FUNC(mip_upsampling_1d)(&POS(0, up_ver - 1), 1, up_ver * stride, pred_size, up_hor, left + up_ver - 1, up_ver, pred_size); |
| 824 |
6/6
pred_mip_10:
✓ Branch 19 → 20 taken 56926 times.
✓ Branch 19 → 21 taken 40877 times.
pred_mip_12:
✓ Branch 19 → 20 taken 474 times.
✓ Branch 19 → 21 taken 200 times.
pred_mip_8:
✓ Branch 19 → 20 taken 474 times.
✓ Branch 19 → 21 taken 200 times.
|
99151 |
if (up_ver > 1) |
| 825 |
|
57874 |
FUNC(mip_upsampling_1d)(src, stride, 1, w, up_ver, top, 1, pred_size); |
| 826 |
|
|
} |
| 827 |
|
115913 |
} |
| 828 |
|
|
|
| 829 |
|
77365 |
static av_always_inline pixel FUNC(pred_dc_val)(const pixel *top, const pixel *left, |
| 830 |
|
|
const int w, const int h) |
| 831 |
|
|
{ |
| 832 |
|
|
pixel dc_val; |
| 833 |
|
77365 |
int sum = 0; |
| 834 |
6/6
pred_dc_val_10:
✓ Branch 2 → 3 taken 24710 times.
✓ Branch 2 → 4 taken 49974 times.
pred_dc_val_12:
✓ Branch 2 → 3 taken 15 times.
✓ Branch 2 → 4 taken 40 times.
pred_dc_val_8:
✓ Branch 2 → 3 taken 2360 times.
✓ Branch 2 → 4 taken 266 times.
|
77365 |
unsigned int offset = (w == h) ? (w << 1) : FFMAX(w, h); |
| 835 |
|
77365 |
const int shift = av_log2(offset); |
| 836 |
|
77365 |
offset >>= 1; |
| 837 |
6/6
pred_dc_val_10:
✓ Branch 5 → 6 taken 56177 times.
✓ Branch 5 → 9 taken 18507 times.
pred_dc_val_12:
✓ Branch 5 → 6 taken 35 times.
✓ Branch 5 → 9 taken 20 times.
pred_dc_val_8:
✓ Branch 5 → 6 taken 2473 times.
✓ Branch 5 → 9 taken 153 times.
|
77365 |
if (w >= h) { |
| 838 |
6/6
pred_dc_val_10:
✓ Branch 8 → 7 taken 796828 times.
✓ Branch 8 → 9 taken 56177 times.
pred_dc_val_12:
✓ Branch 8 → 7 taken 1156 times.
✓ Branch 8 → 9 taken 35 times.
pred_dc_val_8:
✓ Branch 8 → 7 taken 20044 times.
✓ Branch 8 → 9 taken 2473 times.
|
876713 |
for (int i = 0; i < w; i++) |
| 839 |
|
818028 |
sum += top[i]; |
| 840 |
|
|
} |
| 841 |
6/6
pred_dc_val_10:
✓ Branch 9 → 10 taken 43217 times.
✓ Branch 9 → 13 taken 31467 times.
pred_dc_val_12:
✓ Branch 9 → 10 taken 35 times.
✓ Branch 9 → 13 taken 20 times.
pred_dc_val_8:
✓ Branch 9 → 10 taken 2513 times.
✓ Branch 9 → 13 taken 113 times.
|
77365 |
if (w <= h) { |
| 842 |
6/6
pred_dc_val_10:
✓ Branch 12 → 11 taken 527116 times.
✓ Branch 12 → 13 taken 43217 times.
pred_dc_val_12:
✓ Branch 12 → 11 taken 1156 times.
✓ Branch 12 → 13 taken 35 times.
pred_dc_val_8:
✓ Branch 12 → 11 taken 20932 times.
✓ Branch 12 → 13 taken 2513 times.
|
594969 |
for (int i = 0; i < h; i++) |
| 843 |
|
549204 |
sum += left[i]; |
| 844 |
|
|
} |
| 845 |
|
77365 |
dc_val = (sum + offset) >> shift; |
| 846 |
|
77365 |
return dc_val; |
| 847 |
|
|
} |
| 848 |
|
|
|
| 849 |
|
|
//8.4.5.2.12 Specification of INTRA_DC intra prediction mode |
| 850 |
|
77365 |
static av_always_inline void FUNC(pred_dc)(uint8_t *_src, const uint8_t *_top, |
| 851 |
|
|
const uint8_t *_left, const int w, const int h, const ptrdiff_t stride) |
| 852 |
|
|
{ |
| 853 |
|
|
int x, y; |
| 854 |
|
77365 |
pixel *src = (pixel *)_src; |
| 855 |
|
77365 |
const pixel *top = (const pixel *)_top; |
| 856 |
|
77365 |
const pixel *left = (const pixel *)_left; |
| 857 |
|
77365 |
const pixel dc = FUNC(pred_dc_val)(top, left, w, h); |
| 858 |
|
77365 |
const pixel4 a = PIXEL_SPLAT_X4(dc); |
| 859 |
6/6
pred_dc_10:
✓ Branch 8 → 4 taken 699180 times.
✓ Branch 8 → 9 taken 74684 times.
pred_dc_12:
✓ Branch 8 → 4 taken 1364 times.
✓ Branch 8 → 9 taken 55 times.
pred_dc_8:
✓ Branch 8 → 4 taken 21620 times.
✓ Branch 8 → 9 taken 2626 times.
|
799529 |
for (y = 0; y < h; y++) { |
| 860 |
|
722164 |
pixel *s = src; |
| 861 |
6/6
pred_dc_10:
✓ Branch 6 → 5 taken 2795092 times.
✓ Branch 6 → 7 taken 699180 times.
pred_dc_12:
✓ Branch 6 → 5 taken 9052 times.
✓ Branch 6 → 7 taken 1364 times.
pred_dc_8:
✓ Branch 6 → 5 taken 64140 times.
✓ Branch 6 → 7 taken 21620 times.
|
3590448 |
for (x = 0; x < w; x += 4) { |
| 862 |
|
2868284 |
AV_WN4P(s, a); |
| 863 |
|
2868284 |
s += 4; |
| 864 |
|
|
} |
| 865 |
|
722164 |
src += stride; |
| 866 |
|
|
} |
| 867 |
|
77365 |
} |
| 868 |
|
|
|
| 869 |
|
86819 |
static av_always_inline void FUNC(pred_v)(uint8_t *_src, const uint8_t *_top, |
| 870 |
|
|
const int w, const int h, const ptrdiff_t stride) |
| 871 |
|
|
{ |
| 872 |
|
86819 |
pixel *src = (pixel *)_src; |
| 873 |
|
86819 |
const pixel *top = (const pixel *)_top; |
| 874 |
6/6
pred_v_10:
✓ Branch 4 → 3 taken 907224 times.
✓ Branch 4 → 5 taken 85493 times.
pred_v_12:
✓ Branch 4 → 3 taken 1364 times.
✓ Branch 4 → 5 taken 55 times.
pred_v_8:
✓ Branch 4 → 3 taken 8696 times.
✓ Branch 4 → 5 taken 1271 times.
|
1004103 |
for (int y = 0; y < h; y++) { |
| 875 |
|
917284 |
memcpy(src, top, sizeof(pixel) * w); |
| 876 |
|
917284 |
src += stride; |
| 877 |
|
|
} |
| 878 |
|
86819 |
} |
| 879 |
|
|
|
| 880 |
|
88067 |
static void FUNC(pred_h)(uint8_t *_src, const uint8_t *_left, const int w, const int h, |
| 881 |
|
|
const ptrdiff_t stride) |
| 882 |
|
|
{ |
| 883 |
|
88067 |
pixel *src = (pixel *)_src; |
| 884 |
|
88067 |
const pixel *left = (const pixel *)_left; |
| 885 |
6/6
pred_h_10:
✓ Branch 7 → 3 taken 816436 times.
✓ Branch 7 → 8 taken 85659 times.
pred_h_12:
✓ Branch 7 → 3 taken 1364 times.
✓ Branch 7 → 8 taken 55 times.
pred_h_8:
✓ Branch 7 → 3 taken 17560 times.
✓ Branch 7 → 8 taken 2353 times.
|
923427 |
for (int y = 0; y < h; y++) { |
| 886 |
|
835360 |
const pixel4 a = PIXEL_SPLAT_X4(left[y]); |
| 887 |
6/6
pred_h_10:
✓ Branch 5 → 4 taken 3399576 times.
✓ Branch 5 → 6 taken 816436 times.
pred_h_12:
✓ Branch 5 → 4 taken 9052 times.
✓ Branch 5 → 6 taken 1364 times.
pred_h_8:
✓ Branch 5 → 4 taken 51948 times.
✓ Branch 5 → 6 taken 17560 times.
|
4295936 |
for (int x = 0; x < w; x += 4) { |
| 888 |
|
3460576 |
AV_WN4P(&POS(x, y), a); |
| 889 |
|
|
} |
| 890 |
|
|
} |
| 891 |
|
88067 |
} |
| 892 |
|
|
|
| 893 |
|
|
#define INTRA_LUMA_FILTER(p) CLIP((p[0] * f[0] + p[1] * f[1] + p[2] * f[2] + p[3] * f[3] + 32) >> 6) |
| 894 |
|
|
#define INTRA_CHROMA_FILTER(p) (((32 - fact) * p[1] + fact * p[2] + 16) >> 5) |
| 895 |
|
|
|
| 896 |
|
|
//8.4.5.2.13 Specification of INTRA_ANGULAR2..INTRA_ANGULAR66 intra prediction modes |
| 897 |
|
225462 |
static void FUNC(pred_angular_v)(uint8_t *_src, const uint8_t *_top, const uint8_t *_left, |
| 898 |
|
|
const int w, const int h, const ptrdiff_t stride, const int c_idx, const int mode, |
| 899 |
|
|
const int ref_idx, const int filter_flag, const int need_pdpc) |
| 900 |
|
|
{ |
| 901 |
|
225462 |
pixel *src = (pixel *)_src; |
| 902 |
|
225462 |
const pixel *left = (const pixel *)_left; |
| 903 |
|
225462 |
const pixel *top = (const pixel *)_top - (1 + ref_idx); |
| 904 |
|
225462 |
const int intra_pred_angle = ff_vvc_intra_pred_angle_derive(mode); |
| 905 |
|
225462 |
int pos = (1 + ref_idx) * intra_pred_angle; |
| 906 |
|
225462 |
const int dp = intra_pred_angle; |
| 907 |
|
225462 |
const int is_luma = !c_idx; |
| 908 |
|
|
int nscale, inv_angle; |
| 909 |
|
|
|
| 910 |
6/6
pred_angular_v_10:
✓ Branch 3 → 4 taken 43602 times.
✓ Branch 3 → 6 taken 166456 times.
pred_angular_v_12:
✓ Branch 3 → 4 taken 539 times.
✓ Branch 3 → 6 taken 4281 times.
pred_angular_v_8:
✓ Branch 3 → 4 taken 2083 times.
✓ Branch 3 → 6 taken 8501 times.
|
225462 |
if (need_pdpc) { |
| 911 |
|
46224 |
inv_angle = ff_vvc_intra_inv_angle_derive(intra_pred_angle); |
| 912 |
|
46224 |
nscale = ff_vvc_nscale_derive(w, h, mode); |
| 913 |
|
|
} |
| 914 |
|
|
|
| 915 |
6/6
pred_angular_v_10:
✓ Branch 26 → 7 taken 1686788 times.
✓ Branch 26 → 27 taken 210058 times.
pred_angular_v_12:
✓ Branch 26 → 7 taken 119536 times.
✓ Branch 26 → 27 taken 4820 times.
pred_angular_v_8:
✓ Branch 26 → 7 taken 156924 times.
✓ Branch 26 → 27 taken 10584 times.
|
2188710 |
for (int y = 0; y < h; y++) { |
| 916 |
|
1963248 |
const int idx = (pos >> 5) + ref_idx; |
| 917 |
|
1963248 |
const int fact = pos & 31; |
| 918 |
17/18
pred_angular_v_10:
✓ Branch 7 → 8 taken 258021 times.
✓ Branch 7 → 14 taken 1428767 times.
✓ Branch 8 → 9 taken 165867 times.
✓ Branch 8 → 10 taken 92154 times.
✓ Branch 9 → 10 taken 138396 times.
✓ Branch 9 → 14 taken 27471 times.
pred_angular_v_12:
✓ Branch 7 → 8 taken 19238 times.
✓ Branch 7 → 14 taken 100298 times.
✓ Branch 8 → 9 taken 19238 times.
✗ Branch 8 → 10 not taken.
✓ Branch 9 → 10 taken 16002 times.
✓ Branch 9 → 14 taken 3236 times.
pred_angular_v_8:
✓ Branch 7 → 8 taken 28490 times.
✓ Branch 7 → 14 taken 128434 times.
✓ Branch 8 → 9 taken 26246 times.
✓ Branch 8 → 10 taken 2244 times.
✓ Branch 9 → 10 taken 22477 times.
✓ Branch 9 → 14 taken 3769 times.
|
1963248 |
if (!fact && (!is_luma || !filter_flag)) { |
| 919 |
6/6
pred_angular_v_10:
✓ Branch 12 → 11 taken 2668880 times.
✓ Branch 12 → 13 taken 230550 times.
pred_angular_v_12:
✓ Branch 12 → 11 taken 390368 times.
✓ Branch 12 → 13 taken 16002 times.
pred_angular_v_8:
✓ Branch 12 → 11 taken 453368 times.
✓ Branch 12 → 13 taken 24721 times.
|
3783889 |
for (int x = 0; x < w; x++) { |
| 920 |
|
3512616 |
const pixel *p = top + x + idx + 1; |
| 921 |
|
3512616 |
POS(x, y) = *p; |
| 922 |
|
|
} |
| 923 |
|
|
} else { |
| 924 |
5/6
pred_angular_v_10:
✓ Branch 14 → 15 taken 1165820 times.
✓ Branch 14 → 18 taken 290418 times.
pred_angular_v_12:
✓ Branch 14 → 15 taken 103534 times.
✗ Branch 14 → 18 not taken.
pred_angular_v_8:
✓ Branch 14 → 15 taken 127183 times.
✓ Branch 14 → 18 taken 5020 times.
|
1691975 |
if (!c_idx) { |
| 925 |
|
1396537 |
const int8_t *f = ff_vvc_intra_luma_filter[filter_flag][fact]; |
| 926 |
6/6
pred_angular_v_10:
✓ Branch 17 → 16 taken 14275336 times.
✓ Branch 17 → 21 taken 1165820 times.
pred_angular_v_12:
✓ Branch 17 → 16 taken 2583648 times.
✓ Branch 17 → 21 taken 103534 times.
pred_angular_v_8:
✓ Branch 17 → 16 taken 2768680 times.
✓ Branch 17 → 21 taken 127183 times.
|
21024201 |
for (int x = 0; x < w; x++) { |
| 927 |
|
19627664 |
const pixel *p = top + x + idx; |
| 928 |
|
19627664 |
POS(x, y) = INTRA_LUMA_FILTER(p); |
| 929 |
|
|
} |
| 930 |
|
|
} else { |
| 931 |
4/6
pred_angular_v_10:
✓ Branch 20 → 19 taken 2689624 times.
✓ Branch 20 → 21 taken 290418 times.
pred_angular_v_12:
✗ Branch 20 → 19 not taken.
✗ Branch 20 → 21 not taken.
pred_angular_v_8:
✓ Branch 20 → 19 taken 29888 times.
✓ Branch 20 → 21 taken 5020 times.
|
3014950 |
for (int x = 0; x < w; x++) { |
| 932 |
|
2719512 |
const pixel *p = top + x + idx; |
| 933 |
|
2719512 |
POS(x, y) = INTRA_CHROMA_FILTER(p); |
| 934 |
|
|
} |
| 935 |
|
|
} |
| 936 |
|
|
} |
| 937 |
6/6
pred_angular_v_10:
✓ Branch 21 → 22 taken 394300 times.
✓ Branch 21 → 25 taken 1292488 times.
pred_angular_v_12:
✓ Branch 21 → 22 taken 17084 times.
✓ Branch 21 → 25 taken 102452 times.
pred_angular_v_8:
✓ Branch 21 → 22 taken 28408 times.
✓ Branch 21 → 25 taken 128516 times.
|
1963248 |
if (need_pdpc) { |
| 938 |
|
439792 |
int inv_angle_sum = 256 + inv_angle; |
| 939 |
6/6
pred_angular_v_10:
✓ Branch 24 → 23 taken 2187216 times.
✓ Branch 24 → 25 taken 394300 times.
pred_angular_v_12:
✓ Branch 24 → 23 taken 135004 times.
✓ Branch 24 → 25 taken 17084 times.
pred_angular_v_8:
✓ Branch 24 → 23 taken 190600 times.
✓ Branch 24 → 25 taken 28408 times.
|
2952612 |
for (int x = 0; x < FFMIN(w, 3 << nscale); x++) { |
| 940 |
|
2512820 |
const pixel l = left[y + (inv_angle_sum >> 9)]; |
| 941 |
|
2512820 |
const pixel val = POS(x, y); |
| 942 |
|
2512820 |
const int wl = 32 >> ((x << 1) >> nscale); |
| 943 |
|
2512820 |
const int pred = val + (((l - val) * wl + 32) >> 6); |
| 944 |
|
2512820 |
POS(x, y) = CLIP(pred); |
| 945 |
|
2512820 |
inv_angle_sum += inv_angle; |
| 946 |
|
|
} |
| 947 |
|
|
} |
| 948 |
|
1963248 |
pos += dp; |
| 949 |
|
|
} |
| 950 |
|
225462 |
} |
| 951 |
|
|
|
| 952 |
|
|
//8.4.5.2.13 Specification of INTRA_ANGULAR2..INTRA_ANGULAR66 intra prediction modes |
| 953 |
|
206409 |
static void FUNC(pred_angular_h)(uint8_t *_src, const uint8_t *_top, const uint8_t *_left, |
| 954 |
|
|
const int w, const int h, const ptrdiff_t stride, const int c_idx, const int mode, |
| 955 |
|
|
const int ref_idx, const int filter_flag, const int need_pdpc) |
| 956 |
|
|
{ |
| 957 |
|
206409 |
pixel *src = (pixel *)_src; |
| 958 |
|
206409 |
const pixel *left = (const pixel *)_left - (1 + ref_idx); |
| 959 |
|
206409 |
const pixel *top = (const pixel *)_top; |
| 960 |
|
206409 |
const int is_luma = !c_idx; |
| 961 |
|
206409 |
const int intra_pred_angle = ff_vvc_intra_pred_angle_derive(mode); |
| 962 |
|
206409 |
const int dp = intra_pred_angle; |
| 963 |
|
206409 |
int nscale = 0, inv_angle, inv_angle_sum; |
| 964 |
|
|
|
| 965 |
6/6
pred_angular_h_10:
✓ Branch 3 → 4 taken 36794 times.
✓ Branch 3 → 6 taken 155973 times.
pred_angular_h_12:
✓ Branch 3 → 4 taken 539 times.
✓ Branch 3 → 6 taken 4126 times.
pred_angular_h_8:
✓ Branch 3 → 4 taken 2001 times.
✓ Branch 3 → 6 taken 6976 times.
|
206409 |
if (need_pdpc) { |
| 966 |
|
39334 |
inv_angle = ff_vvc_intra_inv_angle_derive(intra_pred_angle); |
| 967 |
|
39334 |
inv_angle_sum = 256 + inv_angle; |
| 968 |
|
39334 |
nscale = ff_vvc_nscale_derive(w, h, mode); |
| 969 |
|
|
} |
| 970 |
|
|
|
| 971 |
6/6
pred_angular_h_10:
✓ Branch 25 → 7 taken 1630408 times.
✓ Branch 25 → 26 taken 192767 times.
pred_angular_h_12:
✓ Branch 25 → 7 taken 115692 times.
✓ Branch 25 → 26 taken 4665 times.
pred_angular_h_8:
✓ Branch 25 → 7 taken 148120 times.
✓ Branch 25 → 26 taken 8977 times.
|
2100629 |
for (int y = 0; y < h; y++) { |
| 972 |
|
1894220 |
int pos = (1 + ref_idx) * intra_pred_angle; |
| 973 |
|
|
int wt; |
| 974 |
6/6
pred_angular_h_10:
✓ Branch 7 → 8 taken 423812 times.
✓ Branch 7 → 9 taken 1206596 times.
pred_angular_h_12:
✓ Branch 7 → 8 taken 13388 times.
✓ Branch 7 → 9 taken 102304 times.
pred_angular_h_8:
✓ Branch 7 → 8 taken 27084 times.
✓ Branch 7 → 9 taken 121036 times.
|
1894220 |
if (need_pdpc) |
| 975 |
|
464284 |
wt = (32 >> FFMIN(31, (y * 2) >> nscale)); |
| 976 |
|
|
|
| 977 |
6/6
pred_angular_h_10:
✓ Branch 21 → 10 taken 24789040 times.
✓ Branch 21 → 22 taken 1630408 times.
pred_angular_h_12:
✓ Branch 21 → 10 taken 2876304 times.
✓ Branch 21 → 22 taken 115692 times.
pred_angular_h_8:
✓ Branch 21 → 10 taken 3180544 times.
✓ Branch 21 → 22 taken 148120 times.
|
32740108 |
for (int x = 0; x < w; x++) { |
| 978 |
|
30845888 |
const int idx = (pos >> 5) + ref_idx; |
| 979 |
|
30845888 |
const int fact = pos & 31; |
| 980 |
|
30845888 |
const pixel *p = left + y + idx; |
| 981 |
|
|
int pred; |
| 982 |
17/18
pred_angular_h_10:
✓ Branch 10 → 11 taken 2413804 times.
✓ Branch 10 → 14 taken 22375236 times.
✓ Branch 11 → 12 taken 2011868 times.
✓ Branch 11 → 13 taken 401936 times.
✓ Branch 12 → 13 taken 1248888 times.
✓ Branch 12 → 14 taken 762980 times.
pred_angular_h_12:
✓ Branch 10 → 11 taken 384768 times.
✓ Branch 10 → 14 taken 2491536 times.
✓ Branch 11 → 12 taken 384768 times.
✗ Branch 11 → 13 not taken.
✓ Branch 12 → 13 taken 292656 times.
✓ Branch 12 → 14 taken 92112 times.
pred_angular_h_8:
✓ Branch 10 → 11 taken 449304 times.
✓ Branch 10 → 14 taken 2731240 times.
✓ Branch 11 → 12 taken 442784 times.
✓ Branch 11 → 13 taken 6520 times.
✓ Branch 12 → 13 taken 335652 times.
✓ Branch 12 → 14 taken 107132 times.
|
30845888 |
if (!fact && (!is_luma || !filter_flag)) { |
| 983 |
|
2285652 |
pred = p[1]; |
| 984 |
|
|
} else { |
| 985 |
5/6
pred_angular_h_10:
✓ Branch 14 → 15 taken 18327096 times.
✓ Branch 14 → 16 taken 4811120 times.
pred_angular_h_12:
✓ Branch 14 → 15 taken 2583648 times.
✗ Branch 14 → 16 not taken.
pred_angular_h_8:
✓ Branch 14 → 15 taken 2809180 times.
✓ Branch 14 → 16 taken 29192 times.
|
28560236 |
if (!c_idx) { |
| 986 |
|
23719924 |
const int8_t *f = ff_vvc_intra_luma_filter[filter_flag][fact]; |
| 987 |
|
23719924 |
pred = INTRA_LUMA_FILTER(p); |
| 988 |
|
|
} else { |
| 989 |
|
4840312 |
pred = INTRA_CHROMA_FILTER(p); |
| 990 |
|
|
} |
| 991 |
|
|
} |
| 992 |
6/6
pred_angular_h_10:
✓ Branch 17 → 18 taken 5449376 times.
✓ Branch 17 → 20 taken 19339664 times.
pred_angular_h_12:
✓ Branch 17 → 18 taken 428528 times.
✓ Branch 17 → 20 taken 2447776 times.
pred_angular_h_8:
✓ Branch 17 → 18 taken 570496 times.
✓ Branch 17 → 20 taken 2610048 times.
|
30845888 |
if (need_pdpc) { |
| 993 |
6/6
pred_angular_h_10:
✓ Branch 18 → 19 taken 2068900 times.
✓ Branch 18 → 20 taken 3380476 times.
pred_angular_h_12:
✓ Branch 18 → 19 taken 135004 times.
✓ Branch 18 → 20 taken 293524 times.
pred_angular_h_8:
✓ Branch 18 → 19 taken 200692 times.
✓ Branch 18 → 20 taken 369804 times.
|
6448400 |
if (y < (3 << nscale)) { |
| 994 |
|
2404596 |
const pixel t = top[x + (inv_angle_sum >> 9)]; |
| 995 |
|
2404596 |
pred = CLIP(pred + (((t - pred) * wt + 32) >> 6)); |
| 996 |
|
|
} |
| 997 |
|
|
} |
| 998 |
|
30845888 |
POS(x, y) = pred; |
| 999 |
|
30845888 |
pos += dp; |
| 1000 |
|
|
} |
| 1001 |
6/6
pred_angular_h_10:
✓ Branch 22 → 23 taken 423812 times.
✓ Branch 22 → 24 taken 1206596 times.
pred_angular_h_12:
✓ Branch 22 → 23 taken 13388 times.
✓ Branch 22 → 24 taken 102304 times.
pred_angular_h_8:
✓ Branch 22 → 23 taken 27084 times.
✓ Branch 22 → 24 taken 121036 times.
|
1894220 |
if (need_pdpc) |
| 1002 |
|
464284 |
inv_angle_sum += inv_angle; |
| 1003 |
|
|
} |
| 1004 |
|
206409 |
} |
| 1005 |
|
|
|
| 1006 |
|
1658 |
static void FUNC(ff_vvc_intra_dsp_init)(VVCIntraDSPContext *const intra) |
| 1007 |
|
|
{ |
| 1008 |
|
1658 |
intra->lmcs_scale_chroma = FUNC(lmcs_scale_chroma); |
| 1009 |
|
1658 |
intra->intra_cclm_pred = FUNC(intra_cclm_pred); |
| 1010 |
|
1658 |
intra->intra_pred = FUNC(intra_pred); |
| 1011 |
|
1658 |
intra->pred_planar = FUNC(pred_planar); |
| 1012 |
|
1658 |
intra->pred_mip = FUNC(pred_mip); |
| 1013 |
|
1658 |
intra->pred_dc = FUNC(pred_dc); |
| 1014 |
|
1658 |
intra->pred_v = FUNC(pred_v); |
| 1015 |
|
1658 |
intra->pred_h = FUNC(pred_h); |
| 1016 |
|
1658 |
intra->pred_angular_v = FUNC(pred_angular_v); |
| 1017 |
|
1658 |
intra->pred_angular_h = FUNC(pred_angular_h); |
| 1018 |
|
1658 |
} |
| 1019 |
|
|
|