]> granicus.if.org Git - libvpx/commitdiff
Change the B-frame coding structure.
authorWei-ting Lin <weitinglin@google.com>
Mon, 15 Aug 2016 20:52:18 +0000 (13:52 -0700)
committerWei-ting Lin <weitinglin@google.com>
Tue, 16 Aug 2016 17:52:24 +0000 (10:52 -0700)
Originally we can have a BRF right before an overlay frame (in
display order), which might be unnecessary since we already has a
quality backward reference frame (ARF).
This patch avoids such a coding structure and improves the RD
performance by 0.086% in Avg in the lowres dataset, and 0.153 in
Avg in the midres dataset.

In the lowres dataset, significant gains are obtained for the
following sequences:

mobisode2_240p: 0.563%
keiba_240p: 0.440%
bus_cif: 0.336%
soccer_cif: 0.333%

And the performance drops only in the following four video sequences:

motherdaughter_cif: 0.028%
bqsquare_240p: 0.017%
basketballpass_240p: 0.015%
bowing_cif: 0.006%

Change-Id: Ic94f648ba8e52eb0014933d484fb247610a9ae05

vp10/encoder/firstpass.c

index f705bf8fad66cbcdfe052dbe8a48e17f8cf984fa..317b689422cc0a497fa4e8e9a26831541b97b2a7 100644 (file)
@@ -1725,8 +1725,9 @@ static void allocate_gf_group_bits(VP10_COMP *cpi, int64_t gf_group_bits,
       bipred_frame_index++;
       // Check whether the next bi-predictive frame group would entirely be
       // included within the current golden frame group.
+      // In addition, we need to avoid coding a BRF right before an ARF.
       if (bipred_frame_index == 1 &&
-          (i + 1 + cur_brf_src_offset) >=
+          (i + 2 + cur_brf_src_offset) >=
               (rc->baseline_gf_interval - rc->source_alt_ref_pending)) {
         bipred_group_end = 1;
       }