Commit 24108f83 authored by Janne Grunau's avatar Janne Grunau

Revert "explicitly clear some Dav1dRef pointers after calling dav1d_ref_dec()"

This reverts commit aeb5a5ef.
parent f55ac48c
...@@ -3018,9 +3018,7 @@ int dav1d_submit_frame(Dav1dContext *const c) { ...@@ -3018,9 +3018,7 @@ int dav1d_submit_frame(Dav1dContext *const c) {
if (f->cur_segmap_ref) if (f->cur_segmap_ref)
dav1d_ref_inc(f->cur_segmap_ref); dav1d_ref_inc(f->cur_segmap_ref);
dav1d_ref_dec(&c->refs[i].refmvs); dav1d_ref_dec(&c->refs[i].refmvs);
if (f->frame_hdr.allow_intrabc) { if (!f->frame_hdr.allow_intrabc) {
c->refs[i].refmvs = NULL;
} else {
c->refs[i].refmvs = f->mvs_ref; c->refs[i].refmvs = f->mvs_ref;
if (f->mvs_ref) if (f->mvs_ref)
dav1d_ref_inc(f->mvs_ref); dav1d_ref_inc(f->mvs_ref);
...@@ -3040,9 +3038,7 @@ int dav1d_submit_frame(Dav1dContext *const c) { ...@@ -3040,9 +3038,7 @@ int dav1d_submit_frame(Dav1dContext *const c) {
if (c->cdf[i].cdf) if (c->cdf[i].cdf)
dav1d_cdf_thread_unref(&c->cdf[i]); dav1d_cdf_thread_unref(&c->cdf[i]);
dav1d_ref_dec(&c->refs[i].segmap); dav1d_ref_dec(&c->refs[i].segmap);
c->refs[i].segmap = NULL;
dav1d_ref_dec(&c->refs[i].refmvs); dav1d_ref_dec(&c->refs[i].refmvs);
c->refs[i].refmvs = NULL;
} }
} }
return res; return res;
......
...@@ -1060,9 +1060,7 @@ int dav1d_parse_obus(Dav1dContext *const c, Dav1dData *const in) { ...@@ -1060,9 +1060,7 @@ int dav1d_parse_obus(Dav1dContext *const c, Dav1dData *const in) {
if (c->refs[i].p.p.data[0]) if (c->refs[i].p.p.data[0])
dav1d_thread_picture_unref(&c->refs[i].p); dav1d_thread_picture_unref(&c->refs[i].p);
dav1d_ref_dec(&c->refs[i].segmap); dav1d_ref_dec(&c->refs[i].segmap);
c->refs[i].segmap = NULL;
dav1d_ref_dec(&c->refs[i].refmvs); dav1d_ref_dec(&c->refs[i].refmvs);
c->refs[i].refmvs = NULL;
if (c->cdf[i].cdf) if (c->cdf[i].cdf)
dav1d_cdf_thread_unref(&c->cdf[i]); dav1d_cdf_thread_unref(&c->cdf[i]);
} }
...@@ -1189,7 +1187,6 @@ int dav1d_parse_obus(Dav1dContext *const c, Dav1dData *const in) { ...@@ -1189,7 +1187,6 @@ int dav1d_parse_obus(Dav1dContext *const c, Dav1dData *const in) {
if (c->refs[r].segmap) if (c->refs[r].segmap)
dav1d_ref_inc(c->refs[r].segmap); dav1d_ref_inc(c->refs[r].segmap);
dav1d_ref_dec(&c->refs[i].refmvs); dav1d_ref_dec(&c->refs[i].refmvs);
c->refs[i].refmvs = NULL;
c->refs[i].qidx = c->refs[r].qidx; c->refs[i].qidx = c->refs[r].qidx;
} }
} }
......
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