From 43464e94edf3c6cb5792d5c2addb7e0ce1604d4c Mon Sep 17 00:00:00 2001 From: Attila Nagy Date: Wed, 20 Apr 2011 15:12:23 +0300 Subject: Do not copy data between encoder reference buffers. Golden and ALT reference buffers were refreshed by copying from the new buffer. Replaced this by index manipulation. Also moved all the reference frame updates to one function for easier tracking. Change-Id: Icd3e534e7e2c8c5567168d222e6a64a96aae24a1 --- vp8/common/alloccommon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vp8/common/alloccommon.c') diff --git a/vp8/common/alloccommon.c b/vp8/common/alloccommon.c index edef36094..a1944ebda 100644 --- a/vp8/common/alloccommon.c +++ b/vp8/common/alloccommon.c @@ -65,9 +65,9 @@ int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height) for (i = 0; i < NUM_YV12_BUFFERS; i++) { - oci->fb_idx_ref_cnt[0] = 0; - - if (vp8_yv12_alloc_frame_buffer(&oci->yv12_fb[i], width, height, VP8BORDERINPIXELS) < 0) + oci->fb_idx_ref_cnt[0] = 0; + oci->yv12_fb[i].flags = 0; + if (vp8_yv12_alloc_frame_buffer(&oci->yv12_fb[i], width, height, VP8BORDERINPIXELS) < 0) { vp8_de_alloc_frame_buffers(oci); return 1; -- cgit v1.2.3