Skip to content

Instantly share code, notes, and snippets.

@Kagami
Created April 24, 2020 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kagami/cdd82fe675924d5121ac324d1baadb7f to your computer and use it in GitHub Desktop.
Save Kagami/cdd82fe675924d5121ac324d1baadb7f to your computer and use it in GitHub Desktop.
diff --git a/encoder/slicetype.c b/encoder/slicetype.c
index daaf4b5b..adf0d209 100644
--- a/encoder/slicetype.c
+++ b/encoder/slicetype.c
@@ -489,7 +489,7 @@ void x264_weights_analyse( x264_t *h, x264_frame_t *fenc, x264_frame_t *ref, int
int height = ref->i_lines_lowres + PADV*2;
x264_weight_scale_plane( h, dst, ref->i_stride_lowres, src, ref->i_stride_lowres,
width, height, &weights[0] );
- fenc->weighted[0] = h->mb.p_weight_buf[0] + PADH + ref->i_stride_lowres * PADV;
+ fenc->weighted[0] = h->mb.p_weight_buf[0] + (ref->lowres[0] - ref->buffer_lowres);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment