| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 { | 185 { |
| 186 for (i=1; i< cnt; i++) | 186 for (i=1; i< cnt; i++) |
| 187 { | 187 { |
| 188 if (mvx[i] > max_mvx) max_mvx = mvx[i]; | 188 if (mvx[i] > max_mvx) max_mvx = mvx[i]; |
| 189 else if (mvx[i] < min_mvx) min_mvx = mvx[i]; | 189 else if (mvx[i] < min_mvx) min_mvx = mvx[i]; |
| 190 if (mvy[i] > max_mvy) max_mvy = mvy[i]; | 190 if (mvy[i] > max_mvy) max_mvy = mvy[i]; |
| 191 else if (mvy[i] < min_mvy) min_mvy = mvy[i]; | 191 else if (mvy[i] < min_mvy) min_mvy = mvy[i]; |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 | 194 |
| 195 mmvx = MAX(abs(min_mvx - here->mbmi.mv.as_mv.row), | 195 mmvx = VPXMAX( |
| 196 abs(max_mvx - here->mbmi.mv.as_mv.row)); | 196 abs(min_mvx - here->mbmi.mv.as_mv.row), |
| 197 mmvy = MAX(abs(min_mvy - here->mbmi.mv.as_mv.col), | 197 abs(max_mvx - here->mbmi.mv.as_mv.row)); |
| 198 abs(max_mvy - here->mbmi.mv.as_mv.col)); | 198 mmvy = VPXMAX( |
| 199 dissim = MAX(mmvx, mmvy); | 199 abs(min_mvy - here->mbmi.mv.as_mv.col), |
| 200 abs(max_mvy - here->mbmi.mv.as_mv.col)); |
| 201 dissim = VPXMAX(mmvx, mmvy); |
| 200 } | 202 } |
| 201 } | 203 } |
| 202 | 204 |
| 203 /* Store mode info for next resolution encoding */ | 205 /* Store mode info for next resolution encoding */ |
| 204 store_mode_info->mode = tmp->mbmi.mode; | 206 store_mode_info->mode = tmp->mbmi.mode; |
| 205 store_mode_info->ref_frame = tmp->mbmi.ref_frame; | 207 store_mode_info->ref_frame = tmp->mbmi.ref_frame; |
| 206 store_mode_info->mv.as_int = tmp->mbmi.mv.as_int; | 208 store_mode_info->mv.as_int = tmp->mbmi.mv.as_int; |
| 207 store_mode_info->dissim = dissim; | 209 store_mode_info->dissim = dissim; |
| 208 tmp++; | 210 tmp++; |
| 209 store_mode_info++; | 211 store_mode_info++; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 228 * If parent frame is alt_ref, child has one too. | 230 * If parent frame is alt_ref, child has one too. |
| 229 */ | 231 */ |
| 230 LOWER_RES_FRAME_INFO* store_info | 232 LOWER_RES_FRAME_INFO* store_info |
| 231 = (LOWER_RES_FRAME_INFO*)cpi->oxcf.mr_low_res_mode_info; | 233 = (LOWER_RES_FRAME_INFO*)cpi->oxcf.mr_low_res_mode_info; |
| 232 | 234 |
| 233 /* Set frame_type to be INTER_FRAME since we won't drop key frame. */ | 235 /* Set frame_type to be INTER_FRAME since we won't drop key frame. */ |
| 234 store_info->frame_type = INTER_FRAME; | 236 store_info->frame_type = INTER_FRAME; |
| 235 store_info->is_frame_dropped = 1; | 237 store_info->is_frame_dropped = 1; |
| 236 } | 238 } |
| 237 } | 239 } |
| OLD | NEW |