diff options
author | Mickaƫl Raulet <mraulet@insa-rennes.fr> | 2014-07-22 12:04:48 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-22 13:00:14 +0200 |
commit | fa0506e4136b5b883205c82809a113f5edcd200b (patch) | |
tree | 15533cb036c117a98332ff0b8d45fda53966cac5 /libavcodec/hevc.c | |
parent | 4ec1cb24978e201062408ffebad18d8ef906a46d (diff) | |
download | ffmpeg-fa0506e4136b5b883205c82809a113f5edcd200b.tar.gz |
hevc/rext: update boundary strength for chroma deblocking filter
cherry picked from commit 7d05c95ac5a63d7675bf645e74b4cf1fffff4796
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r-- | libavcodec/hevc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 6f93fcb84b..1fee4ddae9 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -89,8 +89,8 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps) int ctb_count = sps->ctb_width * sps->ctb_height; int min_pu_size = sps->min_pu_width * sps->min_pu_height; - s->bs_width = width >> 3; - s->bs_height = height >> 3; + s->bs_width = (width >> 2) + 1; + s->bs_height = (height >> 2) + 1; s->sao = av_mallocz_array(ctb_count, sizeof(*s->sao)); s->deblock = av_mallocz_array(ctb_count, sizeof(*s->deblock)); @@ -104,7 +104,7 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps) s->cbf_luma = av_malloc_array(sps->min_tb_width, sps->min_tb_height); s->tab_ipm = av_mallocz(min_pu_size); - s->is_pcm = av_malloc(min_pu_size); + s->is_pcm = av_malloc((sps->min_pu_width + 1) * (sps->min_pu_height + 1)); if (!s->tab_ipm || !s->cbf_luma || !s->is_pcm) goto fail; @@ -116,8 +116,8 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps) if (!s->qp_y_tab || !s->filter_slice_edges || !s->tab_slice_address) goto fail; - s->horizontal_bs = av_mallocz_array(2 * s->bs_width, (s->bs_height + 1)); - s->vertical_bs = av_mallocz_array(2 * s->bs_width, (s->bs_height + 1)); + s->horizontal_bs = av_mallocz_array(s->bs_width, s->bs_height); + s->vertical_bs = av_mallocz_array(s->bs_width, s->bs_height); if (!s->horizontal_bs || !s->vertical_bs) goto fail; @@ -2584,10 +2584,10 @@ static int hevc_frame_start(HEVCContext *s) ((s->sps->height >> s->sps->log2_min_cb_size) + 1); int ret; - memset(s->horizontal_bs, 0, 2 * s->bs_width * (s->bs_height + 1)); - memset(s->vertical_bs, 0, 2 * s->bs_width * (s->bs_height + 1)); + memset(s->horizontal_bs, 0, s->bs_width * s->bs_height); + memset(s->vertical_bs, 0, s->bs_width * s->bs_height); memset(s->cbf_luma, 0, s->sps->min_tb_width * s->sps->min_tb_height); - memset(s->is_pcm, 0, s->sps->min_pu_width * s->sps->min_pu_height); + memset(s->is_pcm, 0, (s->sps->min_pu_width + 1) * (s->sps->min_pu_height + 1)); memset(s->tab_slice_address, -1, pic_size_in_ctb * sizeof(*s->tab_slice_address)); s->is_decoded = 0; |