27#define POS(x, y) src[(x) + stride * (y)]
30 const int w,
const int h,
const pixel* pdsy,
const int *
a,
const int *
b,
const int *k)
34 const int c_idx =
i + 1;
35 const int x = x0 >>
sps->hshift[c_idx];
36 const int y = y0 >>
sps->vshift[c_idx];
37 const ptrdiff_t
stride =
fc->frame->linesize[c_idx] /
sizeof(
pixel);
39 for (
int y = 0; y <
h; y++) {
40 for (
int x = 0; x <
w; x++) {
41 const int dsy = pdsy[y *
w + x];
42 const int pred = ((dsy *
a[
i]) >> k[
i]) +
b[
i];
55 for (
int i = 0;
i < 2;
i++) {
62 const int x,
const int y,
const int w,
const int h,
const int avail_t,
const int avail_l,
70 num_samp[
TOP] = avail_t ?
w : 0;
71 num_samp[
LEFT] = avail_l ?
h : 0;
76 if (!num_samp[
TOP] && !num_samp[
LEFT]) {
80 const int start = num_samp[
i] >> (2 + num_is4);
81 const int step =
FFMAX(1, num_samp[
i] >> (1 + num_is4)) ;
82 cnt[
i] =
FFMIN(num_samp[
i], (1 + num_is4) << 1);
83 for (
int c = 0;
c < cnt[
i];
c++)
84 pos[
i][
c] = start +
c * step;
92 for (
int i = 0;
i < cnt;
i++)
97 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],
103 const int hs =
sps->hshift[1];
104 const int vs =
sps->vshift[1];
105 const ptrdiff_t
stride =
fc->frame->linesize[0] /
sizeof(
pixel);
113 if (vs && !b_ctu_boundary) {
115 for (
int i = 0;
i < cnt[
TOP];
i++) {
116 const int x =
pos[
TOP][
i] << hs;
118 const int has_left = x || avail_l;
120 if (
sps->r->sps_chroma_vertical_collocated_flag) {
121 sel_luma[
i] = (
POS(0, -1) + l + 4 *
POS(0, 0) +
POS(1, 0) +
POS(0, 1) + 4) >> 3;
123 const pixel l1 = has_left ?
POS(-1, 1) :
POS(0, 1);
124 sel_luma[
i] = (l + l1 + 2 * (
POS(0, 0) +
POS(0, 1)) +
POS(1, 0) +
POS(1, 1) + 4) >> 3;
129 for (
int i = 0;
i < cnt[
TOP];
i++) {
130 const int x =
pos[
TOP][
i] << hs;
132 const int has_left = x || avail_l;
134 sel_luma[
i] = (l + 2 *
POS(0, 0) +
POS(1, 0) + 2) >> 2;
141 const pixel *source = (
pixel *)
fc->frame->data[0] + x0 + y0 *
stride - (1 + hs) * avail_l;
142 left = source - avail_l;
144 for (
int i = 0;
i < cnt[
LEFT];
i++) {
151 pred = (*l + 2 *
POS(0, 0) +
POS(1, 0) + 2) >> 2;
153 if (
sps->r->sps_chroma_vertical_collocated_flag) {
154 const int has_top = y || avail_t;
156 pred = (*l + t + 4 *
POS(0, 0) +
POS(1, 0) +
POS(0, 1) + 4) >> 3;
168 const int x,
const int y,
const int cnt[2],
const int pos[2][
MAX_PICK_POS],
172 const ptrdiff_t
stride =
fc->frame->linesize[c_idx] /
sizeof(
pixel);
176 for (
int i = 0;
i < cnt[
TOP];
i++) {
182 for (
int i = 0;
i < cnt[
LEFT];
i++) {
189 const int x0,
const int y0,
const int w,
const int h,
const int avail_t,
const int avail_l,
194 const int x = x0 >>
sps->hshift[1];
195 const int y = y0 >>
sps->vshift[1];
204 if (cnt[
TOP] + cnt[
LEFT] == 2) {
206 sel[c_idx][3] = sel[c_idx][0];
207 sel[c_idx][2] = sel[c_idx][1];
208 sel[c_idx][0] = sel[c_idx][1];
209 sel[c_idx][1] = sel[c_idx][3];
218 int min_grp_idx[] = { 0, 2 };
219 int max_grp_idx[] = { 1, 3 };
221 if (sel[
LUMA][min_grp_idx[0]] > sel[
LUMA][min_grp_idx[1]])
222 FFSWAP(
int, min_grp_idx[0], min_grp_idx[1]);
223 if (sel[
LUMA][max_grp_idx[0]] > sel[
LUMA][max_grp_idx[1]])
224 FFSWAP(
int, max_grp_idx[0], max_grp_idx[1]);
225 if (sel[
LUMA][min_grp_idx[0]] > sel[
LUMA][max_grp_idx[1]]) {
226 FFSWAP(
int, min_grp_idx[0], max_grp_idx[0]);
227 FFSWAP(
int, min_grp_idx[1], max_grp_idx[1]);
229 if (sel[
LUMA][min_grp_idx[1]] > sel[
LUMA][max_grp_idx[0]])
230 FFSWAP(
int, min_grp_idx[1], max_grp_idx[0]);
232 max[c_idx] = (sel[c_idx][max_grp_idx[0]] + sel[c_idx][max_grp_idx[1]] + 1) >> 1;
233 min[c_idx] = (sel[c_idx][min_grp_idx[0]] + sel[c_idx][min_grp_idx[1]] + 1) >> 1;
238 const int x0,
const int y0,
const int w,
const int h,
const int avail_t,
const int avail_l,
239 int *
a,
int *
b,
int *k)
254 for (
int i = 0;
i < 2;
i++) {
260 for (
int i = 0;
i < 2;
i++) {
261 const static int div_sig_table[] = {0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0};
262 const int diffc =
max[
i + 1] -
min[
i + 1];
266 x += (norm_diff) ? 1 : 0;
268 v = div_sig_table[norm_diff] | 8;
270 a[
i] = (diffc * v + add) >> y;
271 k[
i] =
FFMAX(1, 3 + x -y);
272 sign =
a[
i] < 0 ? -1 : (
a[
i] > 0);
273 a[
i] = ((3 + x - y) < 1) ? sign * 15 :
a[
i];
283 const int x0,
const int y0,
const int w,
const int h,
const int avail_t,
const int avail_l,
286 const int hs =
fc->ps.sps->hshift[1];
287 const int vs =
fc->ps.sps->vshift[1];
288 const ptrdiff_t
stride =
fc->frame->linesize[0] /
sizeof(
pixel);
295 for (
int i = 0;
i <
h;
i++)
299 for (
int i = 0;
i <
h;
i++) {
302 const pixel *t = top;
304 for (
int j = 0; j <
w; j++) {
312 if (
sps->r->sps_chroma_vertical_collocated_flag) {
313 for (
int j = 0; j <
w; j++) {
321 for (
int j = 0; j <
w; j++) {
337 const int x,
const int y,
const int w,
const int h,
const int avail_t,
const int avail_l)
340 const ptrdiff_t
stride =
fc->frame->linesize[c_idx] /
sizeof(
pixel);
342 for (
int i = 0;
i <
h;
i++) {
343 for (
int j = 0; j <
w; j++) {
359 const int hs =
sps->hshift[1];
360 const int vs =
sps->vshift[1];
361 const int x = x0 >> hs;
362 const int y = y0 >> vs;
363 const int w =
width >> hs;
365 int a[2],
b[2], k[2];
368 if (!avail_t && !avail_l) {
379 const int size =
FFMIN(avail, target_size);
381 for (
int i = 0;
i <
size;
i++) {
385 sum += *(start -
stride) * (target_size -
size);
394 const int size_y =
FFMIN(
fc->ps.sps->ctb_size_y, 64);
396 const int x = x0 & ~(size_y - 1);
397 const int y = y0 & ~(size_y - 1);
398 if (lc->lmcs.x_vpdu != x || lc->lmcs.y_vpdu != y) {
399 int cnt = 0, luma = 0,
i;
413 luma = (luma + (cnt >> 1)) >>
av_log2(cnt);
418 if (luma < lmcs->pivot[
i + 1])
427 return lc->lmcs.chroma_scale;
432 const int width,
const int height,
const int x0_cu,
const int y0_cu)
436 for (
int y = 0; y <
height; y++) {
437 for (
int x = 0; x <
width; x++) {
441 *
coeff = (
c * chroma_scale + (1 << 10)) >> 11;
443 *
coeff = -((-
c * chroma_scale + (1 << 10)) >> 11);
450 pixel *filtered_left,
pixel *filtered_top,
const int left_size,
const int top_size,
451 const int unfilter_last_one)
453 filtered_left[-1] = filtered_top[-1] = (
left[0] + 2 *
left[-1] + top[0] + 2 ) >> 2;
454 for (
int i = 0;
i < left_size - unfilter_last_one;
i++) {
457 for (
int i = 0;
i < top_size - unfilter_last_one;
i++) {
458 filtered_top[
i] = (top[
i-1] + 2 * top[
i] + top[
i + 1] + 2) >> 2;
460 if (unfilter_last_one) {
461 filtered_top[top_size - 1] = top[top_size - 1];
462 filtered_left[left_size - 1] =
left[left_size - 1];
468 const int x,
int y,
int w,
int h,
int c_idx,
const int is_intra_mip,
469 const int mode,
const int ref_idx,
const int need_pdpc)
471#define EXTEND(ptr, val, len) \
473 for (i = 0; i < (len); i++) \
478 const int filter_flag = !ref_idx &&
w *
h > 32 && !c_idx &&
480 int cand_up_left = lc->na.cand_up_left;
485 const int ref_line = ref_idx == 3 ? -4 : (-1 - ref_idx);
486 int left_size, top_size, unfilter_left_size, unfilter_top_size;
487 int left_available, top_available;
489 int intra_pred_angle, inv_angle;
495 unfilter_left_size = left_size + filter_flag;
496 unfilter_top_size = top_size + filter_flag;
498 unfilter_left_size = left_size =
h;
499 unfilter_top_size = top_size =
w;
502 unfilter_left_size = left_size = need_pdpc ?
h : 1;
503 unfilter_top_size = top_size =
w;
505 unfilter_left_size = left_size =
h;
507 unfilter_top_size = top_size = need_pdpc ?
w : 1;
518 unfilter_top_size = top_size = refw;
519 unfilter_left_size = left_size = refh;
523 for (
i = 0;
i < left_available;
i++)
527 memcpy(top,
src + ref_line *
stride, top_available *
sizeof(
pixel));
529 for (
int i = -1;
i >= ref_line;
i--) {
532 top[
i] =
POS(
i, ref_line);
533 }
else if (left_available) {
535 }
else if (top_available) {
536 left[
i] = top[
i] = top[0];
542 EXTEND(top + top_available, top[top_available-1], unfilter_top_size - top_available);
543 EXTEND(
left + left_available,
left[left_available-1], unfilter_left_size - left_available);
545 if (ref_filter_flag) {
547 const int unfilter_last_one = left_size == unfilter_left_size;
548 FUNC(
ref_filter)(
left, top, filtered_left, filtered_top, unfilter_left_size, unfilter_top_size, unfilter_last_one);
549 left = filtered_left;
555 edge->filter_flag = 0;
558 const int intra_hor_ver_dist_thres[] = {24, 14, 2, 0, 0};
560 edge->filter_flag = min_dist_ver_hor > intra_hor_ver_dist_thres[ntbs - 2];
565 if (intra_pred_angle < 0) {
566 pixel *p = top - (ref_idx + 1);
567 for (
int x = -
h; x < 0; x++) {
568 const int idx = -1 - ref_idx +
FFMIN((x*inv_angle + 256) >> 9,
h);
572 for (
int i = refw;
i <= refw +
FFMAX(1,
w/
h) * ref_idx + 1;
i++)
573 top[
i] = top[refw - 1];
576 if (intra_pred_angle < 0) {
578 for (
int x = -
w; x < 0; x++) {
579 const int idx = -1 - ref_idx +
FFMIN((x*inv_angle + 256) >> 9,
w);
583 for (
int i = refh;
i <= refh +
FFMAX(1,
h/
w) * ref_idx + 1;
i++)
589 edge->left = (uint8_t*)
left;
590 edge->top = (uint8_t*)top;
601 const int log2_min_cb_size =
sps->min_cb_log2_size_y;
602 const int min_cb_width =
pps->min_cb_width;
603 const int x_cb = x0 >> log2_min_cb_size;
604 const int y_cb = y0 >> log2_min_cb_size;
606 const int hshift =
fc->ps.sps->hshift[c_idx];
607 const int vshift =
fc->ps.sps->vshift[c_idx];
608 const int x = x0 >> hshift;
609 const int y = y0 >> vshift;
610 const int w =
width >> hshift;
611 const int h =
height >> vshift;
612 const ptrdiff_t
stride =
fc->frame->linesize[c_idx] /
sizeof(
pixel);
617 const int intra_mip_flag =
SAMPLE_CTB(
fc->tab.imf, x_cb, y_cb);
626 FUNC(
prepare_intra_edge_params)(lc, &edge,
src,
stride, x, y,
w,
h, c_idx, is_intra_mip,
mode, ref_idx, need_pdpc);
629 int intra_mip_transposed_flag;
631 unpack_mip_info(&intra_mip_transposed_flag, &intra_mip_mode, intra_mip_flag);
633 fc->vvcdsp.intra.pred_mip((uint8_t *)
src, edge.
top, edge.
left,
634 w,
h,
stride, intra_mip_mode, intra_mip_transposed_flag);
645 fc->vvcdsp.intra.pred_angular_v((uint8_t *)
src, edge.
top, edge.
left,
649 fc->vvcdsp.intra.pred_angular_h((uint8_t *)
src, edge.
top, edge.
left,
661 for (
int y = 0; y <
h; y++) {
662 for (
int x = 0; x <
w; x++) {
663 int l, t, wl, wt,
pred;
672 t = top[x] - top[-1] +
POS(x,y);
687 const uint8_t *_left,
const int w,
const int h,
const ptrdiff_t
stride)
696 const int shift = (logw + logh + 1);
697 for (y = 0; y <
h; y++) {
698 for (x = 0; x <
w; x++) {
699 const int pred_v = ((
h - 1 - y) * top[x] + (y + 1) *
left[
h]) << logw;
700 const int pred_h = ((
w - 1 - x) *
left[y] + (x + 1) * top[
w]) << logh;
711 const int b_dwn = n_tb_s / boundary_size;
714 if (boundary_size == n_tb_s) {
715 for (
int i = 0;
i < n_tb_s;
i++)
719 for (
int i = 0;
i < boundary_size;
i++) {
722 for (
int j = 1; j < b_dwn; j++)
729 const int up_hor,
const int up_ver,
const int pred_size,
const int *reduced,
const int reduced_size,
730 const int ow,
const int temp0,
const uint8_t *
matrix,
int is_transposed)
732 src = &
POS(up_hor - 1, up_ver - 1);
733 for (
int y = 0; y < pred_size; y++) {
734 for (
int x = 0; x < pred_size; x++) {
736 for (
int i = 0;
i < reduced_size;
i++)
742 POS(y * up_hor, x * up_ver) =
pred;
744 POS(x * up_hor, y * up_ver) =
pred;
750 const pixel *boundary,
const int boundary_step,
const int pred_size)
753 for (
int i = 0;
i < dst_height;
i++) {
754 const pixel *before = boundary;
755 const pixel *after =
dst - dst_step;
757 for (
int j = 0; j < pred_size; j++) {
758 after += dst_step *
factor;
759 for (
int k = 1; k <
factor; k++) {
760 int mid = (
factor - k) * (*before) + k * (*after);
767 boundary += boundary_step;
774 const uint8_t *_left,
const int w,
const int h,
const ptrdiff_t
stride,
775 int mode_id,
int is_transposed)
782 static const int boundary_sizes[] = {2, 4, 4};
783 static const int pred_sizes[] = {4, 4, 8};
784 const int boundary_size = boundary_sizes[size_id];
785 const int pred_size = pred_sizes[size_id];
786 const int in_size = 2 * boundary_size - ((size_id == 2) ? 1 : 0);
788 const int up_hor =
w / pred_size;
789 const int up_ver =
h / pred_size;
792 int *red_t = reduced;
793 int *red_l = reduced + boundary_size;
798 FFSWAP(
int*, red_t, red_l);
808 ow = reduced[1] - temp0;
811 for (
int i = 1;
i < in_size;
i++) {
812 reduced[
i] = reduced[
i + off] - temp0;
817 FUNC(
mip_reduced_pred)(
src,
stride, up_hor, up_ver, pred_size, reduced, in_size, ow, temp0,
matrix, is_transposed);
818 if (up_hor > 1 || up_ver > 1) {
827 const int w,
const int h)
835 for (
int i = 0;
i <
w;
i++)
839 for (
int i = 0;
i <
h;
i++)
848 const uint8_t *_left,
const int w,
const int h,
const ptrdiff_t
stride)
856 for (y = 0; y <
h; y++) {
858 for (x = 0; x <
w; x += 4) {
867 const int w,
const int h,
const ptrdiff_t
stride)
871 for (
int y = 0; y <
h; y++) {
882 for (
int y = 0; y <
h; y++) {
884 for (
int x = 0; x <
w; x += 4) {
890#define INTRA_LUMA_FILTER(p) CLIP((p[0] * f[0] + p[1] * f[1] + p[2] * f[2] + p[3] * f[3] + 32) >> 6)
891#define INTRA_CHROMA_FILTER(p) (((32 - fact) * p[1] + fact * p[2] + 16) >> 5)
895 const int w,
const int h,
const ptrdiff_t
stride,
const int c_idx,
const int mode,
896 const int ref_idx,
const int filter_flag,
const int need_pdpc)
900 const pixel *top = (
const pixel *)_top - (1 + ref_idx);
902 int pos = (1 + ref_idx) * intra_pred_angle;
903 const int dp = intra_pred_angle;
904 const int is_luma = !c_idx;
905 int nscale, inv_angle;
912 for (
int y = 0; y <
h; y++) {
913 const int idx = (
pos >> 5) + ref_idx;
915 if (!
fact && (!is_luma || !filter_flag)) {
916 for (
int x = 0; x <
w; x++) {
917 const pixel *p = top + x + idx + 1;
923 for (
int x = 0; x <
w; x++) {
924 const pixel *p = top + x + idx;
928 for (
int x = 0; x <
w; x++) {
929 const pixel *p = top + x + idx;
935 int inv_angle_sum = 256 + inv_angle;
936 for (
int x = 0; x <
FFMIN(
w, 3 << nscale); x++) {
937 const pixel l =
left[y + (inv_angle_sum >> 9)];
939 const int wl = 32 >> ((x << 1) >> nscale);
940 const int pred =
val + (((l -
val) * wl + 32) >> 6);
942 inv_angle_sum += inv_angle;
951 const int w,
const int h,
const ptrdiff_t
stride,
const int c_idx,
const int mode,
952 const int ref_idx,
const int filter_flag,
const int need_pdpc)
957 const int is_luma = !c_idx;
959 const int dp = intra_pred_angle;
960 int nscale = 0, inv_angle, inv_angle_sum;
964 inv_angle_sum = 256 + inv_angle;
968 for (
int y = 0; y <
h; y++) {
969 int pos = (1 + ref_idx) * intra_pred_angle;
972 wt = (32 >>
FFMIN(31, (y * 2) >> nscale));
974 for (
int x = 0; x <
w; x++) {
975 const int idx = (
pos >> 5) + ref_idx;
979 if (!
fact && (!is_luma || !filter_flag)) {
990 if (y < (3 << nscale)) {
991 const pixel t = top[x + (inv_angle_sum >> 9)];
999 inv_angle_sum += inv_angle;
uint8_t ptrdiff_t const uint8_t * _src
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static double val(void *priv, double ch)
static double fact(double i)
#define PIXEL_SPLAT_X4(x)
static int BS_FUNC left(const BSCTX *bc)
Return the number of the bits left in a buffer.
#define i(width, name, range_min, range_max)
static int FUNC sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
static const uint16_t fc[]
#define SAMPLE_CTB(tab, x, y)
static void scale(int *out, const int *in, const int w, const int h, const int shift)
static void lmcs_scale_chroma(VVCLocalContext *lc, TransformUnit *tu, TransformBlock *tb, const int target_ch_type)
int ff_vvc_intra_pred_angle_derive(int pred_mode)
int ff_vvc_nscale_derive(int w, int h, int mode)
int ff_vvc_get_top_available(const VVCLocalContext *lc, int x0, int y0, int target_size, int c_idx)
int ff_vvc_wide_angle_mode_mapping(const CodingUnit *cu, int tb_width, int tb_height, int c_idx, int pred_mode_intra)
int ff_vvc_get_left_available(const VVCLocalContext *lc, int x0, int y0, int target_size, int c_idx)
int ff_vvc_need_pdpc(int w, int h, uint8_t bdpcm_flag, int mode, int ref_idx)
int ff_vvc_ref_filter_flag_derive(int mode)
int ff_vvc_get_mip_size_id(int w, int h)
int ff_vvc_intra_inv_angle_derive(int pred_mode)
static av_always_inline void FUNC ref_filter(const pixel *left, const pixel *top, pixel *filtered_left, pixel *filtered_top, const int left_size, const int top_size, const int unfilter_last_one)
static void FUNC pred_angular_v(uint8_t *_src, const uint8_t *_top, const uint8_t *_left, const int w, const int h, const ptrdiff_t stride, const int c_idx, const int mode, const int ref_idx, const int filter_flag, const int need_pdpc)
static av_always_inline void FUNC cclm_get_params_default(int *a, int *b, int *k)
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, const pixel *boundary, const int boundary_step, const int pred_size)
static av_always_inline void FUNC cclm_pred_default(VVCFrameContext *fc, const int x, const int y, const int w, const int h, const int avail_t, const int avail_l)
static av_always_inline pixel FUNC pred_dc_val(const pixel *top, const pixel *left, const int w, const int h)
#define EXTEND(ptr, val, len)
static av_always_inline void FUNC mip_reduced_pred(pixel *src, const ptrdiff_t stride, const int up_hor, const int up_ver, const int pred_size, const int *reduced, const int reduced_size, const int ow, const int temp0, const uint8_t *matrix, int is_transposed)
static av_always_inline void FUNC cclm_select_chroma(const VVCFrameContext *fc, const int x, const int y, const int cnt[2], const int pos[2][MAX_PICK_POS], pixel sel[][MAX_PICK_POS *2])
static av_always_inline void FUNC cclm_select_luma_444(const pixel *src, const int step, const int cnt, const int pos[MAX_PICK_POS], pixel *sel_luma)
static void FUNC pred_h(uint8_t *_src, const uint8_t *_left, const int w, const int h, const ptrdiff_t stride)
static av_always_inline int FUNC cclm_get_select_pos(const VVCLocalContext *lc, const int x, const int y, const int w, const int h, const int avail_t, const int avail_l, int cnt[2], int pos[2][MAX_PICK_POS])
static int FUNC lmcs_derive_chroma_scale(VVCLocalContext *lc, const int x0, const int y0)
static av_always_inline void FUNC mip_downsampling(int *reduced, const int boundary_size, const pixel *ref, const int n_tb_s)
static void FUNC pred_angular_h(uint8_t *_src, const uint8_t *_top, const uint8_t *_left, const int w, const int h, const ptrdiff_t stride, const int c_idx, const int mode, const int ref_idx, const int filter_flag, const int need_pdpc)
static void FUNC intra_cclm_pred(const VVCLocalContext *lc, const int x0, const int y0, const int width, const int height)
static av_always_inline int FUNC cclm_select_samples(const VVCLocalContext *lc, const int x0, const int y0, const int w, const int h, const int avail_t, const int avail_l, pixel sel[][MAX_PICK_POS *2])
static av_always_inline void FUNC cclm_linear_pred(VVCFrameContext *fc, const int x0, const int y0, const int w, const int h, const pixel *pdsy, const int *a, const int *b, const int *k)
static av_always_inline void FUNC cclm_select_luma(const VVCFrameContext *fc, 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], pixel *sel_luma)
static av_always_inline void FUNC cclm_get_min_max(const pixel sel[][MAX_PICK_POS *2], int *min, int *max)
static void FUNC ff_vvc_intra_dsp_init(VVCIntraDSPContext *const intra)
static av_always_inline void FUNC pred_mip(uint8_t *_src, const uint8_t *_top, const uint8_t *_left, const int w, const int h, const ptrdiff_t stride, int mode_id, int is_transposed)
static av_always_inline void FUNC pred_v(uint8_t *_src, const uint8_t *_top, const int w, const int h, const ptrdiff_t stride)
static int FUNC lmcs_sum_samples(const pixel *start, ptrdiff_t stride, const int avail, const int target_size)
#define INTRA_CHROMA_FILTER(p)
static av_always_inline void FUNC prepare_intra_edge_params(const VVCLocalContext *lc, IntraEdgeParams *edge, const pixel *src, const ptrdiff_t stride, const int x, int y, int w, int h, int c_idx, const int is_intra_mip, const int mode, const int ref_idx, const int need_pdpc)
#define INTRA_LUMA_FILTER(p)
static av_always_inline void FUNC cclm_get_params(const VVCLocalContext *lc, const int x0, const int y0, const int w, const int h, const int avail_t, const int avail_l, int *a, int *b, int *k)
static av_always_inline void FUNC cclm_get_luma_rec_pixels(const VVCFrameContext *fc, const int x0, const int y0, const int w, const int h, const int avail_t, const int avail_l, pixel *pdsy)
static int shift(int a, int b)
static const int factor[16]
#define FFSWAP(type, a, b)
static av_always_inline void FUNC intra_pred(HEVCLocalContext *lc, const HEVCPPS *pps, int x0, int y0, int log2_size, int c_idx)
static void FUNC pred_dc(uint8_t *_src, const uint8_t *_top, const uint8_t *_left, ptrdiff_t stride, int log2_size, int c_idx)
static av_always_inline void FUNC pred_planar(uint8_t *_src, const uint8_t *_top, const uint8_t *_left, ptrdiff_t stride, int trafo_size)
static const float pred[4]
int mip_chroma_direct_flag
MipChromaDirectFlag.
int bdpcm_flag[VVC_MAX_SAMPLE_ARRAYS]
BdpcmFlag.
enum IspType isp_split_type
IntraSubPartitionsSplitType.
IntraPredMode intra_pred_mode_y
IntraPredModeY.
uint8_t intra_luma_ref_idx
IntraLumaRefLineIdx[][].
IntraPredMode intra_pred_mode_c
IntraPredModeC.
uint16_t chroma_scale_coeff[LMCS_MAX_BIN_SIZE]
static int ref[MAX_W *MAX_W]
static const double coeff[2][5]
static av_always_inline int diff(const struct color_info *a, const struct color_info *b, const int trans_thresh)
const int8_t ff_vvc_intra_luma_filter[VVC_INTRA_LUMA_TYPES][VVC_INTRA_LUMA_FACTS][VVC_INTRA_LUMA_TAPS]
const uint8_t * ff_vvc_get_mip_matrix(const int size_id, const int mode_id)
static av_always_inline void unpack_mip_info(int *intra_mip_transposed_flag, int *intra_mip_mode, const uint8_t mip_info)
#define LMCS_MAX_BIN_SIZE