Commit 2fb9b635 authored by Jingning Han's avatar Jingning Han Committed by Gerrit Code Review
Browse files

Fix denoiser chroma component initialization

Use the correct frame size and stride value for chroma components
when setting the initial values. These control parameters are
assigned when the denoiser buffer was allocated and initialized.

Change-Id: Ia6318194c7738aff540bcbd34f77f0dac46221a1
parent 27582e57
......@@ -485,15 +485,13 @@ static void make_grayscale(YV12_BUFFER_CONFIG *yuv) {
uint8_t *u = yuv->u_buffer;
uint8_t *v = yuv->v_buffer;
// The '/2's are there because we have a 440 buffer, but we want to output
// 420.
for (r = 0; r < yuv->uv_height / 2; ++r) {
for (c = 0; c < yuv->uv_width / 2; ++c) {
for (r = 0; r < yuv->uv_height; ++r) {
for (c = 0; c < yuv->uv_width; ++c) {
u[c] = UINT8_MAX / 2;
v[c] = UINT8_MAX / 2;
}
u += yuv->uv_stride + yuv->uv_width / 2;
v += yuv->uv_stride + yuv->uv_width / 2;
u += yuv->uv_stride;
v += yuv->uv_stride;
}
}
#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