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
path: root/src
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2022-04-08 05:32:25 +0300
committerJames Almer <jamrial@gmail.com>2022-04-08 15:06:38 +0300
commitcabb94df3f6e19f0deceb02f8e60459d6f40c69b (patch)
treefeebf1f71afe6ac42f313772433ac5c848097c37 /src
parentadc01378b03e6f47536a2a3215ce717628516455 (diff)
obu: check refresh_frame_flags is not equal to allFrames on Intra Only frames
From section 6.8.2 in the AV1 spec: "If frame_type is equal to INTRA_ONLY_FRAME, it is a requirement of bitstream conformance that refresh_frame_flags is not equal to 0xff." Make this a soft requirement by checking that strict standard complaince is enabled.
Diffstat (limited to 'src')
-rw-r--r--src/obu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/obu.c b/src/obu.c
index 7df6850..4145988 100644
--- a/src/obu.c
+++ b/src/obu.c
@@ -454,6 +454,11 @@ static int parse_frame_hdr(Dav1dContext *const c, GetBits *const gb) {
if (hdr->refresh_frame_flags != 0xff && hdr->error_resilient_mode && seqhdr->order_hint)
for (int i = 0; i < 8; i++)
dav1d_get_bits(gb, seqhdr->order_hint_n_bits);
+ if (c->strict_std_compliance &&
+ hdr->frame_type == DAV1D_FRAME_TYPE_INTRA && hdr->refresh_frame_flags == 0xff)
+ {
+ goto error;
+ }
if (read_frame_size(c, gb, 0) < 0) goto error;
hdr->allow_intrabc = hdr->allow_screen_content_tools &&
!hdr->super_res.enabled && dav1d_get_bits(gb, 1);