Commit 52a2c17e authored by Anton Khirnov's avatar Anton Khirnov

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.
parent a7a17e3f
...@@ -51,16 +51,12 @@ void ff_hevc_unref_frame(HEVCContext *s, HEVCFrame *frame, int flags) ...@@ -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) RefPicList *ff_hevc_get_ref_list(HEVCContext *s, HEVCFrame *ref, int x0, int y0)
{ {
if (x0 < 0 || y0 < 0) { int x_cb = x0 >> s->sps->log2_ctb_size;
return s->ref->refPicList; int y_cb = y0 >> s->sps->log2_ctb_size;
} else { int pic_width_cb = (s->sps->width + (1 << s->sps->log2_ctb_size) - 1) >>
int x_cb = x0 >> s->sps->log2_ctb_size; s->sps->log2_ctb_size;
int y_cb = y0 >> s->sps->log2_ctb_size; int ctb_addr_ts = s->pps->ctb_addr_rs_to_ts[y_cb * pic_width_cb + x_cb];
int pic_width_cb = (s->sps->width + (1 << s->sps->log2_ctb_size) - 1) >> return (RefPicList *)ref->rpl_tab[ctb_addr_ts];
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) void ff_hevc_clear_refs(HEVCContext *s)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment