Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Conrad <david_conrad@apple.com>2022-06-08 01:18:04 +0300
committerDavid Conrad <david_conrad@apple.com>2022-09-15 03:28:22 +0300
commitd4a2b75da69da1891682fa40ec9e1ca99d3cf950 (patch)
treeccbfa373df19c45146fe72d7d0c502c3797f07df
parenteb25f00cb16d7d57583ab17678cf25555e9ab81a (diff)
Fix checking the reference dimesions for the projection process
Section 7.9.2 returns 0 "If RefMiRows[ srcIdx ] is not equal to MiRows, RefMiCols[ srcIdx ] is not equal to MiCols" dav1d was comparing pixel width/height, not block width/height, so conform with the spec
-rw-r--r--src/decode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/decode.c b/src/decode.c
index 35937e8..90cb0e4 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -3743,9 +3743,10 @@ int dav1d_submit_frame(Dav1dContext *const c) {
if (f->frame_hdr->use_ref_frame_mvs) {
for (int i = 0; i < 7; i++) {
const int refidx = f->frame_hdr->refidx[i];
+ const int ref_w = ((ref_coded_width[i] + 7) >> 3) << 1;
+ const int ref_h = ((f->refp[i].p.p.h + 7) >> 3) << 1;
if (c->refs[refidx].refmvs != NULL &&
- ref_coded_width[i] == f->cur.p.w &&
- f->refp[i].p.p.h == f->cur.p.h)
+ ref_w == f->bw && ref_h == f->bh)
{
f->ref_mvs_ref[i] = c->refs[refidx].refmvs;
dav1d_ref_inc(f->ref_mvs_ref[i]);