Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
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
921b1c3c
Commit
921b1c3c
authored
Feb 28, 2012
by
Ronald S. Bultje
Browse files
Rename "dual" prediction to "compound" prediction.
Change-Id: Ibcd2b9b247ff9f83331dac47f91ec285e8955ff1
parent
d4761651
Changes
11
Hide whitespace changes
Inline
Side-by-side
vp8/common/alloccommon.c
View file @
921b1c3c
...
...
@@ -213,7 +213,7 @@ void vp8_create_common(VP8_COMMON *oci)
oci
->
txfm_mode
=
ONLY_4X4
;
#endif
oci
->
mb_no_coeff_skip
=
1
;
oci
->
dual
_pred_mode
=
HYBRID_PREDICTION
;
oci
->
comp
_pred_mode
=
HYBRID_PREDICTION
;
oci
->
no_lpf
=
0
;
oci
->
filter_type
=
NORMAL_LOOPFILTER
;
oci
->
use_bilinear_mc_filter
=
0
;
...
...
vp8/common/onyxc_int.h
View file @
921b1c3c
...
...
@@ -40,7 +40,7 @@ void vp8_initialize_common(void);
#define NUM_YV12_BUFFERS 4
#define
DUAL
_PRED_CONTEXTS 2
#define
COMP
_PRED_CONTEXTS 2
typedef
struct
frame_contexts
{
...
...
@@ -79,10 +79,10 @@ typedef enum
typedef
enum
{
SINGLE_PREDICTION_ONLY
=
0
,
DUAL
_PREDICTION_ONLY
=
1
,
COMP
_PREDICTION_ONLY
=
1
,
HYBRID_PREDICTION
=
2
,
NB_PREDICTION_TYPES
=
3
,
}
DUAL
PREDMODE_TYPE
;
}
COMP
PREDMODE_TYPE
;
#if CONFIG_T8X8
/* TODO: allows larger transform */
...
...
@@ -153,7 +153,7 @@ typedef struct VP8Common
#if CONFIG_T8X8
TXFM_MODE
txfm_mode
;
#endif
DUAL
PREDMODE_TYPE
dual
_pred_mode
;
COMP
PREDMODE_TYPE
comp
_pred_mode
;
int
no_lpf
;
int
use_bilinear_mc_filter
;
int
full_pixel
;
...
...
@@ -237,7 +237,7 @@ typedef struct VP8Common
vp8_prob
ref_pred_probs
[
PREDICTION_PROBS
];
vp8_prob
mod_refprobs
[
MAX_REF_FRAMES
][
PREDICTION_PROBS
];
vp8_prob
prob_
dual
pred
[
DUAL
_PRED_CONTEXTS
];
vp8_prob
prob_
comp
pred
[
COMP
_PRED_CONTEXTS
];
FRAME_CONTEXT
lfc_a
;
/* last alt ref entropy */
FRAME_CONTEXT
lfc
;
/* last frame entropy */
...
...
vp8/common/pred_common.c
View file @
921b1c3c
...
...
@@ -37,8 +37,8 @@ unsigned char get_pred_context( VP8_COMMON *const cm,
(
m
-
cm
->
mode_info_stride
)
->
mbmi
.
ref_predicted
;
break
;
case
PRED_
DUAL
:
// Context based on use of
dual
pred flag by neighbours
case
PRED_
COMP
:
// Context based on use of
comp
pred flag by neighbours
//pred_context =
// ((m - 1)->mbmi.second_ref_frame != INTRA_FRAME) +
// ((m - cm->mode_info_stride)->mbmi.second_ref_frame != INTRA_FRAME);
...
...
@@ -89,11 +89,11 @@ vp8_prob get_pred_prob( VP8_COMMON *const cm,
pred_probability
=
cm
->
ref_pred_probs
[
pred_context
];
break
;
case
PRED_
DUAL
:
case
PRED_
COMP
:
// In keeping with convention elsewhre the probability returned is
// the probability of a "0" outcome which in this case means the
// probability of
dual
pred off.
pred_probability
=
cm
->
prob_
dual
pred
[
pred_context
];
// probability of
comp
pred off.
pred_probability
=
cm
->
prob_
comp
pred
[
pred_context
];
break
;
default:
...
...
vp8/common/pred_common.h
View file @
921b1c3c
...
...
@@ -21,7 +21,7 @@ typedef enum
{
PRED_SEG_ID
=
0
,
// Segment identifier
PRED_REF
=
1
,
PRED_
DUAL
=
2
PRED_
COMP
=
2
}
PRED_ID
;
...
...
vp8/decoder/decodemv.c
View file @
921b1c3c
...
...
@@ -526,14 +526,14 @@ static void mb_mode_mv_init(VP8D_COMP *pbi)
// frame prediction fails.
compute_mod_refprobs
(
cm
);
pbi
->
common
.
dual
_pred_mode
=
vp8_read
(
bc
,
128
);
if
(
cm
->
dual
_pred_mode
)
cm
->
dual
_pred_mode
+=
vp8_read
(
bc
,
128
);
if
(
cm
->
dual
_pred_mode
==
HYBRID_PREDICTION
)
pbi
->
common
.
comp
_pred_mode
=
vp8_read
(
bc
,
128
);
if
(
cm
->
comp
_pred_mode
)
cm
->
comp
_pred_mode
+=
vp8_read
(
bc
,
128
);
if
(
cm
->
comp
_pred_mode
==
HYBRID_PREDICTION
)
{
int
i
;
for
(
i
=
0
;
i
<
DUAL
_PRED_CONTEXTS
;
i
++
)
cm
->
prob_
dual
pred
[
i
]
=
(
vp8_prob
)
vp8_read_literal
(
bc
,
8
);
for
(
i
=
0
;
i
<
COMP
_PRED_CONTEXTS
;
i
++
)
cm
->
prob_
comp
pred
[
i
]
=
(
vp8_prob
)
vp8_read_literal
(
bc
,
8
);
}
if
(
vp8_read_bit
(
bc
))
...
...
@@ -856,9 +856,9 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
propagate_mv:
/* same MV throughout */
if
(
cm
->
dual
_pred_mode
==
DUAL
_PREDICTION_ONLY
||
(
cm
->
dual
_pred_mode
==
HYBRID_PREDICTION
&&
vp8_read
(
bc
,
get_pred_prob
(
cm
,
xd
,
PRED_
DUAL
)))
)
if
(
cm
->
comp
_pred_mode
==
COMP
_PREDICTION_ONLY
||
(
cm
->
comp
_pred_mode
==
HYBRID_PREDICTION
&&
vp8_read
(
bc
,
get_pred_prob
(
cm
,
xd
,
PRED_
COMP
)))
)
{
mbmi
->
second_ref_frame
=
mbmi
->
ref_frame
+
1
;
if
(
mbmi
->
second_ref_frame
==
4
)
...
...
vp8/encoder/bitstream.c
View file @
921b1c3c
...
...
@@ -627,31 +627,31 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
vp8_write_literal
(
w
,
pc
->
prob_last_coded
,
8
);
vp8_write_literal
(
w
,
pc
->
prob_gf_coded
,
8
);
if
(
cpi
->
common
.
dual
_pred_mode
==
HYBRID_PREDICTION
)
if
(
cpi
->
common
.
comp
_pred_mode
==
HYBRID_PREDICTION
)
{
vp8_write
(
w
,
1
,
128
);
vp8_write
(
w
,
1
,
128
);
for
(
i
=
0
;
i
<
DUAL
_PRED_CONTEXTS
;
i
++
)
for
(
i
=
0
;
i
<
COMP
_PRED_CONTEXTS
;
i
++
)
{
if
(
cpi
->
single_pred_count
[
i
]
+
cpi
->
dual
_pred_count
[
i
])
if
(
cpi
->
single_pred_count
[
i
]
+
cpi
->
comp
_pred_count
[
i
])
{
pc
->
prob_
dual
pred
[
i
]
=
cpi
->
single_pred_count
[
i
]
*
255
/
(
cpi
->
single_pred_count
[
i
]
+
cpi
->
dual
_pred_count
[
i
]);
if
(
pc
->
prob_
dual
pred
[
i
]
<
1
)
pc
->
prob_
dual
pred
[
i
]
=
1
;
pc
->
prob_
comp
pred
[
i
]
=
cpi
->
single_pred_count
[
i
]
*
255
/
(
cpi
->
single_pred_count
[
i
]
+
cpi
->
comp
_pred_count
[
i
]);
if
(
pc
->
prob_
comp
pred
[
i
]
<
1
)
pc
->
prob_
comp
pred
[
i
]
=
1
;
}
else
{
pc
->
prob_
dual
pred
[
i
]
=
128
;
pc
->
prob_
comp
pred
[
i
]
=
128
;
}
vp8_write_literal
(
w
,
pc
->
prob_
dual
pred
[
i
],
8
);
vp8_write_literal
(
w
,
pc
->
prob_
comp
pred
[
i
],
8
);
}
}
else
if
(
cpi
->
common
.
dual
_pred_mode
==
SINGLE_PREDICTION_ONLY
)
else
if
(
cpi
->
common
.
comp
_pred_mode
==
SINGLE_PREDICTION_ONLY
)
{
vp8_write
(
w
,
0
,
128
);
}
else
/*
dual
prediction only */
else
/*
compound
prediction only */
{
vp8_write
(
w
,
1
,
128
);
vp8_write
(
w
,
0
,
128
);
...
...
@@ -844,11 +844,11 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
#endif
write_mv
(
w
,
&
mi
->
mv
.
as_mv
,
&
best_mv
,
mvc
);
if
(
cpi
->
common
.
dual
_pred_mode
==
HYBRID_PREDICTION
)
if
(
cpi
->
common
.
comp
_pred_mode
==
HYBRID_PREDICTION
)
{
vp8_write
(
w
,
mi
->
second_ref_frame
!=
INTRA_FRAME
,
get_pred_prob
(
pc
,
xd
,
PRED_
DUAL
)
);
get_pred_prob
(
pc
,
xd
,
PRED_
COMP
)
);
}
if
(
mi
->
second_ref_frame
)
{
...
...
@@ -925,11 +925,11 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
}
break
;
default:
if
(
cpi
->
common
.
dual
_pred_mode
==
HYBRID_PREDICTION
)
if
(
cpi
->
common
.
comp
_pred_mode
==
HYBRID_PREDICTION
)
{
vp8_write
(
w
,
mi
->
second_ref_frame
!=
INTRA_FRAME
,
get_pred_prob
(
pc
,
xd
,
PRED_
DUAL
)
);
get_pred_prob
(
pc
,
xd
,
PRED_
COMP
)
);
}
break
;
}
...
...
@@ -1014,31 +1014,31 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
vp8_write_literal
(
w
,
pc
->
prob_last_coded
,
8
);
vp8_write_literal
(
w
,
pc
->
prob_gf_coded
,
8
);
if
(
cpi
->
common
.
dual
_pred_mode
==
HYBRID_PREDICTION
)
if
(
cpi
->
common
.
comp
_pred_mode
==
HYBRID_PREDICTION
)
{
vp8_write
(
w
,
1
,
128
);
vp8_write
(
w
,
1
,
128
);
for
(
i
=
0
;
i
<
DUAL
_PRED_CONTEXTS
;
i
++
)
for
(
i
=
0
;
i
<
COMP
_PRED_CONTEXTS
;
i
++
)
{
if
(
cpi
->
single_pred_count
[
i
]
+
cpi
->
dual
_pred_count
[
i
])
if
(
cpi
->
single_pred_count
[
i
]
+
cpi
->
comp
_pred_count
[
i
])
{
pc
->
prob_
dual
pred
[
i
]
=
cpi
->
single_pred_count
[
i
]
*
255
/
(
cpi
->
single_pred_count
[
i
]
+
cpi
->
dual
_pred_count
[
i
]);
if
(
pc
->
prob_
dual
pred
[
i
]
<
1
)
pc
->
prob_
dual
pred
[
i
]
=
1
;
pc
->
prob_
comp
pred
[
i
]
=
cpi
->
single_pred_count
[
i
]
*
255
/
(
cpi
->
single_pred_count
[
i
]
+
cpi
->
comp
_pred_count
[
i
]);
if
(
pc
->
prob_
comp
pred
[
i
]
<
1
)
pc
->
prob_
comp
pred
[
i
]
=
1
;
}
else
{
pc
->
prob_
dual
pred
[
i
]
=
128
;
pc
->
prob_
comp
pred
[
i
]
=
128
;
}
vp8_write_literal
(
w
,
pc
->
prob_
dual
pred
[
i
],
8
);
vp8_write_literal
(
w
,
pc
->
prob_
comp
pred
[
i
],
8
);
}
}
else
if
(
cpi
->
common
.
dual
_pred_mode
==
SINGLE_PREDICTION_ONLY
)
else
if
(
cpi
->
common
.
comp
_pred_mode
==
SINGLE_PREDICTION_ONLY
)
{
vp8_write
(
w
,
0
,
128
);
}
else
/*
dual
prediction only */
else
/*
compound
prediction only */
{
vp8_write
(
w
,
1
,
128
);
vp8_write
(
w
,
0
,
128
);
...
...
@@ -1211,11 +1211,10 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
#endif
write_mv
(
w
,
&
mi
->
mv
.
as_mv
,
&
best_mv
,
mvc
);
if
(
cpi
->
common
.
dual_pred_mode
==
HYBRID_PREDICTION
)
if
(
cpi
->
common
.
comp_pred_mode
==
HYBRID_PREDICTION
)
{
vp8_write
(
w
,
mi
->
second_ref_frame
!=
INTRA_FRAME
,
get_pred_prob
(
pc
,
xd
,
PRED_
DUAL
)
);
get_pred_prob
(
pc
,
xd
,
PRED_
COMP
)
);
}
if
(
mi
->
second_ref_frame
)
{
...
...
@@ -1286,10 +1285,10 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
}
break
;
default:
if
(
cpi
->
common
.
dual
_pred_mode
==
HYBRID_PREDICTION
)
if
(
cpi
->
common
.
comp
_pred_mode
==
HYBRID_PREDICTION
)
{
vp8_write
(
w
,
mi
->
second_ref_frame
!=
INTRA_FRAME
,
get_pred_prob
(
pc
,
xd
,
PRED_
DUAL
)
);
get_pred_prob
(
pc
,
xd
,
PRED_
COMP
)
);
}
break
;
}
...
...
vp8/encoder/encodeframe.c
View file @
921b1c3c
...
...
@@ -1130,9 +1130,9 @@ static void encode_frame_internal(VP8_COMP *cpi)
// re-initencode frame context.
init_encode_frame_mb_context
(
cpi
);
cpi
->
rd_single_diff
=
cpi
->
rd_
dual
_diff
=
cpi
->
rd_hybrid_diff
=
0
;
cpi
->
rd_single_diff
=
cpi
->
rd_
comp
_diff
=
cpi
->
rd_hybrid_diff
=
0
;
vpx_memset
(
cpi
->
single_pred_count
,
0
,
sizeof
(
cpi
->
single_pred_count
));
vpx_memset
(
cpi
->
dual
_pred_count
,
0
,
sizeof
(
cpi
->
dual
_pred_count
));
vpx_memset
(
cpi
->
comp
_pred_count
,
0
,
sizeof
(
cpi
->
comp
_pred_count
));
{
struct
vpx_usec_timer
emr_timer
;
...
...
@@ -1239,11 +1239,11 @@ void vp8_encode_frame(VP8_COMP *cpi)
{
int
frame_type
,
pred_type
;
int
redo
=
0
;
int
single_diff
,
dual
_diff
,
hybrid_diff
;
int
single_diff
,
comp
_diff
,
hybrid_diff
;
/*
* This code does a single RD pass over the whole frame assuming
* either
dual
, single or hybrid prediction as per whatever has
* either
compound
, single or hybrid prediction as per whatever has
* worked best for that type of frame in the past.
* It also predicts whether another coding mode would have worked
* better that this coding mode. If that is the case, it remembers
...
...
@@ -1264,7 +1264,7 @@ void vp8_encode_frame(VP8_COMP *cpi)
cpi
->
rd_prediction_type_threshes
[
frame_type
][
0
]
&&
cpi
->
rd_prediction_type_threshes
[
frame_type
][
1
]
>
cpi
->
rd_prediction_type_threshes
[
frame_type
][
2
])
pred_type
=
DUAL
_PREDICTION_ONLY
;
pred_type
=
COMP
_PREDICTION_ONLY
;
else
if
(
cpi
->
rd_prediction_type_threshes
[
frame_type
][
0
]
>
cpi
->
rd_prediction_type_threshes
[
frame_type
][
1
]
&&
cpi
->
rd_prediction_type_threshes
[
frame_type
][
0
]
>
...
...
@@ -1273,38 +1273,38 @@ void vp8_encode_frame(VP8_COMP *cpi)
else
pred_type
=
HYBRID_PREDICTION
;
cpi
->
common
.
dual
_pred_mode
=
pred_type
;
cpi
->
common
.
comp
_pred_mode
=
pred_type
;
encode_frame_internal
(
cpi
);
single_diff
=
cpi
->
rd_single_diff
/
cpi
->
common
.
MBs
;
cpi
->
rd_prediction_type_threshes
[
frame_type
][
0
]
+=
single_diff
;
cpi
->
rd_prediction_type_threshes
[
frame_type
][
0
]
>>=
1
;
dual
_diff
=
cpi
->
rd_
dual
_diff
/
cpi
->
common
.
MBs
;
cpi
->
rd_prediction_type_threshes
[
frame_type
][
1
]
+=
dual
_diff
;
comp
_diff
=
cpi
->
rd_
comp
_diff
/
cpi
->
common
.
MBs
;
cpi
->
rd_prediction_type_threshes
[
frame_type
][
1
]
+=
comp
_diff
;
cpi
->
rd_prediction_type_threshes
[
frame_type
][
1
]
>>=
1
;
hybrid_diff
=
cpi
->
rd_hybrid_diff
/
cpi
->
common
.
MBs
;
cpi
->
rd_prediction_type_threshes
[
frame_type
][
2
]
+=
hybrid_diff
;
cpi
->
rd_prediction_type_threshes
[
frame_type
][
2
]
>>=
1
;
if
(
cpi
->
common
.
dual
_pred_mode
==
HYBRID_PREDICTION
)
if
(
cpi
->
common
.
comp
_pred_mode
==
HYBRID_PREDICTION
)
{
int
single_count_zero
=
0
;
int
dual
_count_zero
=
0
;
int
comp
_count_zero
=
0
;
int
i
;
for
(
i
=
0
;
i
<
DUAL
_PRED_CONTEXTS
;
i
++
)
for
(
i
=
0
;
i
<
COMP
_PRED_CONTEXTS
;
i
++
)
{
single_count_zero
+=
cpi
->
single_pred_count
[
i
];
dual
_count_zero
+=
cpi
->
dual
_pred_count
[
i
];
comp
_count_zero
+=
cpi
->
comp
_pred_count
[
i
];
}
if
(
dual
_count_zero
==
0
)
if
(
comp
_count_zero
==
0
)
{
cpi
->
common
.
dual
_pred_mode
=
SINGLE_PREDICTION_ONLY
;
cpi
->
common
.
comp
_pred_mode
=
SINGLE_PREDICTION_ONLY
;
}
else
if
(
single_count_zero
==
0
)
{
cpi
->
common
.
dual
_pred_mode
=
DUAL
_PREDICTION_ONLY
;
cpi
->
common
.
comp
_pred_mode
=
COMP
_PREDICTION_ONLY
;
}
}
}
...
...
@@ -1547,7 +1547,7 @@ int vp8cx_encode_inter_macroblock
// For now this codebase is limited to a single rd encode path
{
int
zbin_mode_boost_enabled
=
cpi
->
zbin_mode_boost_enabled
;
int
single
,
dual
,
hybrid
;
int
single
,
compound
,
hybrid
;
/* Are we using the fast quantizer for the mode selection? */
if
(
cpi
->
sf
.
use_fastquant_for_pick
)
...
...
@@ -1562,22 +1562,22 @@ int vp8cx_encode_inter_macroblock
cpi
->
zbin_mode_boost_enabled
=
0
;
}
vp8_rd_pick_inter_mode
(
cpi
,
x
,
recon_yoffset
,
recon_uvoffset
,
&
rate
,
&
distortion
,
&
intra_error
,
&
single
,
&
dual
,
&
hybrid
);
&
distortion
,
&
intra_error
,
&
single
,
&
compound
,
&
hybrid
);
cpi
->
rd_single_diff
+=
single
;
cpi
->
rd_
dual
_diff
+=
dual
;
cpi
->
rd_
comp
_diff
+=
compound
;
cpi
->
rd_hybrid_diff
+=
hybrid
;
if
(
x
->
e_mbd
.
mode_info_context
->
mbmi
.
ref_frame
&&
x
->
e_mbd
.
mode_info_context
->
mbmi
.
mode
!=
SPLITMV
)
{
unsigned
char
pred_context
;
pred_context
=
get_pred_context
(
cm
,
xd
,
PRED_
DUAL
);
pred_context
=
get_pred_context
(
cm
,
xd
,
PRED_
COMP
);
if
(
xd
->
mode_info_context
->
mbmi
.
second_ref_frame
==
INTRA_FRAME
)
cpi
->
single_pred_count
[
pred_context
]
++
;
else
cpi
->
dual
_pred_count
[
pred_context
]
++
;
cpi
->
comp
_pred_count
[
pred_context
]
++
;
}
#if CONFIG_T8X8
...
...
vp8/encoder/onyx_if.c
View file @
921b1c3c
...
...
@@ -696,19 +696,19 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf
->
thresh_mult
[
THR_SPLITG
]
=
5000
;
sf
->
thresh_mult
[
THR_SPLITA
]
=
5000
;
sf
->
thresh_mult
[
THR_
DUAL
_ZEROLG
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARESTLG
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARLG
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_ZEROLA
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARESTLA
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARLA
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_ZEROGA
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARESTGA
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARGA
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_NEWLG
]
=
1000
;
sf
->
thresh_mult
[
THR_
DUAL
_NEWLA
]
=
1000
;
sf
->
thresh_mult
[
THR_
DUAL
_NEWGA
]
=
1000
;
sf
->
thresh_mult
[
THR_
COMP
_ZEROLG
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_NEARESTLG
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_NEARLG
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_ZEROLA
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_NEARESTLA
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_NEARLA
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_ZEROGA
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_NEARESTGA
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_NEARGA
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_NEWLG
]
=
1000
;
sf
->
thresh_mult
[
THR_
COMP
_NEWLA
]
=
1000
;
sf
->
thresh_mult
[
THR_
COMP
_NEWGA
]
=
1000
;
sf
->
first_step
=
0
;
sf
->
max_step_search_steps
=
MAX_MVSEARCH_STEPS
;
...
...
@@ -750,19 +750,19 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf
->
thresh_mult
[
THR_SPLITG
]
=
4500
;
sf
->
thresh_mult
[
THR_SPLITA
]
=
4500
;
sf
->
thresh_mult
[
THR_
DUAL
_ZEROLG
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARESTLG
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARLG
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_ZEROLA
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARESTLA
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARLA
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_ZEROGA
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARESTGA
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARGA
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_ZEROLG
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_NEARESTLG
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_NEARLG
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_ZEROLA
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_NEARESTLA
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_NEARLA
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_ZEROGA
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_NEARESTGA
]
=
0
;
sf
->
thresh_mult
[
THR_
COMP
_NEARGA
]
=
0
;
sf
->
thresh_mult
[
THR_
DUAL
_NEWLG
]
=
1000
;
sf
->
thresh_mult
[
THR_
DUAL
_NEWLA
]
=
1000
;
sf
->
thresh_mult
[
THR_
DUAL
_NEWGA
]
=
1000
;
sf
->
thresh_mult
[
THR_
COMP
_NEWLG
]
=
1000
;
sf
->
thresh_mult
[
THR_
COMP
_NEWLA
]
=
1000
;
sf
->
thresh_mult
[
THR_
COMP
_NEWGA
]
=
1000
;
if
(
Speed
>
0
)
{
...
...
@@ -814,19 +814,19 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf
->
thresh_mult
[
THR_SPLITA
]
=
20000
;
}
sf
->
thresh_mult
[
THR_
DUAL
_ZEROLG
]
=
1500
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARESTLG
]
=
1500
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARLG
]
=
1500
;
sf
->
thresh_mult
[
THR_
DUAL
_ZEROLA
]
=
1500
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARESTLA
]
=
1500
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARLA
]
=
1500
;
sf
->
thresh_mult
[
THR_
DUAL
_ZEROGA
]
=
1500
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARESTGA
]
=
1500
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARGA
]
=
1500
;
sf
->
thresh_mult
[
THR_
DUAL
_NEWLG
]
=
2000
;
sf
->
thresh_mult
[
THR_
DUAL
_NEWLA
]
=
2000
;
sf
->
thresh_mult
[
THR_
DUAL
_NEWGA
]
=
2000
;
sf
->
thresh_mult
[
THR_
COMP
_ZEROLG
]
=
1500
;
sf
->
thresh_mult
[
THR_
COMP
_NEARESTLG
]
=
1500
;
sf
->
thresh_mult
[
THR_
COMP
_NEARLG
]
=
1500
;
sf
->
thresh_mult
[
THR_
COMP
_ZEROLA
]
=
1500
;
sf
->
thresh_mult
[
THR_
COMP
_NEARESTLA
]
=
1500
;
sf
->
thresh_mult
[
THR_
COMP
_NEARLA
]
=
1500
;
sf
->
thresh_mult
[
THR_
COMP
_ZEROGA
]
=
1500
;
sf
->
thresh_mult
[
THR_
COMP
_NEARESTGA
]
=
1500
;
sf
->
thresh_mult
[
THR_
COMP
_NEARGA
]
=
1500
;
sf
->
thresh_mult
[
THR_
COMP
_NEWLG
]
=
2000
;
sf
->
thresh_mult
[
THR_
COMP
_NEWLA
]
=
2000
;
sf
->
thresh_mult
[
THR_
COMP
_NEWGA
]
=
2000
;
}
if
(
Speed
>
2
)
...
...
@@ -865,19 +865,19 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf
->
thresh_mult
[
THR_SPLITA
]
=
50000
;
}
sf
->
thresh_mult
[
THR_
DUAL
_ZEROLG
]
=
2000
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARESTLG
]
=
2000
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARLG
]
=
2000
;
sf
->
thresh_mult
[
THR_
DUAL
_ZEROLA
]
=
2000
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARESTLA
]
=
2000
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARLA
]
=
2000
;
sf
->
thresh_mult
[
THR_
DUAL
_ZEROGA
]
=
2000
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARESTGA
]
=
2000
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARGA
]
=
2000
;
sf
->
thresh_mult
[
THR_
COMP
_ZEROLG
]
=
2000
;
sf
->
thresh_mult
[
THR_
COMP
_NEARESTLG
]
=
2000
;
sf
->
thresh_mult
[
THR_
COMP
_NEARLG
]
=
2000
;
sf
->
thresh_mult
[
THR_
COMP
_ZEROLA
]
=
2000
;
sf
->
thresh_mult
[
THR_
COMP
_NEARESTLA
]
=
2000
;
sf
->
thresh_mult
[
THR_
COMP
_NEARLA
]
=
2000
;
sf
->
thresh_mult
[
THR_
COMP
_ZEROGA
]
=
2000
;
sf
->
thresh_mult
[
THR_
COMP
_NEARESTGA
]
=
2000
;
sf
->
thresh_mult
[
THR_
COMP
_NEARGA
]
=
2000
;
sf
->
thresh_mult
[
THR_
DUAL
_NEWLG
]
=
2500
;
sf
->
thresh_mult
[
THR_
DUAL
_NEWLA
]
=
2500
;
sf
->
thresh_mult
[
THR_
DUAL
_NEWGA
]
=
2500
;
sf
->
thresh_mult
[
THR_
COMP
_NEWLG
]
=
2500
;
sf
->
thresh_mult
[
THR_
COMP
_NEWLA
]
=
2500
;
sf
->
thresh_mult
[
THR_
COMP
_NEWGA
]
=
2500
;
sf
->
improved_quant
=
0
;
sf
->
improved_dct
=
0
;
...
...
@@ -922,26 +922,26 @@ void vp8_set_speed_features(VP8_COMP *cpi)
if
((
cpi
->
ref_frame_flags
&
(
VP8_LAST_FLAG
|
VP8_GOLD_FLAG
))
!=
(
VP8_LAST_FLAG
|
VP8_GOLD_FLAG
))
{
sf
->
thresh_mult
[
THR_
DUAL
_ZEROLG
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARESTLG
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARLG
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
DUAL
_NEWLG
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
COMP
_ZEROLG
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
COMP
_NEARESTLG
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
COMP
_NEARLG
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
COMP
_NEWLG
]
=
INT_MAX
;
}
if
((
cpi
->
ref_frame_flags
&
(
VP8_LAST_FLAG
|
VP8_ALT_FLAG
))
!=
(
VP8_LAST_FLAG
|
VP8_ALT_FLAG
))
{
sf
->
thresh_mult
[
THR_
DUAL
_ZEROLA
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARESTLA
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARLA
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
DUAL
_NEWLA
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
COMP
_ZEROLA
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
COMP
_NEARESTLA
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
COMP
_NEARLA
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
COMP
_NEWLA
]
=
INT_MAX
;
}
if
((
cpi
->
ref_frame_flags
&
(
VP8_GOLD_FLAG
|
VP8_ALT_FLAG
))
!=
(
VP8_GOLD_FLAG
|
VP8_ALT_FLAG
))
{
sf
->
thresh_mult
[
THR_
DUAL
_ZEROGA
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARESTGA
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
DUAL
_NEARGA
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
DUAL
_NEWGA
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
COMP
_ZEROGA
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
COMP
_NEARESTGA
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
COMP
_NEARGA
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_
COMP
_NEWGA
]
=
INT_MAX
;
}
// Slow quant, dct and trellis not worthwhile for first pass
...
...
@@ -1578,8 +1578,8 @@ VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf)
cm
->
prob_last_coded
=
128
;
cm
->
prob_gf_coded
=
128
;
cm
->
prob_intra_coded
=
63
;
for
(
i
=
0
;
i
<
DUAL
_PRED_CONTEXTS
;
i
++
)
cm
->
prob_
dual
pred
[
i
]
=
128
;
for
(
i
=
0
;
i
<
COMP
_PRED_CONTEXTS
;
i
++
)
cm
->
prob_
comp
pred
[
i
]
=
128
;
// Prime the recent reference frame useage counters.
// Hereafter they will be maintained as a sort of moving average
...
...
vp8/encoder/onyx_int.h
View file @
921b1c3c
...
...
@@ -191,21 +191,21 @@ typedef enum
THR_B_PRED
=
19
,
THR_I8X8_PRED
=
20
,
THR_
DUAL
_ZEROLG
=
21
,
THR_
DUAL
_NEARESTLG
=
22
,
THR_
DUAL
_NEARLG
=
23
,
THR_
COMP
_ZEROLG
=
21
,
THR_
COMP
_NEARESTLG
=
22
,
THR_
COMP
_NEARLG
=
23
,
THR_
DUAL
_ZEROLA
=
24
,
THR_
DUAL
_NEARESTLA
=
25
,
THR_
DUAL
_NEARLA
=
26
,
THR_
COMP
_ZEROLA
=
24
,
THR_
COMP
_NEARESTLA
=
25
,
THR_
COMP
_NEARLA
=
26
,
THR_
DUAL
_ZEROGA
=
27
,
THR_
DUAL
_NEARESTGA
=
28
,
THR_
DUAL
_NEARGA
=
29
,
THR_
COMP
_ZEROGA
=
27
,
THR_
COMP
_NEARESTGA
=
28
,
THR_
COMP
_NEARGA
=
29
,
THR_
DUAL
_NEWLG
=
30
,
THR_
DUAL
_NEWLA
=
31
,
THR_
DUAL
_NEWGA
=
32
,
THR_
COMP
_NEWLG
=
30
,
THR_
COMP
_NEWLA
=
31
,
THR_
COMP
_NEWGA
=
32
,
}
THR_MODES
;
...
...
@@ -357,10 +357,10 @@ typedef struct VP8_COMP
int
rd_thresh_mult
[
MAX_MODES
];
int
rd_baseline_thresh
[
MAX_MODES
];
int
rd_threshes
[
MAX_MODES
];
int64_t
rd_single_diff
,
rd_
dual
_diff
,
rd_hybrid_diff
;
int64_t
rd_single_diff
,
rd_
comp
_diff