| 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 |
| 11 #include "./vpx_config.h" | 11 #include "./vpx_config.h" |
| 12 #include "./vp9_rtcd.h" | 12 #include "./vp9_rtcd.h" |
| 13 | 13 |
| 14 #include "vpx_mem/vpx_mem.h" | 14 #include "vpx_mem/vpx_mem.h" |
| 15 #include "vpx_ports/mem.h" |
| 15 #include "vpx_ports/vpx_once.h" | 16 #include "vpx_ports/vpx_once.h" |
| 16 | 17 |
| 17 #include "vp9/common/vp9_reconintra.h" | 18 #include "vp9/common/vp9_reconintra.h" |
| 18 #include "vp9/common/vp9_onyxc_int.h" | 19 #include "vp9/common/vp9_onyxc_int.h" |
| 19 | 20 |
| 20 const TX_TYPE intra_mode_to_tx_type_lookup[INTRA_MODES] = { | 21 const TX_TYPE intra_mode_to_tx_type_lookup[INTRA_MODES] = { |
| 21 DCT_DCT, // DC | 22 DCT_DCT, // DC |
| 22 ADST_DCT, // V | 23 ADST_DCT, // V |
| 23 DCT_ADST, // H | 24 DCT_ADST, // H |
| 24 DCT_DCT, // D45 | 25 DCT_DCT, // D45 |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 TX_SIZE tx_size, | 652 TX_SIZE tx_size, |
| 652 int up_available, | 653 int up_available, |
| 653 int left_available, | 654 int left_available, |
| 654 int right_available, | 655 int right_available, |
| 655 int x, int y, | 656 int x, int y, |
| 656 int plane, int bd) { | 657 int plane, int bd) { |
| 657 int i; | 658 int i; |
| 658 uint16_t *dst = CONVERT_TO_SHORTPTR(dst8); | 659 uint16_t *dst = CONVERT_TO_SHORTPTR(dst8); |
| 659 uint16_t *ref = CONVERT_TO_SHORTPTR(ref8); | 660 uint16_t *ref = CONVERT_TO_SHORTPTR(ref8); |
| 660 DECLARE_ALIGNED(16, uint16_t, left_col[32]); | 661 DECLARE_ALIGNED(16, uint16_t, left_col[32]); |
| 661 DECLARE_ALIGNED(16, uint16_t, above_data[128 + 16]); | 662 DECLARE_ALIGNED(16, uint16_t, above_data[64 + 16]); |
| 662 uint16_t *above_row = above_data + 16; | 663 uint16_t *above_row = above_data + 16; |
| 663 const uint16_t *const_above_row = above_row; | 664 const uint16_t *const_above_row = above_row; |
| 664 const int bs = 4 << tx_size; | 665 const int bs = 4 << tx_size; |
| 665 int frame_width, frame_height; | 666 int frame_width, frame_height; |
| 666 int x0, y0; | 667 int x0, y0; |
| 667 const struct macroblockd_plane *const pd = &xd->plane[plane]; | 668 const struct macroblockd_plane *const pd = &xd->plane[plane]; |
| 668 // int base=128; | 669 // int base=128; |
| 669 int base = 128 << (bd - 8); | 670 int base = 128 << (bd - 8); |
| 670 // 127 127 127 .. 127 127 127 127 127 127 | 671 // 127 127 127 .. 127 127 127 127 127 127 |
| 671 // 129 A B .. Y Z | 672 // 129 A B .. Y Z |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 #endif // CONFIG_VP9_HIGHBITDEPTH | 775 #endif // CONFIG_VP9_HIGHBITDEPTH |
| 775 | 776 |
| 776 static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref, | 777 static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref, |
| 777 int ref_stride, uint8_t *dst, int dst_stride, | 778 int ref_stride, uint8_t *dst, int dst_stride, |
| 778 PREDICTION_MODE mode, TX_SIZE tx_size, | 779 PREDICTION_MODE mode, TX_SIZE tx_size, |
| 779 int up_available, int left_available, | 780 int up_available, int left_available, |
| 780 int right_available, int x, int y, | 781 int right_available, int x, int y, |
| 781 int plane) { | 782 int plane) { |
| 782 int i; | 783 int i; |
| 783 DECLARE_ALIGNED(16, uint8_t, left_col[32]); | 784 DECLARE_ALIGNED(16, uint8_t, left_col[32]); |
| 784 DECLARE_ALIGNED(16, uint8_t, above_data[128 + 16]); | 785 DECLARE_ALIGNED(16, uint8_t, above_data[64 + 16]); |
| 785 uint8_t *above_row = above_data + 16; | 786 uint8_t *above_row = above_data + 16; |
| 786 const uint8_t *const_above_row = above_row; | 787 const uint8_t *const_above_row = above_row; |
| 787 const int bs = 4 << tx_size; | 788 const int bs = 4 << tx_size; |
| 788 int frame_width, frame_height; | 789 int frame_width, frame_height; |
| 789 int x0, y0; | 790 int x0, y0; |
| 790 const struct macroblockd_plane *const pd = &xd->plane[plane]; | 791 const struct macroblockd_plane *const pd = &xd->plane[plane]; |
| 791 | 792 |
| 792 // 127 127 127 .. 127 127 127 127 127 127 | 793 // 127 127 127 .. 127 127 127 127 127 127 |
| 793 // 129 A B .. Y Z | 794 // 129 A B .. Y Z |
| 794 // 129 C D .. W X | 795 // 129 C D .. W X |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 build_intra_predictors_high(xd, ref, ref_stride, dst, dst_stride, mode, | 937 build_intra_predictors_high(xd, ref, ref_stride, dst, dst_stride, mode, |
| 937 tx_size, have_top, have_left, have_right, | 938 tx_size, have_top, have_left, have_right, |
| 938 x, y, plane, xd->bd); | 939 x, y, plane, xd->bd); |
| 939 return; | 940 return; |
| 940 } | 941 } |
| 941 #endif | 942 #endif |
| 942 build_intra_predictors(xd, ref, ref_stride, dst, dst_stride, mode, tx_size, | 943 build_intra_predictors(xd, ref, ref_stride, dst, dst_stride, mode, tx_size, |
| 943 have_top, have_left, have_right, x, y, plane); | 944 have_top, have_left, have_right, x, y, plane); |
| 944 } | 945 } |
| 945 | 946 |
| 946 void vp9_init_intra_predictors() { | 947 void vp9_init_intra_predictors(void) { |
| 947 once(vp9_init_intra_predictors_internal); | 948 once(vp9_init_intra_predictors_internal); |
| 948 } | 949 } |
| OLD | NEW |