| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 29 matching lines...) Expand all Loading... |
| 40 scaled_y(mv->row, sf) + y_off_q4, | 40 scaled_y(mv->row, sf) + y_off_q4, |
| 41 scaled_x(mv->col, sf) + x_off_q4 | 41 scaled_x(mv->col, sf) + x_off_q4 |
| 42 }; | 42 }; |
| 43 return res; | 43 return res; |
| 44 } | 44 } |
| 45 | 45 |
| 46 #if CONFIG_VP9_HIGHBITDEPTH | 46 #if CONFIG_VP9_HIGHBITDEPTH |
| 47 void vp9_setup_scale_factors_for_frame(struct scale_factors *sf, | 47 void vp9_setup_scale_factors_for_frame(struct scale_factors *sf, |
| 48 int other_w, int other_h, | 48 int other_w, int other_h, |
| 49 int this_w, int this_h, | 49 int this_w, int this_h, |
| 50 int use_high) { | 50 int use_highbd) { |
| 51 #else | 51 #else |
| 52 void vp9_setup_scale_factors_for_frame(struct scale_factors *sf, | 52 void vp9_setup_scale_factors_for_frame(struct scale_factors *sf, |
| 53 int other_w, int other_h, | 53 int other_w, int other_h, |
| 54 int this_w, int this_h) { | 54 int this_w, int this_h) { |
| 55 #endif | 55 #endif |
| 56 if (!valid_ref_frame_size(other_w, other_h, this_w, this_h)) { | 56 if (!valid_ref_frame_size(other_w, other_h, this_w, this_h)) { |
| 57 sf->x_scale_fp = REF_INVALID_SCALE; | 57 sf->x_scale_fp = REF_INVALID_SCALE; |
| 58 sf->y_scale_fp = REF_INVALID_SCALE; | 58 sf->y_scale_fp = REF_INVALID_SCALE; |
| 59 return; | 59 return; |
| 60 } | 60 } |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 sf->predict[0][1][0] = vp9_convolve8; | 112 sf->predict[0][1][0] = vp9_convolve8; |
| 113 sf->predict[0][1][1] = vp9_convolve8_avg; | 113 sf->predict[0][1][1] = vp9_convolve8_avg; |
| 114 sf->predict[1][0][0] = vp9_convolve8; | 114 sf->predict[1][0][0] = vp9_convolve8; |
| 115 sf->predict[1][0][1] = vp9_convolve8_avg; | 115 sf->predict[1][0][1] = vp9_convolve8_avg; |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 // 2D subpel motion always gets filtered in both directions | 118 // 2D subpel motion always gets filtered in both directions |
| 119 sf->predict[1][1][0] = vp9_convolve8; | 119 sf->predict[1][1][0] = vp9_convolve8; |
| 120 sf->predict[1][1][1] = vp9_convolve8_avg; | 120 sf->predict[1][1][1] = vp9_convolve8_avg; |
| 121 #if CONFIG_VP9_HIGHBITDEPTH | 121 #if CONFIG_VP9_HIGHBITDEPTH |
| 122 if (use_high) { | 122 if (use_highbd) { |
| 123 if (sf->x_step_q4 == 16) { | 123 if (sf->x_step_q4 == 16) { |
| 124 if (sf->y_step_q4 == 16) { | 124 if (sf->y_step_q4 == 16) { |
| 125 // No scaling in either direction. | 125 // No scaling in either direction. |
| 126 sf->high_predict[0][0][0] = vp9_high_convolve_copy; | 126 sf->highbd_predict[0][0][0] = vp9_highbd_convolve_copy; |
| 127 sf->high_predict[0][0][1] = vp9_high_convolve_avg; | 127 sf->highbd_predict[0][0][1] = vp9_highbd_convolve_avg; |
| 128 sf->high_predict[0][1][0] = vp9_high_convolve8_vert; | 128 sf->highbd_predict[0][1][0] = vp9_highbd_convolve8_vert; |
| 129 sf->high_predict[0][1][1] = vp9_high_convolve8_avg_vert; | 129 sf->highbd_predict[0][1][1] = vp9_highbd_convolve8_avg_vert; |
| 130 sf->high_predict[1][0][0] = vp9_high_convolve8_horiz; | 130 sf->highbd_predict[1][0][0] = vp9_highbd_convolve8_horiz; |
| 131 sf->high_predict[1][0][1] = vp9_high_convolve8_avg_horiz; | 131 sf->highbd_predict[1][0][1] = vp9_highbd_convolve8_avg_horiz; |
| 132 } else { | 132 } else { |
| 133 // No scaling in x direction. Must always scale in the y direction. | 133 // No scaling in x direction. Must always scale in the y direction. |
| 134 sf->high_predict[0][0][0] = vp9_high_convolve8_vert; | 134 sf->highbd_predict[0][0][0] = vp9_highbd_convolve8_vert; |
| 135 sf->high_predict[0][0][1] = vp9_high_convolve8_avg_vert; | 135 sf->highbd_predict[0][0][1] = vp9_highbd_convolve8_avg_vert; |
| 136 sf->high_predict[0][1][0] = vp9_high_convolve8_vert; | 136 sf->highbd_predict[0][1][0] = vp9_highbd_convolve8_vert; |
| 137 sf->high_predict[0][1][1] = vp9_high_convolve8_avg_vert; | 137 sf->highbd_predict[0][1][1] = vp9_highbd_convolve8_avg_vert; |
| 138 sf->high_predict[1][0][0] = vp9_high_convolve8; | 138 sf->highbd_predict[1][0][0] = vp9_highbd_convolve8; |
| 139 sf->high_predict[1][0][1] = vp9_high_convolve8_avg; | 139 sf->highbd_predict[1][0][1] = vp9_highbd_convolve8_avg; |
| 140 } | 140 } |
| 141 } else { | 141 } else { |
| 142 if (sf->y_step_q4 == 16) { | 142 if (sf->y_step_q4 == 16) { |
| 143 // No scaling in the y direction. Must always scale in the x direction. | 143 // No scaling in the y direction. Must always scale in the x direction. |
| 144 sf->high_predict[0][0][0] = vp9_high_convolve8_horiz; | 144 sf->highbd_predict[0][0][0] = vp9_highbd_convolve8_horiz; |
| 145 sf->high_predict[0][0][1] = vp9_high_convolve8_avg_horiz; | 145 sf->highbd_predict[0][0][1] = vp9_highbd_convolve8_avg_horiz; |
| 146 sf->high_predict[0][1][0] = vp9_high_convolve8; | 146 sf->highbd_predict[0][1][0] = vp9_highbd_convolve8; |
| 147 sf->high_predict[0][1][1] = vp9_high_convolve8_avg; | 147 sf->highbd_predict[0][1][1] = vp9_highbd_convolve8_avg; |
| 148 sf->high_predict[1][0][0] = vp9_high_convolve8_horiz; | 148 sf->highbd_predict[1][0][0] = vp9_highbd_convolve8_horiz; |
| 149 sf->high_predict[1][0][1] = vp9_high_convolve8_avg_horiz; | 149 sf->highbd_predict[1][0][1] = vp9_highbd_convolve8_avg_horiz; |
| 150 } else { | 150 } else { |
| 151 // Must always scale in both directions. | 151 // Must always scale in both directions. |
| 152 sf->high_predict[0][0][0] = vp9_high_convolve8; | 152 sf->highbd_predict[0][0][0] = vp9_highbd_convolve8; |
| 153 sf->high_predict[0][0][1] = vp9_high_convolve8_avg; | 153 sf->highbd_predict[0][0][1] = vp9_highbd_convolve8_avg; |
| 154 sf->high_predict[0][1][0] = vp9_high_convolve8; | 154 sf->highbd_predict[0][1][0] = vp9_highbd_convolve8; |
| 155 sf->high_predict[0][1][1] = vp9_high_convolve8_avg; | 155 sf->highbd_predict[0][1][1] = vp9_highbd_convolve8_avg; |
| 156 sf->high_predict[1][0][0] = vp9_high_convolve8; | 156 sf->highbd_predict[1][0][0] = vp9_highbd_convolve8; |
| 157 sf->high_predict[1][0][1] = vp9_high_convolve8_avg; | 157 sf->highbd_predict[1][0][1] = vp9_highbd_convolve8_avg; |
| 158 } | 158 } |
| 159 } | 159 } |
| 160 // 2D subpel motion always gets filtered in both directions. | 160 // 2D subpel motion always gets filtered in both directions. |
| 161 sf->high_predict[1][1][0] = vp9_high_convolve8; | 161 sf->highbd_predict[1][1][0] = vp9_highbd_convolve8; |
| 162 sf->high_predict[1][1][1] = vp9_high_convolve8_avg; | 162 sf->highbd_predict[1][1][1] = vp9_highbd_convolve8_avg; |
| 163 } | 163 } |
| 164 #endif | 164 #endif |
| 165 } | 165 } |
| OLD | NEW |