summaryrefslogtreecommitdiff
path: root/libavcodec/hevc.c
diff options
context:
space:
mode:
authorMickaƫl Raulet <mraulet@insa-rennes.fr>2014-07-27 22:52:14 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-28 00:47:28 +0200
commit772f7f4eddbc4450443743984bf1d4da2f4bf84c (patch)
tree75cf5b2cef73d722ca475748d1c833d59d21dbd5 /libavcodec/hevc.c
parent3b777db1320014286592706b7bb1c2e51364bb83 (diff)
hevc: fix skip_flag
cherry picked from commit 509ae456551005b9bf9b4d9730b6247c97fdd990 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r--libavcodec/hevc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 727f3a5ee2..57e940e8e5 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -97,7 +97,7 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps)
if (!s->sao || !s->deblock)
goto fail;
- s->skip_flag = av_malloc(pic_size_in_ctb);
+ s->skip_flag = av_malloc(sps->min_cb_height * sps->min_cb_width);
s->tab_ct_depth = av_malloc_array(sps->min_cb_height, sps->min_cb_width);
if (!s->skip_flag || !s->tab_ct_depth)
goto fail;
@@ -2019,6 +2019,12 @@ static int hls_coding_unit(HEVCContext *s, int x0, int y0, int log2_cb_size)
x += min_cb_width;
}
lc->cu.pred_mode = skip_flag ? MODE_SKIP : MODE_INTER;
+ } else {
+ x = y_cb * min_cb_width + x_cb;
+ for (y = 0; y < length; y++) {
+ memset(&s->skip_flag[x], 0, length);
+ x += min_cb_width;
+ }
}
if (SAMPLE_CTB(s->skip_flag, x_cb, y_cb)) {