Commit 6c280c22 authored by Ronald S. Bultje's avatar Ronald S. Bultje

Adjust style to match Google Coding Style a little more closely.

Most of these were picked up by jenkins in the commit that changed
the vp8 namespace to vp9 in common/.

Change-Id: I5cbd56ffc753b92ef805133cda6acc1713a13878
parent 6a4b1e59
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "vpx_ports/config.h" #include "vpx_ports/config.h"
#include "vpx_ports/arm.h" #include "vpx_ports/arm.h"
#include "vp8/common/g_common.h"
#include "vp8/common/pragmas.h" #include "vp8/common/pragmas.h"
#include "vp8/common/subpixel.h" #include "vp8/common/subpixel.h"
#include "vp8/common/loopfilter.h" #include "vp8/common/loopfilter.h"
......
...@@ -8,13 +8,11 @@ ...@@ -8,13 +8,11 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include <stdio.h> #include <stdio.h>
#include "blockd.h" #include "blockd.h"
void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols,
void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int frame) { int frame) {
int mb_row; int mb_row;
int mb_col; int mb_col;
int mb_index = 0; int mb_index = 0;
...@@ -120,7 +118,6 @@ void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int f ...@@ -120,7 +118,6 @@ void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int f
fprintf(mvs, "\n"); fprintf(mvs, "\n");
/* print out the block modes */ /* print out the block modes */
mb_index = 0; mb_index = 0;
fprintf(mvs, "MVs for Frame %d\n", frame); fprintf(mvs, "MVs for Frame %d\n", frame);
...@@ -145,6 +142,5 @@ void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int f ...@@ -145,6 +142,5 @@ void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int f
} }
fprintf(mvs, "\n"); fprintf(mvs, "\n");
fclose(mvs); fclose(mvs);
} }
...@@ -111,28 +111,23 @@ const vp9_prob vp9_sub_mv_ref_prob2 [SUBMVREF_COUNT][VP9_SUBMVREFS - 1] = { ...@@ -111,28 +111,23 @@ const vp9_prob vp9_sub_mv_ref_prob2 [SUBMVREF_COUNT][VP9_SUBMVREFS - 1] = {
{ 208, 1, 1 } { 208, 1, 1 }
}; };
vp9_mbsplit vp9_mbsplits [VP9_NUMMBSPLITS] = { vp9_mbsplit vp9_mbsplits [VP9_NUMMBSPLITS] = {
{ {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
}, }, {
{
0, 0, 1, 1, 0, 0, 1, 1,
0, 0, 1, 1, 0, 0, 1, 1,
0, 0, 1, 1, 0, 0, 1, 1,
0, 0, 1, 1, 0, 0, 1, 1,
}, }, {
{
0, 0, 1, 1, 0, 0, 1, 1,
0, 0, 1, 1, 0, 0, 1, 1,
2, 2, 3, 3, 2, 2, 3, 3,
2, 2, 3, 3, 2, 2, 3, 3,
}, }, {
{
0, 1, 2, 3, 0, 1, 2, 3,
4, 5, 6, 7, 4, 5, 6, 7,
8, 9, 10, 11, 8, 9, 10, 11,
...@@ -144,7 +139,6 @@ const int vp9_mbsplit_count [VP9_NUMMBSPLITS] = { 2, 2, 4, 16}; ...@@ -144,7 +139,6 @@ const int vp9_mbsplit_count [VP9_NUMMBSPLITS] = { 2, 2, 4, 16};
const vp9_prob vp9_mbsplit_probs [VP9_NUMMBSPLITS - 1] = { 110, 111, 150}; const vp9_prob vp9_mbsplit_probs [VP9_NUMMBSPLITS - 1] = { 110, 111, 150};
/* Array indices are identical to previously-existing INTRAMODECONTEXTNODES. */ /* Array indices are identical to previously-existing INTRAMODECONTEXTNODES. */
const vp9_tree_index vp9_bmode_tree[VP9_BINTRAMODES * 2 - 2] = /* INTRAMODECONTEXTNODE value */ const vp9_tree_index vp9_bmode_tree[VP9_BINTRAMODES * 2 - 2] = /* INTRAMODECONTEXTNODE value */
...@@ -241,7 +235,6 @@ const vp9_tree_index vp9_sub_mv_ref_tree[6] = { ...@@ -241,7 +235,6 @@ const vp9_tree_index vp9_sub_mv_ref_tree[6] = {
-ZERO4X4, -NEW4X4 -ZERO4X4, -NEW4X4
}; };
struct vp9_token_struct vp9_bmode_encodings [VP9_BINTRAMODES]; struct vp9_token_struct vp9_bmode_encodings [VP9_BINTRAMODES];
struct vp9_token_struct vp9_ymode_encodings [VP9_YMODES]; struct vp9_token_struct vp9_ymode_encodings [VP9_YMODES];
#if CONFIG_SUPERBLOCKS #if CONFIG_SUPERBLOCKS
...@@ -258,48 +251,45 @@ struct vp9_token_struct vp9_sb_mv_ref_encoding_array [VP9_MVREFS]; ...@@ -258,48 +251,45 @@ struct vp9_token_struct vp9_sb_mv_ref_encoding_array [VP9_MVREFS];
#endif #endif
struct vp9_token_struct vp9_sub_mv_ref_encoding_array [VP9_SUBMVREFS]; struct vp9_token_struct vp9_sub_mv_ref_encoding_array [VP9_SUBMVREFS];
void vp9_init_mbmode_probs(VP9_COMMON *x) { void vp9_init_mbmode_probs(VP9_COMMON *x) {
unsigned int bct [VP9_YMODES] [2]; /* num Ymodes > num UV modes */ unsigned int bct [VP9_YMODES] [2]; /* num Ymodes > num UV modes */
vp9_tree_probs_from_distribution(VP9_YMODES, vp9_ymode_encodings, vp9_tree_probs_from_distribution(VP9_YMODES, vp9_ymode_encodings,
vp9_ymode_tree, x->fc.ymode_prob, bct, y_mode_cts, 256, 1); vp9_ymode_tree, x->fc.ymode_prob,
bct, y_mode_cts, 256, 1);
{ {
int i; int i;
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
vp9_tree_probs_from_distribution( vp9_tree_probs_from_distribution(VP9_YMODES, vp9_kf_ymode_encodings,
VP9_YMODES, vp9_kf_ymode_encodings, vp9_kf_ymode_tree, vp9_kf_ymode_tree, x->kf_ymode_prob[i],
x->kf_ymode_prob[i], bct, kf_y_mode_cts[i], bct, kf_y_mode_cts[i], 256, 1);
256, 1);
#if CONFIG_SUPERBLOCKS #if CONFIG_SUPERBLOCKS
vp9_tree_probs_from_distribution( vp9_tree_probs_from_distribution(VP9_I32X32_MODES,
VP9_I32X32_MODES, vp9_sb_kf_ymode_encodings, vp9_sb_ymode_tree, vp9_sb_kf_ymode_encodings,
x->sb_kf_ymode_prob[i], bct, kf_y_mode_cts[i], vp9_sb_ymode_tree,
256, 1); x->sb_kf_ymode_prob[i], bct,
kf_y_mode_cts[i], 256, 1);
#endif #endif
} }
} }
{ {
int i; int i;
for (i = 0; i < VP9_YMODES; i++) { for (i = 0; i < VP9_YMODES; i++) {
vp9_tree_probs_from_distribution( vp9_tree_probs_from_distribution(VP9_UV_MODES, vp9_uv_mode_encodings,
VP9_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree, vp9_uv_mode_tree, x->kf_uv_mode_prob[i],
x->kf_uv_mode_prob[i], bct, kf_uv_mode_cts[i], bct, kf_uv_mode_cts[i], 256, 1);
256, 1); vp9_tree_probs_from_distribution(VP9_UV_MODES, vp9_uv_mode_encodings,
vp9_tree_probs_from_distribution( vp9_uv_mode_tree, x->fc.uv_mode_prob[i],
VP9_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree, bct, uv_mode_cts[i], 256, 1);
x->fc.uv_mode_prob[i], bct, uv_mode_cts[i],
256, 1);
} }
} }
vp9_tree_probs_from_distribution( vp9_tree_probs_from_distribution(VP9_I8X8_MODES, vp9_i8x8_mode_encodings,
VP9_I8X8_MODES, vp9_i8x8_mode_encodings, vp9_i8x8_mode_tree, vp9_i8x8_mode_tree, x->fc.i8x8_mode_prob,
x->fc.i8x8_mode_prob, bct, i8x8_mode_cts, bct, i8x8_mode_cts, 256, 1);
256, 1);
vpx_memcpy(x->fc.sub_mv_ref_prob, vp9_sub_mv_ref_prob2, sizeof(vp9_sub_mv_ref_prob2)); vpx_memcpy(x->fc.sub_mv_ref_prob, vp9_sub_mv_ref_prob2,
sizeof(vp9_sub_mv_ref_prob2));
vpx_memcpy(x->fc.mbsplit_prob, vp9_mbsplit_probs, sizeof(vp9_mbsplit_probs)); vpx_memcpy(x->fc.mbsplit_prob, vp9_mbsplit_probs, sizeof(vp9_mbsplit_probs));
vpx_memcpy(x->fc.switchable_interp_prob, vp9_switchable_interp_prob, vpx_memcpy(x->fc.switchable_interp_prob, vp9_switchable_interp_prob,
sizeof(vp9_switchable_interp_prob)); sizeof(vp9_switchable_interp_prob));
...@@ -311,7 +301,8 @@ static void intra_bmode_probs_from_distribution( ...@@ -311,7 +301,8 @@ static void intra_bmode_probs_from_distribution(
unsigned int branch_ct [VP9_BINTRAMODES - 1] [2], unsigned int branch_ct [VP9_BINTRAMODES - 1] [2],
const unsigned int events [VP9_BINTRAMODES]) { const unsigned int events [VP9_BINTRAMODES]) {
vp9_tree_probs_from_distribution(VP9_BINTRAMODES, vp9_bmode_encodings, vp9_tree_probs_from_distribution(VP9_BINTRAMODES, vp9_bmode_encodings,
vp9_bmode_tree, p, branch_ct, events, 256, 1); vp9_bmode_tree, p, branch_ct,
events, 256, 1);
} }
void vp9_default_bmode_probs(vp9_prob p [VP9_BINTRAMODES - 1]) { void vp9_default_bmode_probs(vp9_prob p [VP9_BINTRAMODES - 1]) {
...@@ -319,20 +310,17 @@ void vp9_default_bmode_probs(vp9_prob p [VP9_BINTRAMODES - 1]) { ...@@ -319,20 +310,17 @@ void vp9_default_bmode_probs(vp9_prob p [VP9_BINTRAMODES - 1]) {
intra_bmode_probs_from_distribution(p, branch_ct, bmode_cts); intra_bmode_probs_from_distribution(p, branch_ct, bmode_cts);
} }
void vp9_kf_default_bmode_probs(vp9_prob p [VP9_BINTRAMODES] [VP9_BINTRAMODES] [VP9_BINTRAMODES - 1]) { void vp9_kf_default_bmode_probs(vp9_prob p[VP9_BINTRAMODES][VP9_BINTRAMODES]
unsigned int branch_ct [VP9_BINTRAMODES - 1] [2]; [VP9_BINTRAMODES - 1]) {
unsigned int branch_ct[VP9_BINTRAMODES - 1][2];
int i = 0; int i, j;
do {
int j = 0;
do { for (i = 0; i < VP9_BINTRAMODES; i++) {
for (j = 0; j < VP9_BINTRAMODES; j++) {
intra_bmode_probs_from_distribution( intra_bmode_probs_from_distribution(
p[i][j], branch_ct, vp9_kf_default_bmode_counts[i][j]); p[i][j], branch_ct, vp9_kf_default_bmode_counts[i][j]);
}
} while (++j < VP9_BINTRAMODES); }
} while (++i < VP9_BINTRAMODES);
} }
#if VP9_SWITCHABLE_FILTERS == 3 #if VP9_SWITCHABLE_FILTERS == 3
...@@ -548,10 +536,9 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) { ...@@ -548,10 +536,9 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
else cm->fc.ymode_prob[t] = prob; else cm->fc.ymode_prob[t] = prob;
} }
for (i = 0; i < VP9_YMODES; ++i) { for (i = 0; i < VP9_YMODES; ++i) {
vp9_tree_probs_from_distribution( vp9_tree_probs_from_distribution(VP9_UV_MODES, vp9_uv_mode_encodings,
VP9_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree, vp9_uv_mode_tree, uvmode_probs, branch_ct,
uvmode_probs, branch_ct, cm->fc.uv_mode_counts[i], cm->fc.uv_mode_counts[i], 256, 1);
256, 1);
for (t = 0; t < VP9_UV_MODES - 1; ++t) { for (t = 0; t < VP9_UV_MODES - 1; ++t) {
int prob; int prob;
count = branch_ct[t][0] + branch_ct[t][1]; count = branch_ct[t][0] + branch_ct[t][1];
...@@ -564,10 +551,9 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) { ...@@ -564,10 +551,9 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
else cm->fc.uv_mode_prob[i][t] = prob; else cm->fc.uv_mode_prob[i][t] = prob;
} }
} }
vp9_tree_probs_from_distribution( vp9_tree_probs_from_distribution(VP9_BINTRAMODES, vp9_bmode_encodings,
VP9_BINTRAMODES, vp9_bmode_encodings, vp9_bmode_tree, vp9_bmode_tree, bmode_probs, branch_ct,
bmode_probs, branch_ct, cm->fc.bmode_counts, cm->fc.bmode_counts, 256, 1);
256, 1);
for (t = 0; t < VP9_BINTRAMODES - 1; ++t) { for (t = 0; t < VP9_BINTRAMODES - 1; ++t) {
int prob; int prob;
count = branch_ct[t][0] + branch_ct[t][1]; count = branch_ct[t][0] + branch_ct[t][1];
...@@ -579,10 +565,9 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) { ...@@ -579,10 +565,9 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
else if (prob > 255) cm->fc.bmode_prob[t] = 255; else if (prob > 255) cm->fc.bmode_prob[t] = 255;
else cm->fc.bmode_prob[t] = prob; else cm->fc.bmode_prob[t] = prob;
} }
vp9_tree_probs_from_distribution( vp9_tree_probs_from_distribution(VP9_I8X8_MODES, vp9_i8x8_mode_encodings,
VP9_I8X8_MODES, vp9_i8x8_mode_encodings, vp9_i8x8_mode_tree, vp9_i8x8_mode_tree, i8x8_mode_probs,
i8x8_mode_probs, branch_ct, cm->fc.i8x8_mode_counts, branch_ct, cm->fc.i8x8_mode_counts, 256, 1);
256, 1);
for (t = 0; t < VP9_I8X8_MODES - 1; ++t) { for (t = 0; t < VP9_I8X8_MODES - 1; ++t) {
int prob; int prob;
count = branch_ct[t][0] + branch_ct[t][1]; count = branch_ct[t][0] + branch_ct[t][1];
...@@ -595,10 +580,11 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) { ...@@ -595,10 +580,11 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
else cm->fc.i8x8_mode_prob[t] = prob; else cm->fc.i8x8_mode_prob[t] = prob;
} }
for (i = 0; i < SUBMVREF_COUNT; ++i) { for (i = 0; i < SUBMVREF_COUNT; ++i) {
vp9_tree_probs_from_distribution( vp9_tree_probs_from_distribution(VP9_SUBMVREFS,
VP9_SUBMVREFS, vp9_sub_mv_ref_encoding_array, vp9_sub_mv_ref_tree, vp9_sub_mv_ref_encoding_array,
sub_mv_ref_probs, branch_ct, cm->fc.sub_mv_ref_counts[i], vp9_sub_mv_ref_tree, sub_mv_ref_probs,
256, 1); branch_ct, cm->fc.sub_mv_ref_counts[i],
256, 1);
for (t = 0; t < VP9_SUBMVREFS - 1; ++t) { for (t = 0; t < VP9_SUBMVREFS - 1; ++t) {
int prob; int prob;
count = branch_ct[t][0] + branch_ct[t][1]; count = branch_ct[t][0] + branch_ct[t][1];
...@@ -611,10 +597,9 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) { ...@@ -611,10 +597,9 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
else cm->fc.sub_mv_ref_prob[i][t] = prob; else cm->fc.sub_mv_ref_prob[i][t] = prob;
} }
} }
vp9_tree_probs_from_distribution( vp9_tree_probs_from_distribution(VP9_NUMMBSPLITS, vp9_mbsplit_encodings,
VP9_NUMMBSPLITS, vp9_mbsplit_encodings, vp9_mbsplit_tree, vp9_mbsplit_tree, mbsplit_probs, branch_ct,
mbsplit_probs, branch_ct, cm->fc.mbsplit_counts, cm->fc.mbsplit_counts, 256, 1);
256, 1);
for (t = 0; t < VP9_NUMMBSPLITS - 1; ++t) { for (t = 0; t < VP9_NUMMBSPLITS - 1; ++t) {
int prob; int prob;
count = branch_ct[t][0] + branch_ct[t][1]; count = branch_ct[t][0] + branch_ct[t][1];
......
...@@ -20,20 +20,21 @@ ...@@ -20,20 +20,21 @@
typedef const int vp9_mbsplit[16]; typedef const int vp9_mbsplit[16];
extern vp9_mbsplit vp9_mbsplits [VP9_NUMMBSPLITS]; extern vp9_mbsplit vp9_mbsplits[VP9_NUMMBSPLITS];
extern const int vp9_mbsplit_count [VP9_NUMMBSPLITS]; /* # of subsets */ extern const int vp9_mbsplit_count[VP9_NUMMBSPLITS]; /* # of subsets */
extern const vp9_prob vp9_mbsplit_probs [VP9_NUMMBSPLITS - 1]; extern const vp9_prob vp9_mbsplit_probs[VP9_NUMMBSPLITS - 1];
extern int vp9_mv_cont(const int_mv *l, const int_mv *a); extern int vp9_mv_cont(const int_mv *l, const int_mv *a);
extern const vp9_prob vp9_sub_mv_ref_prob [VP9_SUBMVREFS - 1]; extern const vp9_prob vp9_sub_mv_ref_prob[VP9_SUBMVREFS - 1];
extern const vp9_prob vp9_sub_mv_ref_prob2 [SUBMVREF_COUNT][VP9_SUBMVREFS - 1];
extern const vp9_prob vp9_sub_mv_ref_prob2[SUBMVREF_COUNT][VP9_SUBMVREFS - 1];
extern const unsigned int vp9_kf_default_bmode_counts[VP9_BINTRAMODES][VP9_BINTRAMODES][VP9_BINTRAMODES]; extern const unsigned int vp9_kf_default_bmode_counts[VP9_BINTRAMODES]
[VP9_BINTRAMODES]
[VP9_BINTRAMODES];
extern const vp9_tree_index vp9_bmode_tree[]; extern const vp9_tree_index vp9_bmode_tree[];
...@@ -47,43 +48,55 @@ extern const vp9_tree_index vp9_mv_ref_tree[]; ...@@ -47,43 +48,55 @@ extern const vp9_tree_index vp9_mv_ref_tree[];
extern const vp9_tree_index vp9_sb_mv_ref_tree[]; extern const vp9_tree_index vp9_sb_mv_ref_tree[];
extern const vp9_tree_index vp9_sub_mv_ref_tree[]; extern const vp9_tree_index vp9_sub_mv_ref_tree[];
extern struct vp9_token_struct vp9_bmode_encodings [VP9_BINTRAMODES]; extern struct vp9_token_struct vp9_bmode_encodings[VP9_BINTRAMODES];
extern struct vp9_token_struct vp9_ymode_encodings [VP9_YMODES]; extern struct vp9_token_struct vp9_ymode_encodings[VP9_YMODES];
extern struct vp9_token_struct vp9_sb_kf_ymode_encodings [VP9_I32X32_MODES]; extern struct vp9_token_struct vp9_sb_kf_ymode_encodings[VP9_I32X32_MODES];
extern struct vp9_token_struct vp9_kf_ymode_encodings [VP9_YMODES]; extern struct vp9_token_struct vp9_kf_ymode_encodings[VP9_YMODES];
extern struct vp9_token_struct vp9_i8x8_mode_encodings [VP9_I8X8_MODES]; extern struct vp9_token_struct vp9_i8x8_mode_encodings[VP9_I8X8_MODES];
extern struct vp9_token_struct vp9_uv_mode_encodings [VP9_UV_MODES]; extern struct vp9_token_struct vp9_uv_mode_encodings[VP9_UV_MODES];
extern struct vp9_token_struct vp9_mbsplit_encodings [VP9_NUMMBSPLITS]; extern struct vp9_token_struct vp9_mbsplit_encodings[VP9_NUMMBSPLITS];
/* Inter mode values do not start at zero */ /* Inter mode values do not start at zero */
extern struct vp9_token_struct vp9_mv_ref_encoding_array [VP9_MVREFS]; extern struct vp9_token_struct vp9_mv_ref_encoding_array[VP9_MVREFS];
extern struct vp9_token_struct vp9_sb_mv_ref_encoding_array [VP9_MVREFS]; extern struct vp9_token_struct vp9_sb_mv_ref_encoding_array[VP9_MVREFS];
extern struct vp9_token_struct vp9_sub_mv_ref_encoding_array [VP9_SUBMVREFS]; extern struct vp9_token_struct vp9_sub_mv_ref_encoding_array[VP9_SUBMVREFS];
void vp9_entropy_mode_init(void); void vp9_entropy_mode_init(void);
struct VP9Common; struct VP9Common;
void vp9_init_mbmode_probs(struct VP9Common *x); void vp9_init_mbmode_probs(struct VP9Common *x);
extern void vp9_init_mode_contexts(struct VP9Common *pc); extern void vp9_init_mode_contexts(struct VP9Common *pc);
extern void vp9_update_mode_context(struct VP9Common *pc);;
extern void vp9_update_mode_context(struct VP9Common *pc);
extern void vp9_accum_mv_refs(struct VP9Common *pc, extern void vp9_accum_mv_refs(struct VP9Common *pc,
MB_PREDICTION_MODE m, MB_PREDICTION_MODE m,
const int ct[4]); const int ct[4]);
void vp9_default_bmode_probs(vp9_prob dest [VP9_BINTRAMODES - 1]); void vp9_default_bmode_probs(vp9_prob dest[VP9_BINTRAMODES - 1]);
void vp9_kf_default_bmode_probs(vp9_prob dest [VP9_BINTRAMODES] [VP9_BINTRAMODES] [VP9_BINTRAMODES - 1]);
void vp9_kf_default_bmode_probs(vp9_prob dest[VP9_BINTRAMODES][VP9_BINTRAMODES]
[VP9_BINTRAMODES - 1]);
void vp9_adapt_mode_probs(struct VP9Common *); void vp9_adapt_mode_probs(struct VP9Common *);
#define VP9_SWITCHABLE_FILTERS 2 /* number of switchable filters */ #define VP9_SWITCHABLE_FILTERS 2 /* number of switchable filters */
extern const INTERPOLATIONFILTERTYPE vp9_switchable_interp extern const INTERPOLATIONFILTERTYPE vp9_switchable_interp
[VP9_SWITCHABLE_FILTERS]; [VP9_SWITCHABLE_FILTERS];
extern const int vp9_switchable_interp_map[SWITCHABLE + 1]; extern const int vp9_switchable_interp_map[SWITCHABLE + 1];
extern const vp9_tree_index vp9_switchable_interp_tree extern const vp9_tree_index vp9_switchable_interp_tree
[2*(VP9_SWITCHABLE_FILTERS - 1)]; [2 * (VP9_SWITCHABLE_FILTERS - 1)];
extern struct vp9_token_struct vp9_switchable_interp_encodings extern struct vp9_token_struct vp9_switchable_interp_encodings
[VP9_SWITCHABLE_FILTERS]; [VP9_SWITCHABLE_FILTERS];
extern const vp9_prob vp9_switchable_interp_prob
[VP9_SWITCHABLE_FILTERS + 1][VP9_SWITCHABLE_FILTERS - 1]; extern const vp9_prob vp9_switchable_interp_prob[VP9_SWITCHABLE_FILTERS + 1]
[VP9_SWITCHABLE_FILTERS - 1];
#endif #endif
...@@ -8,24 +8,19 @@ ...@@ -8,24 +8,19 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "extend.h" #include "extend.h"
#include "vpx_mem/vpx_mem.h" #include "vpx_mem/vpx_mem.h"
static void copy_and_extend_plane(unsigned char *s, /* source */
static void copy_and_extend_plane int sp, /* source pitch */
( unsigned char *d, /* destination */
unsigned char *s, /* source */ int dp, /* destination pitch */
int sp, /* source pitch */ int h, /* height */
unsigned char *d, /* destination */ int w, /* width */
int dp, /* destination pitch */ int et, /* extend top border */
int h, /* height */ int el, /* extend left border */
int w, /* width */ int eb, /* extend bottom border */
int et, /* extend top border */ int er) { /* extend right border */
int el, /* extend left border */
int eb, /* extend bottom border */
int er /* extend right border */
) {
int i; int i;
unsigned char *src_ptr1, *src_ptr2; unsigned char *src_ptr1, *src_ptr2;
unsigned char *dest_ptr1, *dest_ptr2; unsigned char *dest_ptr1, *dest_ptr2;
...@@ -67,7 +62,6 @@ static void copy_and_extend_plane ...@@ -67,7 +62,6 @@ static void copy_and_extend_plane
} }
} }
void vp9_copy_and_extend_frame(YV12_BUFFER_CONFIG *src, void vp9_copy_and_extend_frame(YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst) { YV12_BUFFER_CONFIG *dst) {
int et = dst->border; int et = dst->border;
...@@ -96,7 +90,6 @@ void vp9_copy_and_extend_frame(YV12_BUFFER_CONFIG *src, ...@@ -96,7 +90,6 @@ void vp9_copy_and_extend_frame(YV12_BUFFER_CONFIG *src,
et, el, eb, er); et, el, eb, er);
} }
void vp9_copy_and_extend_frame_with_rect(YV12_BUFFER_CONFIG *src, void vp9_copy_and_extend_frame_with_rect(YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst, YV12_BUFFER_CONFIG *dst,
int srcy, int srcx, int srcy, int srcx,
...@@ -149,9 +142,9 @@ void vp9_copy_and_extend_frame_with_rect(YV12_BUFFER_CONFIG *src, ...@@ -149,9 +142,9 @@ void vp9_copy_and_extend_frame_with_rect(YV12_BUFFER_CONFIG *src,
et, el, eb, er); et, el, eb, er);
} }
/* note the extension is only for the last row, for intra prediction purpose */ /* note the extension is only for the last row, for intra prediction purpose */
void vp9_extend_mb_row(YV12_BUFFER_CONFIG *ybf, unsigned char *YPtr, unsigned char *UPtr, unsigned char *VPtr) { void vp9_extend_mb_row(YV12_BUFFER_CONFIG *ybf, unsigned char *YPtr,
unsigned char *UPtr, unsigned char *VPtr) {
int i; int i;
YPtr += ybf->y_stride * 14; YPtr += ybf->y_stride * 14;
......
...@@ -8,18 +8,20 @@ ...@@ -8,18 +8,20 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef __INC_EXTEND_H #ifndef __INC_EXTEND_H
#define __INC_EXTEND_H #define __INC_EXTEND_H
#include "vpx_scale/yv12config.h" #include "vpx_scale/yv12config.h"
void vp9_extend_mb_row(YV12_BUFFER_CONFIG *ybf, unsigned char *YPtr, unsigned char *UPtr, unsigned char *VPtr); void vp9_extend_mb_row(YV12_BUFFER_CONFIG *ybf, unsigned char *YPtr,
unsigned char *UPtr, unsigned char *VPtr);
void vp9_copy_and_extend_frame(YV12_BUFFER_CONFIG *src, void vp9_copy_and_extend_frame(YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst); YV12_BUFFER_CONFIG *dst);
void vp9_copy_and_extend_frame_with_rect(YV12_BUFFER_CONFIG *src, void vp9_copy_and_extend_frame_with_rect(YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst, YV12_BUFFER_CONFIG *dst,
int srcy, int srcx, int srcy, int srcx,
int srch, int srcw); int srch, int srcw);
#endif #endif // __INC_EXTEND_H
This diff is collapsed.
...@@ -81,24 +81,20 @@ static unsigned int check_mv_bounds(int_mv *mv, ...@@ -81,24 +81,20 @@ static unsigned int check_mv_bounds(int_mv *mv,
(mv->as_mv.row > mb_to_bottom_edge); (mv->as_mv.row > mb_to_bottom_edge);
} }
void vp9_find_near_mvs void vp9_find_near_mvs(MACROBLOCKD *xd,
( const MODE_INFO *here,
MACROBLOCKD *xd, const MODE_INFO *lfhere,
const MODE_INFO *here, int_mv *nearest, int_mv *nearby, int_mv *best,
const MODE_INFO *lfhere, int near_mv_ref_cts[4],