2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
15 #include "vp8/common/onyx.h"
16 #include "vp8/common/blockd.h"
17 #include "vp8/common/entropymv.h"
18 #include "vp8/common/entropy.h"
19 #include "vpx_ports/mem.h"
30 // 16 Y blocks, 4 U blocks, 4 V blocks each with 16 entries
34 // 16 Y blocks, 4 U blocks, 4 V blocks each with 16 entries
37 unsigned char *quant_shift
;
39 short *zrun_zbin_boost
;
42 // Zbin Over Quant value
45 unsigned char **base_src
;
59 B_PREDICTION_MODE mode
;
66 DECLARE_ALIGNED(16, short, src_diff
[400]); // 16x16 Y 8x8 U 8x8 V 4x4 2nd Y
67 DECLARE_ALIGNED(16, short, coeff
[400]); // 16x16 Y 8x8 U 8x8 V 4x4 2nd Y
68 DECLARE_ALIGNED(16, unsigned char, thismb
[256]);
70 unsigned char *thismb_ptr
;
71 // 16 Y blocks, 4 U blocks, 4 V blocks, 1 DC 2nd order block each with 16 entries
74 YV12_BUFFER_CONFIG src
;
77 PARTITION_INFO
*partition_info
; /* work pointer */
78 PARTITION_INFO
*pi
; /* Corresponds to upper left visible macroblock */
79 PARTITION_INFO
*pip
; /* Base of allocated array */
83 int searches_per_step
;
90 unsigned int * mb_activity_ptr
;
91 int * mb_norm_activity_ptr
;
92 signed int act_zbin_adj
;
94 int mvcosts
[2][MVvals
+1];
96 int mvsadcosts
[2][MVfpvals
+1];
98 int mbmode_cost
[2][MB_MODE_COUNT
];
99 int intra_uv_mode_cost
[2][MB_MODE_COUNT
];
100 unsigned int bmode_costs
[10][10][10];
101 unsigned int inter_bmode_costs
[B_MODE_COUNT
];
103 // These define limits to motion vector components to prevent them from extending outside the UMV borders
109 int vector_range
; // Used to monitor limiting range of recent vectors to guide search.
114 //char * gf_active_ptr;
115 signed char *gf_active_ptr
;
117 unsigned char *active_ptr
;
120 unsigned int token_costs
[BLOCK_TYPES
] [COEF_BANDS
] [PREV_COEF_CONTEXTS
] [MAX_ENTROPY_TOKENS
];
124 void (*vp8_short_fdct4x4
)(short *input
, short *output
, int pitch
);
125 void (*vp8_short_fdct8x4
)(short *input
, short *output
, int pitch
);
126 void (*short_walsh4x4
)(short *input
, short *output
, int pitch
);
127 void (*quantize_b
)(BLOCK
*b
, BLOCKD
*d
);
128 void (*quantize_b_pair
)(BLOCK
*b1
, BLOCK
*b2
, BLOCKD
*d0
, BLOCKD
*d1
);