ref: 0aa2af55b5646ffc37d00714226997df13253534
parent: 6ce515b9ff9000740bc47bb2dfa1b80df6ec2fc9
author: Alexander Voronov <[email protected]>
date: Mon Jul 14 12:36:21 EDT 2014
Fix show_existing_frame not decreasing frame buffer ref counter. The issue was introduced by commit g7c43fb6. If current frame is repeated from existing-ref pool, frame buffer ref counter is not decreased, so buffer isn't released. Decoder fails being unable to allocate new frame buffer at some point. Added a test vector to verify that the condition will not recur later. Test vector was generated by the code in this patch: https://gerrit.chromium.org/gerrit/#/c/70862/ Change-Id: I8af96eb5b9670176e01a281d2e18bd458712cf78
--- a/test/test-data.sha1
+++ b/test/test-data.sha1
@@ -655,6 +655,8 @@
8f46ba5f785d0c2170591a153e0d0d146a7c8090 vp90-2-15-segkey_adpq.webm.md5
698a6910a97486b833073ef0c0b18d75dce57ee8 vp90-2-16-intra-only.webm
5661b0168752969f055eec37b05fa9fa947dc7eb vp90-2-16-intra-only.webm.md5
+c01bb7938f9a9f25e0c37afdec2f2fb73b6cc7fa vp90-2-17-show-existing-frame.webm
+cc75f351818b9a619818f5cc77b9bc013d0c1e11 vp90-2-17-show-existing-frame.webm.md5
0321d507ce62dedc8a51b4e9011f7a19aed9c3dc vp91-2-04-yuv444.webm
367e423dd41fdb49aa028574a2cfec5c2f325c5c vp91-2-04-yuv444.webm.md5
76024eb753cdac6a5e5703aaea189d35c3c30ac7 invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.ivf
--- a/test/test.mk
+++ b/test/test.mk
@@ -773,6 +773,8 @@
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-15-segkey_adpq.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-16-intra-only.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-16-intra-only.webm.md5
+LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-17-show-existing-frame.webm
+LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-17-show-existing-frame.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yuv444.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yuv444.webm.md5
--- a/test/test_vectors.cc
+++ b/test/test_vectors.cc
@@ -180,7 +180,7 @@
"vp90-2-14-resize-fp-tiles-8-16.webm", "vp90-2-14-resize-fp-tiles-8-1.webm",
"vp90-2-14-resize-fp-tiles-8-2.webm", "vp90-2-14-resize-fp-tiles-8-4.webm",
"vp90-2-15-segkey.webm", "vp90-2-15-segkey_adpq.webm",
- "vp90-2-16-intra-only.webm",
+ "vp90-2-16-intra-only.webm", "vp90-2-17-show-existing-frame.webm",
"vp91-2-04-yuv444.webm",
};
const int kNumVP9TestVectors = NELEMENTS(kVP9TestVectors);
--- a/vp9/decoder/vp9_decoder.c
+++ b/vp9/decoder/vp9_decoder.c
@@ -268,10 +268,7 @@
vp9_decode_frame(pbi, source, source + size, psource);
- if (!cm->show_existing_frame)
- swap_frame_buffers(pbi);
- else
- cm->frame_to_show = get_frame_new_buffer(cm);
+ swap_frame_buffers(pbi);
vp9_clear_system_state();