[vlc-commits] contrib: aom: don't realloc the film-grain cache image when the dimension is even

Steve Lhomme git at videolan.org
Thu Sep 13 10:29:00 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Sep 13 10:25:49 2018 +0200| [55399af0e0f6c7b0077606c663b9854118732123] | committer: Steve Lhomme

contrib: aom: don't realloc the film-grain cache image when the dimension is even

We want even dimensions, not odd ones. That's what the allocation that follows
does.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55399af0e0f6c7b0077606c663b9854118732123
---

 contrib/src/aom/aom-film-grain-realloc-fix.patch | 11 +++++++++++
 contrib/src/aom/rules.mak                        |  1 +
 2 files changed, 12 insertions(+)

diff --git a/contrib/src/aom/aom-film-grain-realloc-fix.patch b/contrib/src/aom/aom-film-grain-realloc-fix.patch
new file mode 100644
index 0000000000..d5660ed12c
--- /dev/null
+++ b/contrib/src/aom/aom-film-grain-realloc-fix.patch
@@ -0,0 +1,11 @@
+--- aom/av1/av1_dx_iface.c.grain_odd	2018-09-13 10:21:03.995541200 +0200
++++ aom/av1/av1_dx_iface.c	2018-09-13 10:21:32.212545400 +0200
+@@ -598,7 +598,7 @@ aom_image_t *add_grain_if_needed(aom_ima
+ 
+   if (grain_img_buf &&
+       (img->d_w != grain_img_buf->d_w || img->d_h != grain_img_buf->d_h ||
+-       img->fmt != grain_img_buf->fmt || !(img->d_h % 2) || !(img->d_w % 2))) {
++       img->fmt != grain_img_buf->fmt || (img->d_h % 2) || (img->d_w % 2))) {
+     aom_img_free(grain_img_buf);
+     grain_img_buf = NULL;
+   }
diff --git a/contrib/src/aom/rules.mak b/contrib/src/aom/rules.mak
index 800b5a4ee0..2c66871461 100644
--- a/contrib/src/aom/rules.mak
+++ b/contrib/src/aom/rules.mak
@@ -21,6 +21,7 @@ aom: aom-$(AOM_VERSION).tar.gz .sum-aom
 	tar xvzf "$<" -C $@-$(AOM_VERSION)
 	$(APPLY) $(SRC)/aom/film-grain-copy-the-user_priv-from-the-img.patch
 	$(APPLY) $(SRC)/aom/aom-film-grain-leak.patch
+	$(APPLY) $(SRC)/aom/aom-film-grain-realloc-fix.patch
 ifdef HAVE_WINSTORE
 	$(APPLY) $(SRC)/aom/aom-pthreads-win32.patch
 endif



More information about the vlc-commits mailing list