Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2018-11-22 22:52:30 +0300
committerJanne Grunau <janne-vlc@jannau.net>2018-11-23 00:03:28 +0300
commit3fa2f04f23482dcb97207096c3206605aa53539e (patch)
tree272d8f9fdeacec129e36e46df7ecbdd764f5c628 /src/film_grain_tmpl.c
parentb28788c0275e150b17c209effb5d4dee34bfb5ef (diff)
film_grain: don't attempt copying chroma planes for I400
Fixes #191
Diffstat (limited to 'src/film_grain_tmpl.c')
-rw-r--r--src/film_grain_tmpl.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/film_grain_tmpl.c b/src/film_grain_tmpl.c
index 16d14ca..31d6445 100644
--- a/src/film_grain_tmpl.c
+++ b/src/film_grain_tmpl.c
@@ -521,12 +521,14 @@ void bitfn(dav1d_apply_grain)(Dav1dPicture *const out,
memcpy(out->data[0], in->data[0], out->p.h * out->stride[0]);
}
- for (int i = 0; i < 2; i++) {
- if (!data->num_uv_points[i] && !data->chroma_scaling_from_luma) {
- const int suby = in->p.layout == DAV1D_PIXEL_LAYOUT_I420;
- assert(out->stride[1] == in->stride[1]);
- memcpy(out->data[1+i], in->data[1+i],
- (out->p.h >> suby) * out->stride[1]);
+ if (in->p.layout != DAV1D_PIXEL_LAYOUT_I400) {
+ for (int i = 0; i < 2; i++) {
+ if (!data->num_uv_points[i] && !data->chroma_scaling_from_luma) {
+ const int suby = in->p.layout == DAV1D_PIXEL_LAYOUT_I420;
+ assert(out->stride[1] == in->stride[1]);
+ memcpy(out->data[1+i], in->data[1+i],
+ (out->p.h >> suby) * out->stride[1]);
+ }
}
}
}