aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-07-27 18:52:12 +0000
committerAnton Khirnov <anton@khirnov.net>2014-08-09 16:15:38 +0000
commit52a2c17ec006282f388071a831dfb21288611253 (patch)
tree1796d068d316f8f2df0d0bdf0d317eee8544e9e9
parenta7a17e3f1915ce69b787dc58c5d8dba0910fc0a4 (diff)
downloadffmpeg-52a2c17ec006282f388071a831dfb21288611253.tar.gz
hevc_refs: drop the handling of negative coordinates in ff_hevc_get_ref_list()
It makes no sense and cannot happen in any place from which this function is called.
-rw-r--r--libavcodec/hevc_refs.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/libavcodec/hevc_refs.c b/libavcodec/hevc_refs.c
index c924227e50..658ead768e 100644
--- a/libavcodec/hevc_refs.c
+++ b/libavcodec/hevc_refs.c
@@ -51,16 +51,12 @@ 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->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];
}
void ff_hevc_clear_refs(HEVCContext *s)