summaryrefslogtreecommitdiff
path: root/vp8/encoder/onyx_if.c
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2011-06-28 17:29:47 +0100
committerPaul Wilkins <paulwilkins@google.com>2011-06-29 18:01:25 +0100
commit11694aab66da9c4a46daac0dc3678b82232a79b9 (patch)
tree31708595bc9f3bb841c615163f6550315e4fd375 /vp8/encoder/onyx_if.c
parent7296b3f9222c6acf26e6f6e8ce11d1d2245c1b68 (diff)
downloadlibvpx-11694aab66da9c4a46daac0dc3678b82232a79b9.tar
libvpx-11694aab66da9c4a46daac0dc3678b82232a79b9.tar.gz
libvpx-11694aab66da9c4a46daac0dc3678b82232a79b9.tar.bz2
libvpx-11694aab66da9c4a46daac0dc3678b82232a79b9.zip
Change to arf boost calculation.
In this commit I have added an experimental function that tests prediction quality either side of a central position to calculate a suggested boost number for an ARF frame. The function is passed an offset from the current position and a number of frames to search forwards and backwards. It returns a forward, backward and compound boost number. The new code can be deactivated using #define NEW_BOOST 0 In its current default state the code searches forwards and backwards from the proposed position of the next alt ref. The the old code used a boost number calculated by scanning forward from the previous GF up to the proposed alt ref frame position. I have also added some code to try and prevent placement of a gf/arf where there is a brief flash. Change-Id: I98af789a5181148659f10dd5dd2ff2d4250cd51c
Diffstat (limited to 'vp8/encoder/onyx_if.c')
-rw-r--r--vp8/encoder/onyx_if.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index a6d7a4304..80f7ae67c 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -2012,7 +2012,8 @@ VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf)
size_t packet_sz = sizeof(FIRSTPASS_STATS);
int packets = oxcf->two_pass_stats_in.sz / packet_sz;
- cpi->twopass.stats_in = oxcf->two_pass_stats_in.buf;
+ cpi->twopass.stats_in_start = oxcf->two_pass_stats_in.buf;
+ cpi->twopass.stats_in = cpi->twopass.stats_in_start;
cpi->twopass.stats_in_end = (void*)((char *)cpi->twopass.stats_in
+ (packets - 1) * packet_sz);
vp8_init_second_pass(cpi);