Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* |
michael@0 | 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
michael@0 | 3 | * |
michael@0 | 4 | * Use of this source code is governed by a BSD-style license |
michael@0 | 5 | * that can be found in the LICENSE file in the root of the source |
michael@0 | 6 | * tree. An additional intellectual property rights grant can be found |
michael@0 | 7 | * in the file PATENTS. All contributing project authors may |
michael@0 | 8 | * be found in the AUTHORS file in the root of the source tree. |
michael@0 | 9 | */ |
michael@0 | 10 | |
michael@0 | 11 | #ifndef VP9_COMMON_VP9_MV_H_ |
michael@0 | 12 | #define VP9_COMMON_VP9_MV_H_ |
michael@0 | 13 | |
michael@0 | 14 | #include "vpx/vpx_integer.h" |
michael@0 | 15 | |
michael@0 | 16 | #include "vp9/common/vp9_common.h" |
michael@0 | 17 | |
michael@0 | 18 | typedef struct { |
michael@0 | 19 | int16_t row; |
michael@0 | 20 | int16_t col; |
michael@0 | 21 | } MV; |
michael@0 | 22 | |
michael@0 | 23 | typedef union int_mv { |
michael@0 | 24 | uint32_t as_int; |
michael@0 | 25 | MV as_mv; |
michael@0 | 26 | } int_mv; /* facilitates faster equality tests and copies */ |
michael@0 | 27 | |
michael@0 | 28 | typedef struct { |
michael@0 | 29 | int32_t row; |
michael@0 | 30 | int32_t col; |
michael@0 | 31 | } MV32; |
michael@0 | 32 | |
michael@0 | 33 | static void clamp_mv(MV *mv, int min_col, int max_col, |
michael@0 | 34 | int min_row, int max_row) { |
michael@0 | 35 | mv->col = clamp(mv->col, min_col, max_col); |
michael@0 | 36 | mv->row = clamp(mv->row, min_row, max_row); |
michael@0 | 37 | } |
michael@0 | 38 | |
michael@0 | 39 | #endif // VP9_COMMON_VP9_MV_H_ |