Commit c9f8809e authored by Anton Khirnov's avatar Anton Khirnov

hevc/intra_pred: simplify neighboring sample derivation

parent 25bb7eaf
...@@ -159,10 +159,10 @@ do { \ ...@@ -159,10 +159,10 @@ do { \
} }
} }
if (cand_bottom_left) { if (cand_bottom_left) {
for (i = size + bottom_left_size; i < (size << 1); i++) for (i = size; i < size + bottom_left_size; i++)
left[i] = POS(-1, size + bottom_left_size - 1);
for (i = size + bottom_left_size - 1; i >= size; i--)
left[i] = POS(-1, i); left[i] = POS(-1, i);
EXTEND(left + size + bottom_left_size, POS(-1, size + bottom_left_size - 1),
size - bottom_left_size);
} }
if (cand_left) if (cand_left)
for (i = size - 1; i >= 0; i--) for (i = size - 1; i >= 0; i--)
...@@ -172,13 +172,11 @@ do { \ ...@@ -172,13 +172,11 @@ do { \
top[-1] = left[-1]; top[-1] = left[-1];
} }
if (cand_up) if (cand_up)
for (i = size - 1; i >= 0; i--) memcpy(top, src - stride, size * sizeof(pixel));
top[i] = POS(i, -1);
if (cand_up_right) { if (cand_up_right) {
for (i = size + top_right_size; i < (size << 1); i++) memcpy(top + size, src - stride + size, size * sizeof(pixel));
top[i] = POS(size + top_right_size - 1, -1); EXTEND(top + size + top_right_size, POS(size + top_right_size - 1, -1),
for (i = size + top_right_size - 1; i >= size; i--) size - top_right_size);
top[i] = POS(i, -1);
} }
if (s->pps->constrained_intra_pred_flag == 1) { if (s->pps->constrained_intra_pred_flag == 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment