Removed rectangular intra prediction code

As all intra predictions happen on squared transform block now.

Change-Id: I7ec91e3f0ad01383a03d2bd3099bbf32e87e3466
This commit is contained in:
Yaowu Xu 2013-06-04 10:59:27 -07:00
Родитель 28d31aed7f
Коммит 9470c1a2a1
1 изменённых файлов: 13 добавлений и 78 удалений

Просмотреть файл

@ -204,6 +204,8 @@ void vp9_build_intra_predictors(uint8_t *src, int src_stride,
// 129 G H .. S T T T T T
// ..
assert(bw == bh);
if (left_available) {
for (i = 0; i < bh; i++)
yleft_col[i] = src[i * src_stride - 1];
@ -271,89 +273,22 @@ void vp9_build_intra_predictors(uint8_t *src, int src_stride,
}
break;
case D45_PRED:
d45_predictor(ypred_ptr, y_stride, bw, bh, yabove_row, yleft_col);
break;
case D135_PRED:
d135_predictor(ypred_ptr, y_stride, bw, bh, yabove_row, yleft_col);
break;
case D117_PRED:
d117_predictor(ypred_ptr, y_stride, bw, bh, yabove_row, yleft_col);
break;
case D153_PRED:
d153_predictor(ypred_ptr, y_stride, bw, bh, yabove_row, yleft_col);
break;
case D27_PRED:
d27_predictor(ypred_ptr, y_stride, bw, bh, yabove_row, yleft_col);
break;
case D63_PRED:
if (bw == bh) {
switch (mode) {
case D45_PRED:
d45_predictor(ypred_ptr, y_stride, bw, bh, yabove_row, yleft_col);
break;
case D135_PRED:
d135_predictor(ypred_ptr, y_stride, bw, bh, yabove_row, yleft_col);
break;
case D117_PRED:
d117_predictor(ypred_ptr, y_stride, bw, bh, yabove_row, yleft_col);
break;
case D153_PRED:
d153_predictor(ypred_ptr, y_stride, bw, bh, yabove_row, yleft_col);
break;
case D27_PRED:
d27_predictor(ypred_ptr, y_stride, bw, bh, yabove_row, yleft_col);
break;
case D63_PRED:
d63_predictor(ypred_ptr, y_stride, bw, bh, yabove_row, yleft_col);
break;
default:
assert(0);
}
} else if (bw > bh) {
uint8_t pred[64*64];
vpx_memset(yleft_col + bh, yleft_col[bh - 1], bw - bh);
switch (mode) {
case D45_PRED:
d45_predictor(pred, 64, bw, bw, yabove_row, yleft_col);
break;
case D135_PRED:
d135_predictor(pred, 64, bw, bw, yabove_row, yleft_col);
break;
case D117_PRED:
d117_predictor(pred, 64, bw, bw, yabove_row, yleft_col);
break;
case D153_PRED:
d153_predictor(pred, 64, bw, bw, yabove_row, yleft_col);
break;
case D27_PRED:
d27_predictor(pred, 64, bw, bw, yabove_row, yleft_col);
break;
case D63_PRED:
d63_predictor(pred, 64, bw, bw, yabove_row, yleft_col);
break;
default:
assert(0);
}
for (i = 0; i < bh; i++)
vpx_memcpy(ypred_ptr + y_stride * i, pred + i * 64, bw);
} else {
uint8_t pred[64 * 64];
vpx_memset(yabove_row + bw * 2, yabove_row[bw * 2 - 1], (bh - bw) * 2);
switch (mode) {
case D45_PRED:
d45_predictor(pred, 64, bh, bh, yabove_row, yleft_col);
break;
case D135_PRED:
d135_predictor(pred, 64, bh, bh, yabove_row, yleft_col);
break;
case D117_PRED:
d117_predictor(pred, 64, bh, bh, yabove_row, yleft_col);
break;
case D153_PRED:
d153_predictor(pred, 64, bh, bh, yabove_row, yleft_col);
break;
case D27_PRED:
d27_predictor(pred, 64, bh, bh, yabove_row, yleft_col);
break;
case D63_PRED:
d63_predictor(pred, 64, bh, bh, yabove_row, yleft_col);
break;
default:
assert(0);
}
for (i = 0; i < bh; i++)
vpx_memcpy(ypred_ptr + y_stride * i, pred + i * 64, bw);
}
d63_predictor(ypred_ptr, y_stride, bw, bh, yabove_row, yleft_col);
break;
default:
break;