Commit c670e82f authored by Zoe Liu's avatar Zoe Liu

A temporary fix on the RAM issue for upsampled referencing

When ext-refs is on, the encoding of HD videos, e.g. 1080p sequences
will cause the failure to allocate up-sampled frame buffers. This CL
temporarily turn off the use of upsampled references when ext-refs is
on for any video resolution larger than 720 in either dimension. A
more effective scheme for up-sampled referencing should be later
considered.

With the fix, the AWCY performance gains of ext-refs, vs baseline are:

PSNR Y
Average -2.55%
1080p   -2.81%
360p    -2.38%
720p    -3.10%

Change-Id: Ica5e75d82190cd68e64c536503e3559f1cfdbdd1
parent 71e87847
......@@ -448,13 +448,26 @@ void av1_set_speed_features_framesize_dependent(AV1_COMP *cpi) {
RD_OPT *const rd = &cpi->rd;
int i;
// Limit memory usage for high resolutions
if (AOMMIN(cm->width, cm->height) > 1080) {
// Limit memory usage for high resolutions
#if CONFIG_EXT_REFS
// TODO(zoeliu): Temporary solution to resolve the insufficient RAM issue for
// ext-refs. Need to work with @yunqingwang to have a more
// effective solution.
if (AOMMIN(cm->width, cm->height) > 720) {
// Turn off the use of upsampled references for HD resolution
sf->use_upsampled_references = 0;
} else if ((AOMMIN(cm->width, cm->height) > 540) &&
(oxcf->profile != PROFILE_0)) {
sf->use_upsampled_references = 0;
}
if ((AOMMIN(cm->width, cm->height) > 720) && (oxcf->profile != PROFILE_0)) {
#else
if (AOMMIN(cm->width, cm->height) > 1080) {
sf->use_upsampled_references = 0;
} else if ((AOMMIN(cm->width, cm->height) > 720) &&
(oxcf->profile != PROFILE_0)) {
sf->use_upsampled_references = 0;
}
#endif // CONFIG_EXT_REFS
if (oxcf->mode == REALTIME) {
set_rt_speed_feature_framesize_dependent(cpi, sf, oxcf->speed);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment