Commit 9d4167e2 authored by Steve Lhomme's avatar Steve Lhomme

contrib: aom: use a more recent version that doesn't leak on film-grain

parent 55399af0
From 8884914546ee68a440342587c4a7c9189dbc8443 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolan.org>
Date: Wed, 12 Sep 2018 11:18:15 +0200
Subject: [PATCH] [film-grain] copy user_priv from the source img
Since we don't return the original img we need to prive the same user_priv
data as the aom_image_t that would be returned without film-grain.
Change-Id: I6ac6c575b9ca34673018cf7533955afe4996e6fc
---
av1/av1_dx_iface.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/av1/av1_dx_iface.c b/av1/av1_dx_iface.c
index 8899556ca..f5e19ea5c 100644
--- a/av1/av1_dx_iface.c
+++ b/av1/av1_dx_iface.c
@@ -642,6 +642,7 @@ static aom_image_t *add_grain_if_needed(aom_image_t *img,
*grain_img_ptr = NULL;
}
}
+ grain_img_buf->user_priv = img->user_priv;
return grain_img_buf;
}
--
2.17.0.windows.1
--- aom/av1/av1_dx_iface.c.grain_leak 2018-09-13 10:16:19.944607200 +0200
+++ aom/av1/av1_dx_iface.c 2018-09-13 10:14:57.707231900 +0200
@@ -618,6 +618,7 @@ aom_image_t *add_grain_if_needed(aom_ima
static aom_image_t *decoder_get_frame(aom_codec_alg_priv_t *ctx,
aom_codec_iter_t *iter) {
aom_image_t *img = NULL;
+ aom_image_t *decoded = NULL;
if (!iter) {
return NULL;
@@ -704,7 +705,10 @@ static aom_image_t *decoder_get_frame(ao
img = &ctx->img;
img->temporal_id = cm->temporal_layer_id;
img->spatial_id = cm->spatial_layer_id;
- return add_grain_if_needed(img, ctx->image_with_grain, grain_params);
+ decoded = add_grain_if_needed(img, ctx->image_with_grain, grain_params);
+ if (decoded != img)
+ ctx->image_with_grain = decoded;
+ return decoded;
}
} else {
// Decoding failed. Release the worker thread.
--- 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;
}
--- aom/av1/av1_dx_iface.c.userpriv 2018-06-27 11:19:42.000000000 +0200
+++ aom/av1/av1_dx_iface.c 2018-09-12 11:28:11.342088000 +0200
@@ -610,6 +610,7 @@ aom_image_t *add_grain_if_needed(aom_ima
}
av1_add_film_grain(grain_params, img, grain_img_buf);
+ grain_img_buf->user_priv = img->user_priv;
return grain_img_buf;
}
# aom
AOM_HASH := 3715bf25db5cdedbd8b49560903bad02d911c62f
AOM_HASH := ce4cce47bd0eda6871cfba278f50ef82b0b5e1b0
AOM_VERSION := v1.0.0-$(AOM_HASH)
AOM_GITURL := https://aomedia.googlesource.com/aom/+archive/$(AOM_HASH).tar.gz
......@@ -19,9 +19,8 @@ aom: aom-$(AOM_VERSION).tar.gz .sum-aom
rm -Rf $@-$(AOM_VERSION) $@
mkdir -p $@-$(AOM_VERSION)
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
$(APPLY) $(SRC)/aom/0001-film-grain-copy-user_priv-from-the-source-img.patch
$(APPLY) $(SRC)/aom/aom-noavx2.patch
ifdef HAVE_WINSTORE
$(APPLY) $(SRC)/aom/aom-pthreads-win32.patch
endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment