Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
30226a65
Commit
30226a65
authored
Jun 05, 2013
by
Deb Mukherjee
Browse files
Cosmetic renaming VP9_MVREFS to VP9_INTER_MODES
NO bitstream change Change-Id: I79f6146dac5fdd157051b6f8dc611c0b7b5e5f7f
parent
83885235
Changes
12
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_blockd.h
View file @
30226a65
...
...
@@ -115,7 +115,7 @@ typedef enum {
#define VP9_INTRA_MODES (TM_PRED + 1)
#define VP9_
MVREF
S (1 + NEWMV - NEARESTMV)
#define VP9_
INTER_MODE
S (1 + NEWMV - NEARESTMV)
#define WHT_UPSCALE_FACTOR 2
...
...
vp9/common/vp9_entropymode.c
View file @
30226a65
...
...
@@ -96,7 +96,7 @@ const vp9_tree_index vp9_partition_tree[6] = {
struct
vp9_token
vp9_intra_mode_encodings
[
VP9_INTRA_MODES
];
struct
vp9_token
vp9_sb_mv_ref_encoding_array
[
VP9_
MVREF
S
];
struct
vp9_token
vp9_sb_mv_ref_encoding_array
[
VP9_
INTER_MODE
S
];
struct
vp9_token
vp9_partition_encodings
[
PARTITION_TYPES
];
...
...
@@ -178,7 +178,7 @@ void vp9_init_mode_contexts(VP9_COMMON *pc) {
void
vp9_accum_mv_refs
(
VP9_COMMON
*
pc
,
MB_PREDICTION_MODE
m
,
const
int
context
)
{
unsigned
int
(
*
inter_mode_counts
)[
VP9_
MVREF
S
-
1
][
2
]
=
unsigned
int
(
*
inter_mode_counts
)[
VP9_
INTER_MODE
S
-
1
][
2
]
=
pc
->
fc
.
inter_mode_counts
;
if
(
m
==
ZEROMV
)
{
...
...
@@ -202,12 +202,12 @@ void vp9_accum_mv_refs(VP9_COMMON *pc,
#define MVREF_MAX_UPDATE_FACTOR 128
void
vp9_adapt_mode_context
(
VP9_COMMON
*
pc
)
{
int
i
,
j
;
unsigned
int
(
*
inter_mode_counts
)[
VP9_
MVREF
S
-
1
][
2
]
=
unsigned
int
(
*
inter_mode_counts
)[
VP9_
INTER_MODE
S
-
1
][
2
]
=
pc
->
fc
.
inter_mode_counts
;
vp9_prob
(
*
mode_context
)[
VP9_
MVREF
S
-
1
]
=
pc
->
fc
.
inter_mode_probs
;
vp9_prob
(
*
mode_context
)[
VP9_
INTER_MODE
S
-
1
]
=
pc
->
fc
.
inter_mode_probs
;
for
(
j
=
0
;
j
<
INTER_MODE_CONTEXTS
;
j
++
)
{
for
(
i
=
0
;
i
<
VP9_
MVREF
S
-
1
;
i
++
)
{
for
(
i
=
0
;
i
<
VP9_
INTER_MODE
S
-
1
;
i
++
)
{
int
count
=
inter_mode_counts
[
j
][
i
][
0
]
+
inter_mode_counts
[
j
][
i
][
1
];
int
factor
;
count
=
count
>
MVREF_COUNT_SAT
?
MVREF_COUNT_SAT
:
count
;
...
...
vp9/common/vp9_entropymode.h
View file @
30226a65
...
...
@@ -30,7 +30,7 @@ extern struct vp9_token vp9_intra_mode_encodings[VP9_INTRA_MODES];
/* Inter mode values do not start at zero */
extern
struct
vp9_token
vp9_sb_mv_ref_encoding_array
[
VP9_
MVREF
S
];
extern
struct
vp9_token
vp9_sb_mv_ref_encoding_array
[
VP9_
INTER_MODE
S
];
// probability models for partition information
extern
const
vp9_tree_index
vp9_partition_tree
[];
...
...
vp9/common/vp9_findnearmv.h
View file @
30226a65
...
...
@@ -71,7 +71,7 @@ static int check_mv_bounds(int_mv *mv,
}
vp9_prob
*
vp9_mv_ref_probs
(
VP9_COMMON
*
pc
,
vp9_prob
p
[
VP9_
MVREF
S
-
1
],
vp9_prob
p
[
VP9_
INTER_MODE
S
-
1
],
const
int
context
);
void
vp9_append_sub8x8_mvs_for_idx
(
VP9_COMMON
*
pc
,
...
...
vp9/common/vp9_modecont.c
View file @
30226a65
...
...
@@ -12,7 +12,7 @@
#include "vp9/common/vp9_entropy.h"
const
vp9_prob
vp9_default_inter_mode_probs
[
INTER_MODE_CONTEXTS
]
[
VP9_
MVREF
S
-
1
]
=
{
[
VP9_
INTER_MODE
S
-
1
]
=
{
{
2
,
173
,
34
},
// 0 = both zero mv
{
7
,
145
,
85
},
// 1 = one zero mv + one a predicted mv
{
7
,
166
,
63
},
// 2 = two predicted mvs
...
...
vp9/common/vp9_modecont.h
View file @
30226a65
...
...
@@ -14,6 +14,6 @@
#include "vp9/common/vp9_entropy.h"
extern
const
int
vp9_default_inter_mode_probs
[
INTER_MODE_CONTEXTS
]
[
VP9_
MVREF
S
-
1
];
[
VP9_
INTER_MODE
S
-
1
];
#endif // VP9_COMMON_VP9_MODECONT_H_
vp9/common/vp9_onyxc_int.h
View file @
30226a65
...
...
@@ -76,9 +76,9 @@ typedef struct frame_contexts {
unsigned
int
switchable_interp_count
[
VP9_SWITCHABLE_FILTERS
+
1
]
[
VP9_SWITCHABLE_FILTERS
];
vp9_prob
inter_mode_probs
[
INTER_MODE_CONTEXTS
][
VP9_
MVREF
S
-
1
];
vp9_prob
pre_inter_mode_probs
[
INTER_MODE_CONTEXTS
][
VP9_
MVREF
S
-
1
];
unsigned
int
inter_mode_counts
[
INTER_MODE_CONTEXTS
][
VP9_
MVREF
S
-
1
][
2
];
vp9_prob
inter_mode_probs
[
INTER_MODE_CONTEXTS
][
VP9_
INTER_MODE
S
-
1
];
vp9_prob
pre_inter_mode_probs
[
INTER_MODE_CONTEXTS
][
VP9_
INTER_MODE
S
-
1
];
unsigned
int
inter_mode_counts
[
INTER_MODE_CONTEXTS
][
VP9_
INTER_MODE
S
-
1
][
2
];
}
FRAME_CONTEXT
;
typedef
enum
{
...
...
vp9/decoder/vp9_decodemv.c
View file @
30226a65
...
...
@@ -360,7 +360,7 @@ static void read_switchable_interp_probs(VP9_COMMON* const cm, vp9_reader *r) {
static
void
read_inter_mode_probs
(
VP9_COMMON
*
const
cm
,
vp9_reader
*
r
)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
INTER_MODE_CONTEXTS
;
++
i
)
for
(
j
=
0
;
j
<
VP9_
MVREF
S
-
1
;
++
j
)
{
for
(
j
=
0
;
j
<
VP9_
INTER_MODE
S
-
1
;
++
j
)
{
if
(
vp9_read
(
r
,
VP9_DEF_UPDATE_PROB
))
{
// cm->fc.inter_mode_probs[i][j] = vp9_read_prob(r);
cm
->
fc
.
inter_mode_probs
[
i
][
j
]
=
...
...
@@ -567,7 +567,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
if
(
mbmi
->
ref_frame
)
{
int_mv
nearest
,
nearby
,
best_mv
;
int_mv
nearest_second
,
nearby_second
,
best_mv_second
;
vp9_prob
mv_ref_p
[
VP9_
MVREF
S
-
1
];
vp9_prob
mv_ref_p
[
VP9_
INTER_MODE
S
-
1
];
const
MV_REFERENCE_FRAME
ref_frame
=
mbmi
->
ref_frame
;
{
...
...
vp9/encoder/vp9_bitstream.c
View file @
30226a65
...
...
@@ -427,7 +427,7 @@ static void update_inter_mode_probs(VP9_COMMON *pc, vp9_writer* const bc) {
int
i
,
j
;
for
(
i
=
0
;
i
<
INTER_MODE_CONTEXTS
;
i
++
)
{
for
(
j
=
0
;
j
<
VP9_
MVREF
S
-
1
;
j
++
)
{
for
(
j
=
0
;
j
<
VP9_
INTER_MODE
S
-
1
;
j
++
)
{
vp9_cond_prob_diff_update
(
bc
,
&
pc
->
fc
.
inter_mode_probs
[
i
][
j
],
VP9_DEF_UPDATE_PROB
,
pc
->
fc
.
inter_mode_counts
[
i
][
j
]);
...
...
@@ -708,7 +708,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
write_intra_mode
(
bc
,
mi
->
uv_mode
,
pc
->
fc
.
uv_mode_prob
[
mode
]);
}
else
{
vp9_prob
mv_ref_p
[
VP9_
MVREF
S
-
1
];
vp9_prob
mv_ref_p
[
VP9_
INTER_MODE
S
-
1
];
vp9_mv_ref_probs
(
&
cpi
->
common
,
mv_ref_p
,
mi
->
mb_mode_context
[
rf
]);
...
...
vp9/encoder/vp9_onyx_if.c
View file @
30226a65
...
...
@@ -466,9 +466,9 @@ static void configure_static_seg_features(VP9_COMP *cpi) {
void
vp9_update_mode_context_stats
(
VP9_COMP
*
cpi
)
{
VP9_COMMON
*
cm
=
&
cpi
->
common
;
int
i
,
j
;
unsigned
int
(
*
inter_mode_counts
)[
VP9_
MVREF
S
-
1
][
2
]
=
unsigned
int
(
*
inter_mode_counts
)[
VP9_
INTER_MODE
S
-
1
][
2
]
=
cm
->
fc
.
inter_mode_counts
;
int64_t
(
*
mv_ref_stats
)[
VP9_
MVREF
S
-
1
][
2
]
=
cpi
->
mv_ref_stats
;
int64_t
(
*
mv_ref_stats
)[
VP9_
INTER_MODE
S
-
1
][
2
]
=
cpi
->
mv_ref_stats
;
FILE
*
f
;
// Read the past stats counters
...
...
@@ -482,7 +482,7 @@ void vp9_update_mode_context_stats(VP9_COMP *cpi) {
// Add in the values for this frame
for
(
i
=
0
;
i
<
INTER_MODE_CONTEXTS
;
i
++
)
{
for
(
j
=
0
;
j
<
VP9_
MVREF
S
-
1
;
j
++
)
{
for
(
j
=
0
;
j
<
VP9_
INTER_MODE
S
-
1
;
j
++
)
{
mv_ref_stats
[
i
][
j
][
0
]
+=
(
int64_t
)
inter_mode_counts
[
i
][
j
][
0
];
mv_ref_stats
[
i
][
j
][
1
]
+=
(
int64_t
)
inter_mode_counts
[
i
][
j
][
1
];
}
...
...
@@ -499,13 +499,14 @@ void print_mode_context(VP9_COMP *cpi) {
int
i
,
j
;
fprintf
(
f
,
"#include
\"
vp9_entropy.h
\"\n
"
);
fprintf
(
f
,
"const int inter_mode_probs[INTER_MODE_CONTEXTS][VP9_MVREFS - 1] ="
);
fprintf
(
f
,
"const int inter_mode_probs[INTER_MODE_CONTEXTS][VP9_INTER_MODES - 1] ="
);
fprintf
(
f
,
"{
\n
"
);
for
(
j
=
0
;
j
<
INTER_MODE_CONTEXTS
;
j
++
)
{
fprintf
(
f
,
" {/* %d */ "
,
j
);
fprintf
(
f
,
" "
);
for
(
i
=
0
;
i
<
VP9_
MVREF
S
-
1
;
i
++
)
{
for
(
i
=
0
;
i
<
VP9_
INTER_MODE
S
-
1
;
i
++
)
{
int
this_prob
;
int64_t
count
=
cpi
->
mv_ref_stats
[
j
][
i
][
0
]
+
cpi
->
mv_ref_stats
[
j
][
i
][
1
];
if
(
count
)
...
...
vp9/encoder/vp9_onyx_int.h
View file @
30226a65
...
...
@@ -85,8 +85,8 @@ typedef struct {
vp9_prob
switchable_interp_prob
[
VP9_SWITCHABLE_FILTERS
+
1
]
[
VP9_SWITCHABLE_FILTERS
-
1
];
int
inter_mode_counts
[
INTER_MODE_CONTEXTS
][
VP9_
MVREF
S
-
1
][
2
];
vp9_prob
inter_mode_probs
[
INTER_MODE_CONTEXTS
][
VP9_
MVREF
S
-
1
];
int
inter_mode_counts
[
INTER_MODE_CONTEXTS
][
VP9_
INTER_MODE
S
-
1
][
2
];
vp9_prob
inter_mode_probs
[
INTER_MODE_CONTEXTS
][
VP9_
INTER_MODE
S
-
1
];
}
CODING_CONTEXT
;
...
...
@@ -597,7 +597,7 @@ typedef struct VP9_COMP {
#endif
#ifdef ENTROPY_STATS
int64_t
mv_ref_stats
[
INTER_MODE_CONTEXTS
][
VP9_
MVREF
S
-
1
][
2
];
int64_t
mv_ref_stats
[
INTER_MODE_CONTEXTS
][
VP9_
INTER_MODE
S
-
1
][
2
];
#endif
}
VP9_COMP
;
...
...
vp9/encoder/vp9_rdopt.c
View file @
30226a65
...
...
@@ -946,7 +946,7 @@ int vp9_cost_mv_ref(VP9_COMP *cpi,
if
(
!
vp9_segfeature_active
(
xd
,
segment_id
,
SEG_LVL_SKIP
))
{
VP9_COMMON
*
pc
=
&
cpi
->
common
;
vp9_prob
p
[
VP9_
MVREF
S
-
1
];
vp9_prob
p
[
VP9_
INTER_MODE
S
-
1
];
assert
(
NEARESTMV
<=
m
&&
m
<=
NEWMV
);
vp9_mv_ref_probs
(
pc
,
p
,
mode_context
);
return
cost_token
(
vp9_sb_mv_ref_tree
,
p
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment