Rename av1_add_film_grain() to aom_add_film_grain() av1_add_film_grain() is defined in aom_dsp, is supposed to be useable for codecs beyond av1. BUG=aomedia:2734 Change-Id: I9fc380fcc2f545ce1d9b16be8051543b2db2e444
diff --git a/aom_dsp/grain_synthesis.c b/aom_dsp/grain_synthesis.c index 626eb76..d476aff 100644 --- a/aom_dsp/grain_synthesis.c +++ b/aom_dsp/grain_synthesis.c
@@ -914,7 +914,7 @@ } } -int av1_add_film_grain(const aom_film_grain_t *params, const aom_image_t *src, +int aom_add_film_grain(const aom_film_grain_t *params, const aom_image_t *src, aom_image_t *dst) { uint8_t *luma, *cb, *cr; int height, width, luma_stride, chroma_stride; @@ -1015,12 +1015,12 @@ luma_stride = dst->stride[AOM_PLANE_Y] >> use_high_bit_depth; chroma_stride = dst->stride[AOM_PLANE_U] >> use_high_bit_depth; - return av1_add_film_grain_run( + return aom_add_film_grain_run( params, luma, cb, cr, height, width, luma_stride, chroma_stride, use_high_bit_depth, chroma_subsamp_y, chroma_subsamp_x, mc_identity); } -int av1_add_film_grain_run(const aom_film_grain_t *params, uint8_t *luma, +int aom_add_film_grain_run(const aom_film_grain_t *params, uint8_t *luma, uint8_t *cb, uint8_t *cr, int height, int width, int luma_stride, int chroma_stride, int use_high_bit_depth, int chroma_subsamp_y,
diff --git a/aom_dsp/grain_synthesis.h b/aom_dsp/grain_synthesis.h index 9155b39..9a8994d 100644 --- a/aom_dsp/grain_synthesis.h +++ b/aom_dsp/grain_synthesis.h
@@ -166,7 +166,7 @@ * \param[in] luma_stride luma plane stride * \param[in] chroma_stride chroma plane stride */ -int av1_add_film_grain_run(const aom_film_grain_t *grain_params, uint8_t *luma, +int aom_add_film_grain_run(const aom_film_grain_t *grain_params, uint8_t *luma, uint8_t *cb, uint8_t *cr, int height, int width, int luma_stride, int chroma_stride, int use_high_bit_depth, int chroma_subsamp_y, @@ -182,7 +182,7 @@ * \param[in] src Source image * \param[out] dst Resulting image with grain */ -int av1_add_film_grain(const aom_film_grain_t *grain_params, +int aom_add_film_grain(const aom_film_grain_t *grain_params, const aom_image_t *src, aom_image_t *dst); #ifdef __cplusplus
diff --git a/av1/av1_dx_iface.c b/av1/av1_dx_iface.c index 43374d0..298a5bd 100644 --- a/av1/av1_dx_iface.c +++ b/av1/av1_dx_iface.c
@@ -715,7 +715,7 @@ grain_img->user_priv = img->user_priv; grain_img->fb_priv = fb->priv; - if (av1_add_film_grain(grain_params, img, grain_img)) { + if (aom_add_film_grain(grain_params, img, grain_img)) { pool->release_fb_cb(pool->cb_priv, fb); return NULL; }
diff --git a/av1/exports_dec b/av1/exports_dec index daabf67..e9e0865 100644 --- a/av1/exports_dec +++ b/av1/exports_dec
@@ -1,3 +1,3 @@ data aom_codec_av1_dx_algo text aom_codec_av1_dx -text av1_add_film_grain +text aom_add_film_grain
diff --git a/examples/noise_model.c b/examples/noise_model.c index d07443f..5ff4c04 100644 --- a/examples/noise_model.c +++ b/examples/noise_model.c
@@ -183,8 +183,8 @@ grain->bit_depth = raw->bit_depth; aom_img_alloc(&renoised, raw->fmt, raw->w, raw->h, 1); - if (av1_add_film_grain(grain, denoised, &renoised)) { - fprintf(stderr, "Internal failure in av1_add_film_grain().\n"); + if (aom_add_film_grain(grain, denoised, &renoised)) { + fprintf(stderr, "Internal failure in aom_add_film_grain().\n"); aom_img_free(&renoised); return; }