From 7a20e797be2b3b260839ada94a5396a82e7335c7 Mon Sep 17 00:00:00 2001 From: Ari Koivula Date: Wed, 6 Nov 2013 17:46:30 +0200 Subject: [PATCH] Fix incorrect SAO encoding. --- src/encoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/encoder.c b/src/encoder.c index dd7c8b15..ad643173 100644 --- a/src/encoder.c +++ b/src/encoder.c @@ -876,7 +876,7 @@ void encode_slice_data(encoder_control* encoder) if (encoder->sao_enable) { for (y_ctb = 0; y_ctb < encoder->in.height_in_lcu; y_ctb++) { for (x_ctb = 0; x_ctb < encoder->in.width_in_lcu; x_ctb++) { - unsigned stride = encoder->in.height_in_lcu; + unsigned stride = encoder->in.width_in_lcu; sao_info *sao_luma = &pic->sao_luma[y_ctb * stride + x_ctb]; sao_info *sao_chroma = &pic->sao_chroma[y_ctb * stride + x_ctb]; init_sao_info(sao_luma); @@ -915,7 +915,7 @@ void encode_slice_data(encoder_control* encoder) if (encoder->sao_enable) { picture *pic = encoder->in.cur_pic; - unsigned stride = encoder->in.height_in_lcu; + unsigned stride = encoder->in.width_in_lcu; sao_info sao_luma = pic->sao_luma[y_ctb * stride + x_ctb]; sao_info sao_chroma = pic->sao_chroma[y_ctb * stride + x_ctb];