| 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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 if (right_available && bs == 4) { | 708 if (right_available && bs == 4) { |
| 709 vpx_memcpy(above_row, above_ref, r * sizeof(uint16_t)); | 709 vpx_memcpy(above_row, above_ref, r * sizeof(uint16_t)); |
| 710 vpx_memset16(above_row + r, above_row[r - 1], | 710 vpx_memset16(above_row + r, above_row[r - 1], |
| 711 x0 + 2 * bs - frame_width); | 711 x0 + 2 * bs - frame_width); |
| 712 } else { | 712 } else { |
| 713 vpx_memcpy(above_row, above_ref, bs * sizeof(uint16_t)); | 713 vpx_memcpy(above_row, above_ref, bs * sizeof(uint16_t)); |
| 714 vpx_memset16(above_row + bs, above_row[bs - 1], bs); | 714 vpx_memset16(above_row + bs, above_row[bs - 1], bs); |
| 715 } | 715 } |
| 716 } else if (x0 <= frame_width) { | 716 } else if (x0 <= frame_width) { |
| 717 const int r = frame_width - x0; | 717 const int r = frame_width - x0; |
| 718 if (right_available && bs == 4) { | 718 vpx_memcpy(above_row, above_ref, r * sizeof(uint16_t)); |
| 719 vpx_memcpy(above_row, above_ref, r * sizeof(uint16_t)); | 719 vpx_memset16(above_row + r, above_row[r - 1], |
| 720 vpx_memset16(above_row + r, above_row[r - 1], | |
| 721 x0 + 2 * bs - frame_width); | 720 x0 + 2 * bs - frame_width); |
| 722 } else { | |
| 723 vpx_memcpy(above_row, above_ref, r * sizeof(uint16_t)); | |
| 724 vpx_memset16(above_row + r, above_row[r - 1], | |
| 725 x0 + 2 * bs - frame_width); | |
| 726 } | |
| 727 } | 721 } |
| 728 // TODO(Peter) this value should probably change for high bitdepth | 722 // TODO(Peter) this value should probably change for high bitdepth |
| 729 above_row[-1] = left_available ? above_ref[-1] : (base+1); | 723 above_row[-1] = left_available ? above_ref[-1] : (base+1); |
| 730 } else { | 724 } else { |
| 731 /* faster path if the block does not need extension */ | 725 /* faster path if the block does not need extension */ |
| 732 if (bs == 4 && right_available && left_available) { | 726 if (bs == 4 && right_available && left_available) { |
| 733 const_above_row = above_ref; | 727 const_above_row = above_ref; |
| 734 } else { | 728 } else { |
| 735 vpx_memcpy(above_row, above_ref, bs * sizeof(uint16_t)); | 729 vpx_memcpy(above_row, above_ref, bs * sizeof(uint16_t)); |
| 736 if (bs == 4 && right_available) | 730 if (bs == 4 && right_available) |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 if (right_available && bs == 4) { | 830 if (right_available && bs == 4) { |
| 837 vpx_memcpy(above_row, above_ref, r); | 831 vpx_memcpy(above_row, above_ref, r); |
| 838 vpx_memset(above_row + r, above_row[r - 1], | 832 vpx_memset(above_row + r, above_row[r - 1], |
| 839 x0 + 2 * bs - frame_width); | 833 x0 + 2 * bs - frame_width); |
| 840 } else { | 834 } else { |
| 841 vpx_memcpy(above_row, above_ref, bs); | 835 vpx_memcpy(above_row, above_ref, bs); |
| 842 vpx_memset(above_row + bs, above_row[bs - 1], bs); | 836 vpx_memset(above_row + bs, above_row[bs - 1], bs); |
| 843 } | 837 } |
| 844 } else if (x0 <= frame_width) { | 838 } else if (x0 <= frame_width) { |
| 845 const int r = frame_width - x0; | 839 const int r = frame_width - x0; |
| 846 if (right_available && bs == 4) { | 840 vpx_memcpy(above_row, above_ref, r); |
| 847 vpx_memcpy(above_row, above_ref, r); | 841 vpx_memset(above_row + r, above_row[r - 1], |
| 848 vpx_memset(above_row + r, above_row[r - 1], | |
| 849 x0 + 2 * bs - frame_width); | 842 x0 + 2 * bs - frame_width); |
| 850 } else { | |
| 851 vpx_memcpy(above_row, above_ref, r); | |
| 852 vpx_memset(above_row + r, above_row[r - 1], | |
| 853 x0 + 2 * bs - frame_width); | |
| 854 } | |
| 855 } | 843 } |
| 856 above_row[-1] = left_available ? above_ref[-1] : 129; | 844 above_row[-1] = left_available ? above_ref[-1] : 129; |
| 857 } else { | 845 } else { |
| 858 /* faster path if the block does not need extension */ | 846 /* faster path if the block does not need extension */ |
| 859 if (bs == 4 && right_available && left_available) { | 847 if (bs == 4 && right_available && left_available) { |
| 860 const_above_row = above_ref; | 848 const_above_row = above_ref; |
| 861 } else { | 849 } else { |
| 862 vpx_memcpy(above_row, above_ref, bs); | 850 vpx_memcpy(above_row, above_ref, bs); |
| 863 if (bs == 4 && right_available) | 851 if (bs == 4 && right_available) |
| 864 vpx_memcpy(above_row + bs, above_ref + bs, bs); | 852 vpx_memcpy(above_row + bs, above_ref + bs, bs); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { | 887 if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { |
| 900 build_intra_predictors_high(xd, ref, ref_stride, dst, dst_stride, mode, | 888 build_intra_predictors_high(xd, ref, ref_stride, dst, dst_stride, mode, |
| 901 tx_size, have_top, have_left, have_right, | 889 tx_size, have_top, have_left, have_right, |
| 902 x, y, plane, xd->bd); | 890 x, y, plane, xd->bd); |
| 903 return; | 891 return; |
| 904 } | 892 } |
| 905 #endif | 893 #endif |
| 906 build_intra_predictors(xd, ref, ref_stride, dst, dst_stride, mode, tx_size, | 894 build_intra_predictors(xd, ref, ref_stride, dst, dst_stride, mode, tx_size, |
| 907 have_top, have_left, have_right, x, y, plane); | 895 have_top, have_left, have_right, x, y, plane); |
| 908 } | 896 } |
| OLD | NEW |