Commit bad6e169 authored by hui su's avatar hui su
Browse files

Add a quick path in build_intra_predictors

For the cases where no reference data is available.

Change-Id: Ibf1ac9b7073acc2c7fc44da893f3d608dc74bc1e
parent cb507ff2
......@@ -1198,6 +1198,20 @@ static void build_intra_predictors_high(const MACROBLOCKD *xd,
#endif // CONFIG_EXT_INTRA
(void) plane;
assert(n_top_px >= 0);
assert(n_topright_px >= 0);
assert(n_left_px >= 0);
assert(n_bottomleft_px >= 0);
if ((!need_above && n_left_px == 0) || (!need_left && n_top_px == 0)) {
int i;
const int val = (n_left_px == 0) ? base + 1 : base - 1;
for (i = 0; i < bs; ++i) {
vpx_memset16(dst, val, bs);
dst += dst_stride;
}
return;
}
// NEED_LEFT
if (need_left) {
......@@ -1361,6 +1375,16 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
assert(n_left_px >= 0);
assert(n_bottomleft_px >= 0);
if ((!need_above && n_left_px == 0) || (!need_left && n_top_px == 0)) {
int i;
const int val = (n_left_px == 0) ? 129 : 127;
for (i = 0; i < bs; ++i) {
memset(dst, val, bs);
dst += dst_stride;
}
return;
}
// NEED_LEFT
if (need_left) {
#if CONFIG_EXT_INTRA
......
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