summaryrefslogtreecommitdiff
path: root/vp8/common/reconinter.c
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2011-01-06 13:07:39 -0500
committerJohn Koleszar <jkoleszar@google.com>2011-01-06 13:07:42 -0500
commit1942eeb8860bd1350e66a250cd684fa7705fb68c (patch)
treeab96148bc9d87b63441e2c72929e8f68bfef569a /vp8/common/reconinter.c
parentb095d9df3c7492e9ba031c4491a0a565f668c9e5 (diff)
downloadlibvpx-1942eeb8860bd1350e66a250cd684fa7705fb68c.tar
libvpx-1942eeb8860bd1350e66a250cd684fa7705fb68c.tar.gz
libvpx-1942eeb8860bd1350e66a250cd684fa7705fb68c.tar.bz2
libvpx-1942eeb8860bd1350e66a250cd684fa7705fb68c.zip
fix last frame buffer copy logic regression
Commit 0ce3901 introduced a change in the frame buffer copy logic where the NEW frame could be copied to the ARF or GF buffer through the copy_buffer_to_{arf,gf}==1 flags, if the LAST frame was not being refreshed. This is not correct. The intent of the copy_buffer_to_{arf,gf}==1 flag is to copy the LAST buffer. To copy the NEW buffer, the refresh_{alt_ref,golden}_frame flag should be used. The original buffer copy logic is fairly convoluted. For example: if (cm->refresh_last_frame) { vp8_swap_yv12_buffer(&cm->last_frame, &cm->new_frame); cm->frame_to_show = &cm->last_frame; } else { cm->frame_to_show = &cm->new_frame; } ... if (cm->copy_buffer_to_arf) { if (cm->copy_buffer_to_arf == 1) { if (cm->refresh_last_frame) vp8_yv12_copy_frame_ptr(&cm->new_frame, &cm->alt_ref_frame); else vp8_yv12_copy_frame_ptr(&cm->last_frame, &cm->alt_ref_frame); } else if (cm->copy_buffer_to_arf == 2) vp8_yv12_copy_frame_ptr(&cm->golden_frame, &cm->alt_ref_frame); } Effectively, if refresh_last_frame, then new and last are swapped, so when "new" is copied to ARF, it's equivalent to copying LAST to ARF. If not refresh_last_frame, then LAST is copied to ARF. So LAST is copied to ARF in both cases. Commit 0ce3901 removed the first buffer swap but kept the refresh_last_frame?new:last behavior, changing the sense since the first swap wasn't done to the more readable refresh_last_frame?last:new, but this logic is not correct when !refresh_last_frame. This commit restores the correct behavior from v0.9.1 and prior. This case is missing from the test vector set. Change-Id: I8369fc13a37ae882e31a8a104da808a08bc8428f
Diffstat (limited to 'vp8/common/reconinter.c')
0 files changed, 0 insertions, 0 deletions