From a0f77f6acb901c7ab74cc47649a22a6937b3069a Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Tue, 3 Dec 2013 08:38:30 -0800 Subject: [PATCH] Fix VP8 border replication for very small image Also added a test vector for this issue. Change-Id: I8a8654f9d33b27afd53c295f1ea44d198550d067 --- test/test-data.sha1 | 2 ++ test/test.mk | 2 ++ test/test_vector_test.cc | 3 ++- vp8/decoder/decodframe.c | 11 +---------- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/test/test-data.sha1 b/test/test-data.sha1 index bb09b7539..57c7eb3c7 100644 --- a/test/test-data.sha1 +++ b/test/test-data.sha1 @@ -61,6 +61,7 @@ c87599cbecd72d4cd4f7ace3313b7a6bc6eb8163 vp80-05-sharpness-1438.ivf aff51d865c2621b60510459244ea83e958e4baed vp80-05-sharpness-1439.ivf da386e72b19b5485a6af199c5eb60ef25e510dd1 vp80-05-sharpness-1440.ivf 6759a095203d96ccd267ce09b1b050b8cc4c2f1f vp80-05-sharpness-1443.ivf +b95d3cc1d0df991e63e150a801710a72f20d9ba0 vp80-06-smallsize.ivf db55ec7fd02c864ba996ff060b25b1e08611330b vp80-00-comprehensive-001.ivf.md5 29db0ad011cba1e45f856d5623cd38dac3e3bf19 vp80-00-comprehensive-002.ivf.md5 e84f258f69e173e7d68f8f8c037a0a3766902182 vp80-00-comprehensive-003.ivf.md5 @@ -122,6 +123,7 @@ f95eb6214571434f1f73ab7833b9ccdf47588020 vp80-03-segmentation-1437.ivf.md5 086c56378df81b6cee264d7540a7b8f2b405c7a4 vp80-05-sharpness-1439.ivf.md5 d32dc2c4165eb266ea4c23c14a45459b363def32 vp80-05-sharpness-1440.ivf.md5 8c69dc3d8e563f56ffab5ad1e400d9e689dd23df vp80-05-sharpness-1443.ivf.md5 +d6f246df012c241b5fa6c1345019a3703d85c419 vp80-06-smallsize.ivf.md5 ce881e567fe1d0fbcb2d3e9e6281a1a8d74d82e0 vp90-2-00-quantizer-00.webm ac5eda33407d0521c7afca43a63fd305c0cd9d13 vp90-2-00-quantizer-00.webm.md5 2ca0463f2cfb93d25d7dded174db70b7cb87cb48 vp90-2-00-quantizer-01.webm diff --git a/test/test.mk b/test/test.mk index 4f877f48f..8fd2d2f85 100644 --- a/test/test.mk +++ b/test/test.mk @@ -175,6 +175,7 @@ LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1438.ivf LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1439.ivf LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1440.ivf LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1443.ivf +LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-06-smallsize.ivf LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-001.ivf.md5 LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-002.ivf.md5 LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-003.ivf.md5 @@ -236,6 +237,7 @@ LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1438.ivf.md5 LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1439.ivf.md5 LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1440.ivf.md5 LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1443.ivf.md5 +LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-06-smallsize.ivf.md5 LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-00.webm LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-00.webm.md5 LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-01.webm diff --git a/test/test_vector_test.cc b/test/test_vector_test.cc index 433242037..b85c719cf 100644 --- a/test/test_vector_test.cc +++ b/test/test_vector_test.cc @@ -55,7 +55,8 @@ const char *kVP8TestVectors[] = { "vp80-05-sharpness-1430.ivf", "vp80-05-sharpness-1431.ivf", "vp80-05-sharpness-1433.ivf", "vp80-05-sharpness-1434.ivf", "vp80-05-sharpness-1438.ivf", "vp80-05-sharpness-1439.ivf", - "vp80-05-sharpness-1440.ivf", "vp80-05-sharpness-1443.ivf" + "vp80-05-sharpness-1440.ivf", "vp80-05-sharpness-1443.ivf", + "vp80-06-smallsize.ivf" }; #endif #if CONFIG_VP9_DECODER diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c index 16da78a2c..bfde59962 100644 --- a/vp8/decoder/decodframe.c +++ b/vp8/decoder/decodframe.c @@ -680,7 +680,6 @@ static void decode_mb_rows(VP8D_COMP *pbi) vp8_loop_filter_row_simple(pc, lf_mic, mb_row-1, recon_y_stride, recon_uv_stride, lf_dst[0], lf_dst[1], lf_dst[2]); - if(mb_row > 1) { yv12_extend_frame_left_right_c(yv12_fb_new, @@ -691,10 +690,6 @@ static void decode_mb_rows(VP8D_COMP *pbi) eb_dst[0] += recon_y_stride * 16; eb_dst[1] += recon_uv_stride * 8; eb_dst[2] += recon_uv_stride * 8; - - if(mb_row == 2) - yv12_extend_frame_top_c(yv12_fb_new); - } lf_dst[0] += recon_y_stride * 16; @@ -713,13 +708,9 @@ static void decode_mb_rows(VP8D_COMP *pbi) eb_dst[0], eb_dst[1], eb_dst[2]); - eb_dst[0] += recon_y_stride * 16; eb_dst[1] += recon_uv_stride * 8; eb_dst[2] += recon_uv_stride * 8; - - if(mb_row == 1) - yv12_extend_frame_top_c(yv12_fb_new); } } } @@ -747,7 +738,7 @@ static void decode_mb_rows(VP8D_COMP *pbi) eb_dst[0], eb_dst[1], eb_dst[2]); - + yv12_extend_frame_top_c(yv12_fb_new); yv12_extend_frame_bottom_c(yv12_fb_new); }