| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 DST(2, 0) = DST(1, 1) = DST(0, 2) = AVG3(C, D, E); | 457 DST(2, 0) = DST(1, 1) = DST(0, 2) = AVG3(C, D, E); |
| 458 DST(3, 0) = DST(2, 1) = DST(1, 2) = DST(0, 3) = AVG3(D, E, F); | 458 DST(3, 0) = DST(2, 1) = DST(1, 2) = DST(0, 3) = AVG3(D, E, F); |
| 459 DST(3, 1) = DST(2, 2) = DST(1, 3) = AVG3(E, F, G); | 459 DST(3, 1) = DST(2, 2) = DST(1, 3) = AVG3(E, F, G); |
| 460 DST(3, 2) = DST(2, 3) = AVG3(F, G, H); | 460 DST(3, 2) = DST(2, 3) = AVG3(F, G, H); |
| 461 DST(3, 3) = H; // differs from vp8 | 461 DST(3, 3) = H; // differs from vp8 |
| 462 } | 462 } |
| 463 | 463 |
| 464 static INLINE void d45_predictor(uint8_t *dst, ptrdiff_t stride, int bs, | 464 static INLINE void d45_predictor(uint8_t *dst, ptrdiff_t stride, int bs, |
| 465 const uint8_t *above, const uint8_t *left) { | 465 const uint8_t *above, const uint8_t *left) { |
| 466 const uint8_t above_right = above[bs - 1]; | 466 const uint8_t above_right = above[bs - 1]; |
| 467 const uint8_t *const dst_row0 = dst; |
| 467 int x, size; | 468 int x, size; |
| 468 uint8_t avg[31]; // TODO(jzern): this could be block size specific | |
| 469 (void)left; | 469 (void)left; |
| 470 | 470 |
| 471 for (x = 0; x < bs - 1; ++x) { | 471 for (x = 0; x < bs - 1; ++x) { |
| 472 avg[x] = AVG3(above[x], above[x + 1], above[x + 2]); | 472 dst[x] = AVG3(above[x], above[x + 1], above[x + 2]); |
| 473 } | 473 } |
| 474 for (x = 0, size = bs - 1; x < bs; ++x, --size) { | 474 dst[bs - 1] = above_right; |
| 475 memcpy(dst, avg + x, size); | 475 dst += stride; |
| 476 for (x = 1, size = bs - 2; x < bs; ++x, --size) { |
| 477 memcpy(dst, dst_row0 + x, size); |
| 476 memset(dst + size, above_right, x + 1); | 478 memset(dst + size, above_right, x + 1); |
| 477 dst += stride; | 479 dst += stride; |
| 478 } | 480 } |
| 479 } | 481 } |
| 480 intra_pred_no_4x4(d45) | 482 intra_pred_no_4x4(d45) |
| 481 | 483 |
| 482 void vp9_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, | 484 void vp9_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, |
| 483 const uint8_t *above, const uint8_t *left) { | 485 const uint8_t *above, const uint8_t *left) { |
| 484 const int I = left[0]; | 486 const int I = left[0]; |
| 485 const int J = left[1]; | 487 const int J = left[1]; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 | 526 |
| 525 // the rest of the block | 527 // the rest of the block |
| 526 for (r = 2; r < bs; ++r) { | 528 for (r = 2; r < bs; ++r) { |
| 527 for (c = 1; c < bs; c++) | 529 for (c = 1; c < bs; c++) |
| 528 dst[c] = dst[-2 * stride + c - 1]; | 530 dst[c] = dst[-2 * stride + c - 1]; |
| 529 dst += stride; | 531 dst += stride; |
| 530 } | 532 } |
| 531 } | 533 } |
| 532 intra_pred_no_4x4(d117) | 534 intra_pred_no_4x4(d117) |
| 533 | 535 |
| 534 void vp9_d135_predictor_4x4(uint8_t *dst, ptrdiff_t stride, | 536 void vp9_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, |
| 535 const uint8_t *above, const uint8_t *left) { | 537 const uint8_t *above, const uint8_t *left) { |
| 536 const int I = left[0]; | 538 const int I = left[0]; |
| 537 const int J = left[1]; | 539 const int J = left[1]; |
| 538 const int K = left[2]; | 540 const int K = left[2]; |
| 539 const int L = left[3]; | 541 const int L = left[3]; |
| 540 const int X = above[-1]; | 542 const int X = above[-1]; |
| 541 const int A = above[0]; | 543 const int A = above[0]; |
| 542 const int B = above[1]; | 544 const int B = above[1]; |
| 543 const int C = above[2]; | 545 const int C = above[2]; |
| 544 const int D = above[3]; | 546 const int D = above[3]; |
| 545 (void)stride; | 547 (void)stride; |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 return; | 1081 return; |
| 1080 } | 1082 } |
| 1081 #endif | 1083 #endif |
| 1082 build_intra_predictors(xd, ref, ref_stride, dst, dst_stride, mode, tx_size, | 1084 build_intra_predictors(xd, ref, ref_stride, dst, dst_stride, mode, tx_size, |
| 1083 have_top, have_left, have_right, x, y, plane); | 1085 have_top, have_left, have_right, x, y, plane); |
| 1084 } | 1086 } |
| 1085 | 1087 |
| 1086 void vp9_init_intra_predictors(void) { | 1088 void vp9_init_intra_predictors(void) { |
| 1087 once(vp9_init_intra_predictors_internal); | 1089 once(vp9_init_intra_predictors_internal); |
| 1088 } | 1090 } |
| OLD | NEW |