summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README1
-rw-r--r--build/make/configure.sh8
-rwxr-xr-xconfigure1
-rw-r--r--vp9/encoder/vp9_encoder.c8
-rw-r--r--vp9/encoder/vp9_ratectrl.c38
-rw-r--r--vp9/encoder/vp9_ratectrl.h2
6 files changed, 35 insertions, 23 deletions
diff --git a/README b/README
index fd3337daa..45beda714 100644
--- a/README
+++ b/README
@@ -112,6 +112,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
x86_64-darwin16-gcc
x86_64-darwin17-gcc
x86_64-darwin18-gcc
+ x86_64-darwin19-gcc
x86_64-iphonesimulator-gcc
x86_64-linux-gcc
x86_64-linux-icc
diff --git a/build/make/configure.sh b/build/make/configure.sh
index d05d0fa12..206b54f77 100644
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -767,9 +767,9 @@ process_common_toolchain() {
# detect tgt_os
case "$gcctarget" in
- *darwin1[0-8]*)
+ *darwin1[0-9]*)
tgt_isa=x86_64
- tgt_os=`echo $gcctarget | sed 's/.*\(darwin1[0-8]\).*/\1/'`
+ tgt_os=`echo $gcctarget | sed 's/.*\(darwin1[0-9]\).*/\1/'`
;;
x86_64*mingw32*)
tgt_os=win64
@@ -907,6 +907,10 @@ process_common_toolchain() {
add_cflags "-mmacosx-version-min=10.14"
add_ldflags "-mmacosx-version-min=10.14"
;;
+ *-darwin19-*)
+ add_cflags "-mmacosx-version-min=10.15"
+ add_ldflags "-mmacosx-version-min=10.15"
+ ;;
*-iphonesimulator-*)
add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
add_ldflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
diff --git a/configure b/configure
index f470cbe85..41c3c6fca 100755
--- a/configure
+++ b/configure
@@ -149,6 +149,7 @@ all_platforms="${all_platforms} x86_64-darwin15-gcc"
all_platforms="${all_platforms} x86_64-darwin16-gcc"
all_platforms="${all_platforms} x86_64-darwin17-gcc"
all_platforms="${all_platforms} x86_64-darwin18-gcc"
+all_platforms="${all_platforms} x86_64-darwin19-gcc"
all_platforms="${all_platforms} x86_64-iphonesimulator-gcc"
all_platforms="${all_platforms} x86_64-linux-gcc"
all_platforms="${all_platforms} x86_64-linux-icc"
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index a5eeeaa23..b15d5f59c 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -5363,6 +5363,14 @@ static void encode_frame_to_data_rate(
vp9_rc_postencode_update(cpi, *size);
+ if (oxcf->pass == 0 && !frame_is_intra_only(cm) &&
+ (!cpi->use_svc ||
+ (cpi->use_svc &&
+ !cpi->svc.layer_context[cpi->svc.temporal_layer_id].is_key_frame &&
+ cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1))) {
+ vp9_compute_frame_low_motion(cpi);
+ }
+
*size = VPXMAX(1, *size);
#if 0
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index df4a07212..ef64cc6c5 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1787,8 +1787,9 @@ static void update_altref_usage(VP9_COMP *const cpi) {
}
}
-static void compute_frame_low_motion(VP9_COMP *const cpi) {
+void vp9_compute_frame_low_motion(VP9_COMP *const cpi) {
VP9_COMMON *const cm = &cpi->common;
+ SVC *const svc = &cpi->svc;
int mi_row, mi_col;
MODE_INFO **mi = cm->mi_grid_visible;
RATE_CONTROL *const rc = &cpi->rc;
@@ -1805,6 +1806,19 @@ static void compute_frame_low_motion(VP9_COMP *const cpi) {
}
cnt_zeromv = 100 * cnt_zeromv / (rows * cols);
rc->avg_frame_low_motion = (3 * rc->avg_frame_low_motion + cnt_zeromv) >> 2;
+
+ // For SVC: set avg_frame_low_motion (only computed on top spatial layer)
+ // to all lower spatial layers.
+ if (cpi->use_svc && svc->spatial_layer_id == svc->number_spatial_layers - 1) {
+ int i;
+ for (i = 0; i < svc->number_spatial_layers - 1; ++i) {
+ const int layer = LAYER_IDS_TO_IDX(i, svc->temporal_layer_id,
+ svc->number_temporal_layers);
+ LAYER_CONTEXT *const lc = &svc->layer_context[layer];
+ RATE_CONTROL *const lrc = &lc->rc;
+ lrc->avg_frame_low_motion = rc->avg_frame_low_motion;
+ }
+ }
}
void vp9_rc_postencode_update(VP9_COMP *cpi, uint64_t bytes_used) {
@@ -1948,29 +1962,11 @@ void vp9_rc_postencode_update(VP9_COMP *cpi, uint64_t bytes_used) {
}
if (oxcf->pass == 0) {
- if (!frame_is_intra_only(cm) &&
- (!cpi->use_svc ||
- (cpi->use_svc &&
- !svc->layer_context[svc->temporal_layer_id].is_key_frame &&
- svc->spatial_layer_id == svc->number_spatial_layers - 1))) {
- compute_frame_low_motion(cpi);
+ if (!frame_is_intra_only(cm))
if (cpi->sf.use_altref_onepass) update_altref_usage(cpi);
- }
- // For SVC: set avg_frame_low_motion (only computed on top spatial layer)
- // to all lower spatial layers.
- if (cpi->use_svc &&
- svc->spatial_layer_id == svc->number_spatial_layers - 1) {
- int i;
- for (i = 0; i < svc->number_spatial_layers - 1; ++i) {
- const int layer = LAYER_IDS_TO_IDX(i, svc->temporal_layer_id,
- svc->number_temporal_layers);
- LAYER_CONTEXT *const lc = &svc->layer_context[layer];
- RATE_CONTROL *const lrc = &lc->rc;
- lrc->avg_frame_low_motion = rc->avg_frame_low_motion;
- }
- }
cpi->rc.last_frame_is_src_altref = cpi->rc.is_src_frame_alt_ref;
}
+
if (!frame_is_intra_only(cm)) rc->reset_high_source_sad = 0;
rc->last_avg_frame_bandwidth = rc->avg_frame_bandwidth;
diff --git a/vp9/encoder/vp9_ratectrl.h b/vp9/encoder/vp9_ratectrl.h
index 1fb8dae39..fa070f9be 100644
--- a/vp9/encoder/vp9_ratectrl.h
+++ b/vp9/encoder/vp9_ratectrl.h
@@ -330,6 +330,8 @@ void vp9_configure_buffer_updates(struct VP9_COMP *cpi, int gf_group_index);
void vp9_estimate_qp_gop(struct VP9_COMP *cpi);
+void vp9_compute_frame_low_motion(struct VP9_COMP *const cpi);
+
#ifdef __cplusplus
} // extern "C"
#endif