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
71618e54
Commit
71618e54
authored
Jun 11, 2012
by
John Koleszar
Committed by
Gerrit Code Review
Jun 11, 2012
Browse files
Merge "Reset Q for key frame when spatial resizing occurs."
parents
118b9931
baedcedc
Changes
2
Hide whitespace changes
Inline
Side-by-side
vp8/encoder/onyx_if.c
View file @
71618e54
...
...
@@ -1650,6 +1650,7 @@ void vp8_change_config(VP8_COMP *cpi, VP8_CONFIG *oxcf)
cm
->
yv12_fb
[
cm
->
lst_fb_idx
].
y_height
||
cm
->
yv12_fb
[
cm
->
lst_fb_idx
].
y_width
==
0
)
{
dealloc_raw_frame_buffers
(
cpi
);
alloc_raw_frame_buffers
(
cpi
);
vp8_alloc_compressor_data
(
cpi
);
}
...
...
@@ -2612,7 +2613,7 @@ static void scale_and_extend_source(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi)
}
static
void
resize_key_frame
(
VP8_COMP
*
cpi
)
static
int
resize_key_frame
(
VP8_COMP
*
cpi
)
{
#if CONFIG_SPATIAL_RESAMPLING
VP8_COMMON
*
cm
=
&
cpi
->
common
;
...
...
@@ -2653,10 +2654,12 @@ static void resize_key_frame(VP8_COMP *cpi)
cm
->
Height
=
new_height
;
vp8_alloc_compressor_data
(
cpi
);
scale_and_extend_source
(
cpi
->
un_scaled_source
,
cpi
);
return
1
;
}
}
#endif
return
0
;
}
...
...
@@ -3812,7 +3815,17 @@ static void encode_frame_to_data_rate
if
(
cm
->
frame_type
==
KEY_FRAME
)
{
resize_key_frame
(
cpi
);
if
(
resize_key_frame
(
cpi
))
{
/* If the frame size has changed, need to reset Q, quantizer,
* and background refresh.
*/
Q
=
vp8_regulate_q
(
cpi
,
cpi
->
this_frame_target
);
if
(
cpi
->
cyclic_refresh_mode_enabled
&&
(
cpi
->
current_layer
==
0
))
cyclic_background_refresh
(
cpi
,
Q
,
0
);
vp8_set_quantizer
(
cpi
,
Q
);
}
vp8_setup_key_frame
(
cpi
);
}
...
...
vp8/encoder/rdopt.c
View file @
71618e54
...
...
@@ -1965,6 +1965,11 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
int
intra_rd_penalty
=
10
*
vp8_dc_quant
(
cpi
->
common
.
base_qindex
,
cpi
->
common
.
y1dc_delta_q
);
#if CONFIG_TEMPORAL_DENOISING
unsigned
int
zero_mv_sse
=
INT_MAX
,
best_sse
=
INT_MAX
,
best_rd_sse
=
INT_MAX
;
#endif
#if CONFIG_TEMPORAL_DENOISING
unsigned
int
zero_mv_sse
=
INT_MAX
,
best_sse
=
INT_MAX
,
best_rd_sse
=
INT_MAX
;
...
...
Write
Preview
Supports
Markdown
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