ref: 30c22d842cffc737de00388af972110b89b1547c
parent: ae7d53202e70b943c3a2abe928bfe8233a6c355a
author: Jingning Han <[email protected]>
date: Tue Aug 28 06:52:32 EDT 2018
Structure the multi-layer ARF locations Fine tune the multi-layer ARF location decisions. Support deeper layer structure. Change-Id: I3e44cf52b6813f6267bcd7266f9aa1b7ded57f8e
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2335,11 +2335,11 @@
static void find_arf_order(GF_GROUP *gf_group, int *layer_depth,
int *index_counter, int depth, int start, int end) {
- const int mid = (start + end + 1) >> 1;
+ const int mid = (start + end) >> 1;
const int min_frame_interval = 3;
// Process regular P frames
- if (end - start <= min_frame_interval) {
+ if (end - start < min_frame_interval) {
int idx;
for (idx = start; idx < end; ++idx) {
gf_group->update_type[*index_counter] = LF_UPDATE;
@@ -2350,7 +2350,7 @@
return;
}
- assert(abs(mid - start) > 1 && abs(mid - end) > 1);
+ assert(abs(mid - start) >= 1 && abs(mid - end) >= 1);
// Process ARF frame
layer_depth[*index_counter] = depth;