From 19b4dead256d9da8cddef2f7792a58ce9b3cbb85 Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 23 Mar 2015 16:07:21 -0700 Subject: [PATCH 1/5] vp8cx.h: vpx/vpx_encoder.h -> ./vpx_encoder.h this matches the other includes and simplifies include paths in builds from source (cherry picked from commit 7999c07697740387a48783de1902a1f465dabeb0) Change-Id: I344902c84f688ef93c9f3a53e7c06c30db49d8d3 --- vpx/vp8cx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpx/vp8cx.h b/vpx/vp8cx.h index fc83ce667..60b588f0e 100644 --- a/vpx/vp8cx.h +++ b/vpx/vp8cx.h @@ -16,7 +16,7 @@ * @{ */ #include "./vp8.h" -#include "vpx/vpx_encoder.h" +#include "./vpx_encoder.h" /*!\file * \brief Provides definitions for using VP8 or VP9 encoder algorithm within the From bb5a39c1a7ff4544c55a29c2ad34c5d391acb713 Mon Sep 17 00:00:00 2001 From: Johann Date: Mon, 23 Mar 2015 15:33:17 -0700 Subject: [PATCH 2/5] Prepare Release Candidate for libvpx v1.4.0 Change-Id: I9ffd30c88a5e40c555bde1f5efcf8a3c9ffcf5ff --- .mailmap | 20 ++++++++++++++------ AUTHORS | 29 +++++++++++++++++++++++++++-- CHANGELOG | 20 ++++++++++++++++++++ README | 5 ++++- build/make/Makefile | 4 ++-- libs.mk | 14 ++++++++------ 6 files changed, 75 insertions(+), 17 deletions(-) diff --git a/.mailmap b/.mailmap index fb82a24e3..0bfda120f 100644 --- a/.mailmap +++ b/.mailmap @@ -1,18 +1,26 @@ Adrian Grange +Alex Converse Alexis Ballier +Alpha Lam +Deb Mukherjee +Erik Niemeyer +Guillaume Martres Hangyu Kuang Jim Bankoski -John Koleszar Johann Koenig Johann Koenig -Johann Koenig +John Koleszar +Joshua Litt +Marco Paniconi +Marco Paniconi Pascal Massimino +Paul Wilkins +Ralph Giles +Ralph Giles Sami Pietilä +Tamar Levy +Tamar Levy Tero Rintaluoma Timothy B. Terriberry Tim Terriberry Tom Finegan -Ralph Giles -Ralph Giles -Alpha Lam -Deb Mukherjee Yaowu Xu diff --git a/AUTHORS b/AUTHORS index a9aa48106..2f63d7c5a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -3,10 +3,11 @@ Aaron Watry Abo Talib Mahfoodh +Adam Xu Adrian Grange Ahmad Sharif Alexander Voronov -Alex Converse +Alex Converse Alexis Ballier Alok Ahuja Alpha Lam @@ -14,44 +15,58 @@ A.Mahfoodh Ami Fischman Andoni Morales Alastruey Andres Mejia +Andrew Russell Aron Rosenberg Attila Nagy changjun.yang +Charles 'Buck' Krasic chm Christian Duvivier Daniel Kang Deb Mukherjee +Dim Temp Dmitry Kovalev Dragan Mrdjan -Erik Niemeyer +Ehsan Akhgari +Erik Niemeyer Fabio Pedretti Frank Galligan Fredrik Söderquist Fritz Koenig Gaute Strokkenes Giuseppe Scrivano +Gordana Cmiljanovic Guillaume Martres Guillermo Ballester Valor Hangyu Kuang +Hanno Böck Henrik Lundin Hui Su Ivan Maltz +Jacek Caban +JackyChen James Berry +James Yu James Zern +Jan Gerber Jan Kratochvil Janne Salonen Jeff Faust Jeff Muizelaar Jeff Petkau +Jia Jia Jim Bankoski Jingning Han +Joey Parrish Johann Koenig John Koleszar +John Stark Joshua Bleecher Snyder Joshua Litt Justin Clift Justin Lebar KO Myung-Hun +Lawrence Velázquez Lou Quillio Luca Barbato Makoto Kato @@ -65,6 +80,7 @@ Michael Kohler Mike Frysinger Mike Hommey Mikhal Shemer +Minghai Shang Morton Jonuschat Parag Salasakar Pascal Massimino @@ -72,6 +88,8 @@ Patrik Westin Paul Wilkins Pavol Rusnak Paweł Hajdan +Pengchong Jin +Peter de Rivaz Philip Jägenstedt Priit Laes Rafael Ávila de Espíndola @@ -79,22 +97,29 @@ Rafaël Carré Ralph Giles Rob Bradford Ronald S. Bultje +Rui Ueyama Sami Pietilä Scott Graham Scott LaVarnway +Sean McGovern +Sergey Ulanov Shimon Doodkin Stefan Holmer Suman Sunkara Taekhyun Kim Takanori MATSUURA Tamar Levy +Tao Bai Tero Rintaluoma Thijs Vermeir +Tim Kopp Timothy B. Terriberry Tom Finegan Vignesh Venkatasubramanian Yaowu Xu +Yongzhe Wang Yunqing Wang +Zoe Liu Google Inc. The Mozilla Foundation The Xiph.Org Foundation diff --git a/CHANGELOG b/CHANGELOG index 97c9a7bd3..6ba1f6c9e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,23 @@ +2015-03-23 v1.4.0 "Indian Runner Duck" + This release includes significant improvements to the VP9 codec. + + - Upgrading: + This release is ABI incompatible with 1.3.0. It drops the compatibility + layer, requiring VPX_IMG_FMT_* instead of IMG_FMT_*, and adds several codec + controls for VP9. + + - Enhancements: + Faster VP9 encoding and decoding + Multithreaded VP9 decoding (tile and frame-based) + Multithreaded VP9 encoding - on by default + YUV 4:2:2 and 4:4:4 support in VP9 + 10 and 12bit support in VP9 + 64bit ARM support by replacing ARM assembly with intrinsics + + - Bug Fixes: + Fixes a VP9 bitstream issue in Profile 1. This only affected non-YUV 4:2:0 + files. + 2013-11-15 v1.3.0 "Forest" This release introduces the VP9 codec in a backward-compatible way. All existing users of VP8 can continue to use the library without diff --git a/README b/README index 584a34437..4aab1321c 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -README - 30 May 2014 +README - 23 March 2015 Welcome to the WebM VP8/VP9 Codec SDK! @@ -78,6 +78,7 @@ COMPILING THE APPLICATIONS/LIBRARIES: x86-darwin11-gcc x86-darwin12-gcc x86-darwin13-gcc + x86-darwin14-gcc x86-iphonesimulator-gcc x86-linux-gcc x86-linux-icc @@ -95,6 +96,7 @@ COMPILING THE APPLICATIONS/LIBRARIES: x86_64-darwin11-gcc x86_64-darwin12-gcc x86_64-darwin13-gcc + x86_64-darwin14-gcc x86_64-iphonesimulator-gcc x86_64-linux-gcc x86_64-linux-icc @@ -111,6 +113,7 @@ COMPILING THE APPLICATIONS/LIBRARIES: universal-darwin11-gcc universal-darwin12-gcc universal-darwin13-gcc + universal-darwin14-gcc generic-gnu The generic-gnu target, in conjunction with the CROSS environment variable, diff --git a/build/make/Makefile b/build/make/Makefile index e048e9cc8..fc7749a55 100644 --- a/build/make/Makefile +++ b/build/make/Makefile @@ -383,8 +383,8 @@ LIBS=$(call enabled,LIBS) .libs: $(LIBS) @touch $@ $(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib)))) -$(foreach lib,$(filter %so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib)))) -$(foreach lib,$(filter %$(VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib)))) +$(foreach lib,$(filter %so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib)))) +$(foreach lib,$(filter %$(SO_VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib)))) INSTALL-LIBS=$(call cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS) ifeq ($(MAKECMDGOALS),dist) diff --git a/libs.mk b/libs.mk index e48d55c52..3046e1b96 100644 --- a/libs.mk +++ b/libs.mk @@ -230,25 +230,27 @@ $(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS) BUILD_LIBVPX_SO := $(if $(BUILD_LIBVPX),$(CONFIG_SHARED)) +SO_VERSION_MAJOR := 2 +SO_VERSION_MINOR := 0 +SO_VERSION_PATCH := 0 ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS)) -LIBVPX_SO := libvpx.$(VERSION_MAJOR).dylib +LIBVPX_SO := libvpx.$(SO_VERSION_MAJOR).dylib EXPORT_FILE := libvpx.syms LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \ libvpx.dylib ) else -LIBVPX_SO := libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH) +LIBVPX_SO := libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH) EXPORT_FILE := libvpx.ver -SYM_LINK := libvpx.so LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \ - libvpx.so libvpx.so.$(VERSION_MAJOR) \ - libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR)) + libvpx.so libvpx.so.$(SO_VERSION_MAJOR) \ + libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR)) endif LIBS-$(BUILD_LIBVPX_SO) += $(BUILD_PFX)$(LIBVPX_SO)\ $(notdir $(LIBVPX_SO_SYMLINKS)) $(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) $(EXPORT_FILE) $(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm -$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(VERSION_MAJOR) +$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(SO_VERSION_MAJOR) $(BUILD_PFX)$(LIBVPX_SO): EXPORTS_FILE = $(EXPORT_FILE) libvpx.ver: $(call enabled,CODEC_EXPORTS) From 5ef2d1ddaedcf5201cad57d0cccd5e33fcbeeedf Mon Sep 17 00:00:00 2001 From: Adrian Grange Date: Tue, 24 Mar 2015 08:55:35 -0700 Subject: [PATCH 3/5] Fix use of scaling in joint motion search To enable us to the scale-invariant motion estimation code during mode selection, each of the reference buffers is scaled to match the size of the frame being encoded. This fix ensures that a unit scaling factor is used in this case rather than the one calculated assuming that the reference frame is not scaled. (cherry picked from commit 8d8d7bfde5d311bb7d4ff4e921a9dbaa8f389af5) Change-Id: Id9a5c85dad402f3a7cc7ea9f30f204edad080ebf --- vp9/encoder/vp9_rdopt.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index 09512df18..f0c006109 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -1540,6 +1540,7 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x, int mi_row, int mi_col, int_mv single_newmv[MAX_REF_FRAMES], int *rate_mv) { + const VP9_COMMON *const cm = &cpi->common; const int pw = 4 * num_4x4_blocks_wide_lookup[bsize]; const int ph = 4 * num_4x4_blocks_high_lookup[bsize]; MACROBLOCKD *xd = &x->e_mbd; @@ -1556,6 +1557,7 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x, uint8_t *second_pred = vpx_memalign(16, pw * ph * sizeof(uint8_t)); #endif // CONFIG_VP9_HIGHBITDEPTH const InterpKernel *kernel = vp9_get_interp_kernel(mbmi->interp_filter); + struct scale_factors sf; // Do joint motion search in compound mode to get more accurate mv. struct buf_2d backup_yv12[2][MAX_MB_PLANE]; @@ -1591,6 +1593,17 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x, frame_mv[refs[ref]].as_int = single_newmv[refs[ref]].as_int; } + // Since we have scaled the reference frames to match the size of the current + // frame we must use a unit scaling factor during mode selection. +#if CONFIG_VP9_HIGHBITDEPTH + vp9_setup_scale_factors_for_frame(&sf, cm->width, cm->height, + cm->width, cm->height, + cm->use_highbitdepth); +#else + vp9_setup_scale_factors_for_frame(&sf, cm->width, cm->height, + cm->width, cm->height); +#endif // CONFIG_VP9_HIGHBITDEPTH + // Allow joint search multiple times iteratively for each reference frame // and break out of the search loop if it couldn't find a better mv. for (ite = 0; ite < 4; ite++) { @@ -1619,8 +1632,7 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x, ref_yv12[!id].stride, second_pred, pw, &frame_mv[refs[!id]].as_mv, - &xd->block_refs[!id]->sf, - pw, ph, 0, + &sf, pw, ph, 0, kernel, MV_PRECISION_Q3, mi_col * MI_SIZE, mi_row * MI_SIZE, xd->bd); @@ -1629,8 +1641,7 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x, ref_yv12[!id].stride, second_pred, pw, &frame_mv[refs[!id]].as_mv, - &xd->block_refs[!id]->sf, - pw, ph, 0, + &sf, pw, ph, 0, kernel, MV_PRECISION_Q3, mi_col * MI_SIZE, mi_row * MI_SIZE); } @@ -1639,8 +1650,7 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x, ref_yv12[!id].stride, second_pred, pw, &frame_mv[refs[!id]].as_mv, - &xd->block_refs[!id]->sf, - pw, ph, 0, + &sf, pw, ph, 0, kernel, MV_PRECISION_Q3, mi_col * MI_SIZE, mi_row * MI_SIZE); #endif // CONFIG_VP9_HIGHBITDEPTH From d181a627f055a4051165e13c117d28ebfc9086ba Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 31 Mar 2015 17:45:25 -0700 Subject: [PATCH 4/5] vp9: fix high-bitdepth NEON build remove incorrect specializations in rtcd and update a configuration check in partial_idct_test.cc (cherry picked from commit 8845334097d1cb03fc8d7a91c86f02235afc8da6) Change-Id: I20f551f38ce502092b476fb16d3ca0969dba56f0 --- test/partial_idct_test.cc | 4 ++-- vp9/common/vp9_rtcd_defs.pl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/partial_idct_test.cc b/test/partial_idct_test.cc index ba82da4e1..ba73f8612 100644 --- a/test/partial_idct_test.cc +++ b/test/partial_idct_test.cc @@ -230,7 +230,7 @@ INSTANTIATE_TEST_CASE_P( &vp9_idct4x4_1_add_c, TX_4X4, 1))); -#if HAVE_NEON +#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P( NEON, PartialIDctTest, ::testing::Values( @@ -258,7 +258,7 @@ INSTANTIATE_TEST_CASE_P( &vp9_idct4x4_16_add_c, &vp9_idct4x4_1_add_neon, TX_4X4, 1))); -#endif // HAVE_NEON +#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE #if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P( diff --git a/vp9/common/vp9_rtcd_defs.pl b/vp9/common/vp9_rtcd_defs.pl index 134481356..d6d7dd8d8 100644 --- a/vp9/common/vp9_rtcd_defs.pl +++ b/vp9/common/vp9_rtcd_defs.pl @@ -499,7 +499,7 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") { specialize qw/vp9_highbd_d153_predictor_4x4/; add_proto qw/void vp9_highbd_v_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vp9_highbd_v_predictor_4x4 neon/, "$sse_x86inc"; + specialize qw/vp9_highbd_v_predictor_4x4/, "$sse_x86inc"; add_proto qw/void vp9_highbd_tm_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; specialize qw/vp9_highbd_tm_predictor_4x4/, "$sse_x86inc"; @@ -577,7 +577,7 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") { specialize qw/vp9_highbd_d153_predictor_16x16/; add_proto qw/void vp9_highbd_v_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vp9_highbd_v_predictor_16x16 neon/, "$sse2_x86inc"; + specialize qw/vp9_highbd_v_predictor_16x16/, "$sse2_x86inc"; add_proto qw/void vp9_highbd_tm_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; specialize qw/vp9_highbd_tm_predictor_16x16/, "$sse2_x86_64"; From c74bf6d889992c3cabe017ec353ca85c323107cd Mon Sep 17 00:00:00 2001 From: Johann Date: Thu, 2 Apr 2015 15:44:01 -0700 Subject: [PATCH 5/5] Update CHANGELOG for v1.4.0 (Indian Runner Duck) release Change-Id: Id31b4da40c484aefc1236f5cc568171a9fd12af2 --- CHANGELOG | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 6ba1f6c9e..a31878415 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -2015-03-23 v1.4.0 "Indian Runner Duck" +2015-04-03 v1.4.0 "Indian Runner Duck" This release includes significant improvements to the VP9 codec. - Upgrading: @@ -18,6 +18,9 @@ Fixes a VP9 bitstream issue in Profile 1. This only affected non-YUV 4:2:0 files. + - Known Issues: + Frame Parallel decoding fails for segmented and non-420 files. + 2013-11-15 v1.3.0 "Forest" This release introduces the VP9 codec in a backward-compatible way. All existing users of VP8 can continue to use the library without