37 if ((
w == 4 ||
h == 4) || (
w == 8 &&
h == 8))
44 int side_size, nscale;
64 if ((
w >= 4 &&
h >= 4) && !ref_idx && !bdpcm_flag) {
80 const int ch_type = c_idx > 0;
81 for (
int i = lc->
num_ras[ch_type] - 1;
i >= 0;
i--) {
83 const int r = (
a->x +
a->w);
84 const int b = (
a->y +
a->h);
85 if (
a->x <= x && x < r && a->y <= y && y <
b)
99 const int hs =
sps->hshift[c_idx];
100 const int vs =
sps->vshift[c_idx];
101 const int log2_ctb_size_v =
sps->ctb_log2_size_y - vs;
102 const int end_of_ctb_x = ((lc->
cu->
x0 >>
sps->ctb_log2_size_y) + 1) <<
sps->ctb_log2_size_y;
104 const int max_x =
FFMIN(
fc->ps.pps->width, end_of_ctb_x) >> hs;
112 if (
sps->r->sps_entropy_coding_sync_enabled_flag)
113 target_size =
FFMIN(target_size, (end_of_ctb_x >> hs) - x);
117 target_size =
FFMAX(0,
FFMIN(target_size, max_x - x));
119 const int sz =
FFMIN(target_size,
a->x +
a->w - px);
130 const int hs =
sps->hshift[c_idx];
131 const int vs =
sps->vshift[c_idx];
132 const int log2_ctb_size_h =
sps->ctb_log2_size_y - hs;
134 const int end_of_ctb_y = ((lc->
cu->
y0 >>
sps->ctb_log2_size_y) + 1) <<
sps->ctb_log2_size_y;
135 const int max_y =
FFMIN(
fc->ps.pps->height, end_of_ctb_y) >> vs;
142 target_size =
FFMAX(0,
FFMIN(target_size, max_y - y));
147 const int sz =
FFMIN(target_size,
a->y +
a->h - py);
154 static int less(
const void *
a,
const void *
b)
156 return *(
const int*)
a - *(
const int*)
b;
161 static const int modes[] = { -14, -12, -10, -6,
INTRA_PLANAR, 2, 34, 66, 72, 76, 78, 80};
167 static const int angles[] = {
168 0, 1, 2, 3, 4, 6, 8, 10, 12, 14, 16, 18, 20, 23, 26, 29,
169 32, 35, 39, 45, 51, 57, 64, 73, 86, 102, 128, 171, 256, 341, 512
171 int sign = 1, idx, intra_pred_angle;
174 }
else if (pred_mode > 0) {
183 intra_pred_angle = sign * angles[idx];
184 return intra_pred_angle;
190 if (intra_pred_angle > 0)
198 const int tb_width,
const int tb_height,
const int c_idx,
int pred_mode_intra)
200 int nw, nh, wh_ratio,
min,
max;
210 max = (wh_ratio > 1) ? (8 + 2 * wh_ratio) : 8;
211 min = (wh_ratio > 1) ? (60 - 2 * wh_ratio) : 60;
213 if (nw > nh && pred_mode_intra >=2 && pred_mode_intra <
max)
214 pred_mode_intra += 65;
215 else if (nh > nw && pred_mode_intra <= 66 && pred_mode_intra >
min)
216 pred_mode_intra -= 67;
217 return pred_mode_intra;