Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
libvpx
Commits
4ab01fb5
Commit
4ab01fb5
authored
11 years ago
by
Dmitry Kovalev
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Reusing FRAME_CONTEXT struct to simplify the code."
parents
b3d3578e
bd9c0574
v1.14.0-linphone
1.4.X
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
forest
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
mcw
mcw2
nextgen
nextgenv2
pcs-2013
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/debargha/playground
sandbox/hkuang/frame_parallel
sandbox/hkuang@google.com/decode
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jzern@google.com/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
v1.9.0
v1.9.0-rc1
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.1
v1.6.0
v1.5.0
v1.4.0
v1.3.0
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vp9/encoder/vp9_onyx_int.h
+1
-18
vp9/encoder/vp9_onyx_int.h
vp9/encoder/vp9_ratectrl.c
+2
-34
vp9/encoder/vp9_ratectrl.c
with
3 additions
and
52 deletions
vp9/encoder/vp9_onyx_int.h
+
1
−
18
View file @
4ab01fb5
...
...
@@ -61,16 +61,11 @@
#define INTRA_ZBIN_BOOST 0
typedef
struct
{
nmv_context
nmvc
;
int
nmvjointcost
[
MV_JOINTS
];
int
nmvcosts
[
2
][
MV_VALS
];
int
nmvcosts_hp
[
2
][
MV_VALS
];
vp9_prob
segment_pred_probs
[
PREDICTION_PROBS
];
vp9_prob
intra_inter_prob
[
INTRA_INTER_CONTEXTS
];
vp9_prob
comp_inter_prob
[
COMP_INTER_CONTEXTS
];
vp9_prob
single_ref_prob
[
REF_CONTEXTS
][
2
];
vp9_prob
comp_ref_prob
[
REF_CONTEXTS
];
unsigned
char
*
last_frame_seg_map_copy
;
...
...
@@ -79,20 +74,8 @@ typedef struct {
// 0 = ZERO_MV, MV
signed
char
last_mode_lf_deltas
[
MAX_MODE_LF_DELTAS
];
vp9_coeff_probs_model
coef_probs
[
TX_SIZES
][
BLOCK_TYPES
];
vp9_prob
y_mode_prob
[
4
][
INTRA_MODES
-
1
];
vp9_prob
uv_mode_prob
[
INTRA_MODES
][
INTRA_MODES
-
1
];
vp9_prob
partition_prob
[
2
][
NUM_PARTITION_CONTEXTS
][
PARTITION_TYPES
-
1
];
vp9_prob
switchable_interp_prob
[
SWITCHABLE_FILTERS
+
1
]
[
SWITCHABLE_FILTERS
-
1
];
int
inter_mode_counts
[
INTER_MODE_CONTEXTS
][
INTER_MODES
-
1
][
2
];
vp9_prob
inter_mode_probs
[
INTER_MODE_CONTEXTS
][
INTER_MODES
-
1
];
struct
tx_probs
tx_probs
;
vp9_prob
mbskip_probs
[
MBSKIP_CONTEXTS
];
FRAME_CONTEXT
fc
;
}
CODING_CONTEXT
;
typedef
struct
{
...
...
This diff is collapsed.
Click to expand it.
vp9/encoder/vp9_ratectrl.c
+
2
−
34
View file @
4ab01fb5
...
...
@@ -76,35 +76,19 @@ void vp9_save_coding_context(VP9_COMP *cpi) {
// restored with a call to vp9_restore_coding_context. These functions are
// intended for use in a re-code loop in vp9_compress_frame where the
// quantizer value is adjusted between loop iterations.
cc
->
nmvc
=
cm
->
fc
.
nmvc
;
vp9_copy
(
cc
->
nmvjointcost
,
cpi
->
mb
.
nmvjointcost
);
vp9_copy
(
cc
->
nmvcosts
,
cpi
->
mb
.
nmvcosts
);
vp9_copy
(
cc
->
nmvcosts_hp
,
cpi
->
mb
.
nmvcosts_hp
);
vp9_copy
(
cc
->
inter_mode_probs
,
cm
->
fc
.
inter_mode_probs
);
vp9_copy
(
cc
->
y_mode_prob
,
cm
->
fc
.
y_mode_prob
);
vp9_copy
(
cc
->
uv_mode_prob
,
cm
->
fc
.
uv_mode_prob
);
vp9_copy
(
cc
->
partition_prob
,
cm
->
fc
.
partition_prob
);
vp9_copy
(
cc
->
segment_pred_probs
,
cm
->
seg
.
pred_probs
);
vp9_copy
(
cc
->
intra_inter_prob
,
cm
->
fc
.
intra_inter_prob
);
vp9_copy
(
cc
->
comp_inter_prob
,
cm
->
fc
.
comp_inter_prob
);
vp9_copy
(
cc
->
single_ref_prob
,
cm
->
fc
.
single_ref_prob
);
vp9_copy
(
cc
->
comp_ref_prob
,
cm
->
fc
.
comp_ref_prob
);
vpx_memcpy
(
cpi
->
coding_context
.
last_frame_seg_map_copy
,
cm
->
last_frame_seg_map
,
(
cm
->
mi_rows
*
cm
->
mi_cols
));
vp9_copy
(
cc
->
last_ref_lf_deltas
,
cm
->
lf
.
last_ref_deltas
);
vp9_copy
(
cc
->
last_mode_lf_deltas
,
cm
->
lf
.
last_mode_deltas
);
vp9_copy
(
cc
->
coef_probs
,
cm
->
fc
.
coef_probs
);
vp9_copy
(
cc
->
switchable_interp_prob
,
cm
->
fc
.
switchable_interp_prob
);
cc
->
tx_probs
=
cm
->
fc
.
tx_probs
;
vp9_copy
(
cc
->
mbskip_probs
,
cm
->
fc
.
mbskip_probs
);
cc
->
fc
=
cm
->
fc
;
}
void
vp9_restore_coding_context
(
VP9_COMP
*
cpi
)
{
...
...
@@ -113,25 +97,12 @@ void vp9_restore_coding_context(VP9_COMP *cpi) {
// Restore key state variables to the snapshot state stored in the
// previous call to vp9_save_coding_context.
cm
->
fc
.
nmvc
=
cc
->
nmvc
;
vp9_copy
(
cpi
->
mb
.
nmvjointcost
,
cc
->
nmvjointcost
);
vp9_copy
(
cpi
->
mb
.
nmvcosts
,
cc
->
nmvcosts
);
vp9_copy
(
cpi
->
mb
.
nmvcosts_hp
,
cc
->
nmvcosts_hp
);
vp9_copy
(
cm
->
fc
.
inter_mode_probs
,
cc
->
inter_mode_probs
);
vp9_copy
(
cm
->
fc
.
y_mode_prob
,
cc
->
y_mode_prob
);
vp9_copy
(
cm
->
fc
.
uv_mode_prob
,
cc
->
uv_mode_prob
);
vp9_copy
(
cm
->
fc
.
partition_prob
,
cc
->
partition_prob
);
vp9_copy
(
cm
->
seg
.
pred_probs
,
cc
->
segment_pred_probs
);
vp9_copy
(
cm
->
fc
.
intra_inter_prob
,
cc
->
intra_inter_prob
);
vp9_copy
(
cm
->
fc
.
comp_inter_prob
,
cc
->
comp_inter_prob
);
vp9_copy
(
cm
->
fc
.
single_ref_prob
,
cc
->
single_ref_prob
);
vp9_copy
(
cm
->
fc
.
comp_ref_prob
,
cc
->
comp_ref_prob
);
vpx_memcpy
(
cm
->
last_frame_seg_map
,
cpi
->
coding_context
.
last_frame_seg_map_copy
,
(
cm
->
mi_rows
*
cm
->
mi_cols
));
...
...
@@ -139,10 +110,7 @@ void vp9_restore_coding_context(VP9_COMP *cpi) {
vp9_copy
(
cm
->
lf
.
last_ref_deltas
,
cc
->
last_ref_lf_deltas
);
vp9_copy
(
cm
->
lf
.
last_mode_deltas
,
cc
->
last_mode_lf_deltas
);
vp9_copy
(
cm
->
fc
.
coef_probs
,
cc
->
coef_probs
);
vp9_copy
(
cm
->
fc
.
switchable_interp_prob
,
cc
->
switchable_interp_prob
);
cm
->
fc
.
tx_probs
=
cc
->
tx_probs
;
vp9_copy
(
cm
->
fc
.
mbskip_probs
,
cc
->
mbskip_probs
);
cm
->
fc
=
cc
->
fc
;
}
void
vp9_setup_key_frame
(
VP9_COMP
*
cpi
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets