diff options
author | Mickaƫl Raulet <mraulet@insa-rennes.fr> | 2014-07-27 22:52:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-28 00:47:28 +0200 |
commit | 772f7f4eddbc4450443743984bf1d4da2f4bf84c (patch) | |
tree | 75cf5b2cef73d722ca475748d1c833d59d21dbd5 /libavcodec/hevc_refs.c | |
parent | 3b777db1320014286592706b7bb1c2e51364bb83 (diff) | |
download | ffmpeg-772f7f4eddbc4450443743984bf1d4da2f4bf84c.tar.gz |
hevc: fix skip_flag
cherry picked from commit 509ae456551005b9bf9b4d9730b6247c97fdd990
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc_refs.c')
-rw-r--r-- | libavcodec/hevc_refs.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/libavcodec/hevc_refs.c b/libavcodec/hevc_refs.c index bb55aa8a80..b3a97871d5 100644 --- a/libavcodec/hevc_refs.c +++ b/libavcodec/hevc_refs.c @@ -51,16 +51,11 @@ void ff_hevc_unref_frame(HEVCContext *s, HEVCFrame *frame, int flags) RefPicList *ff_hevc_get_ref_list(HEVCContext *s, HEVCFrame *ref, int x0, int y0) { - if (x0 < 0 || y0 < 0) { - return s->ref->refPicList; - } else { - int x_cb = x0 >> s->sps->log2_ctb_size; - int y_cb = y0 >> s->sps->log2_ctb_size; - int pic_width_cb = (s->sps->width + (1 << s->sps->log2_ctb_size) - 1) >> - s->sps->log2_ctb_size; - int ctb_addr_ts = s->pps->ctb_addr_rs_to_ts[y_cb * pic_width_cb + x_cb]; - return (RefPicList *)ref->rpl_tab[ctb_addr_ts]; - } + int x_cb = x0 >> s->sps->log2_ctb_size; + int y_cb = y0 >> s->sps->log2_ctb_size; + int pic_width_cb = s->sps->ctb_width; + int ctb_addr_ts = s->pps->ctb_addr_rs_to_ts[y_cb * pic_width_cb + x_cb]; + return (RefPicList *)ref->rpl_tab[ctb_addr_ts]; } void ff_hevc_clear_refs(HEVCContext *s) |