diff options
author | James Almer <jamrial@gmail.com> | 2022-04-08 05:32:25 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-04-08 15:06:38 +0300 |
commit | cabb94df3f6e19f0deceb02f8e60459d6f40c69b (patch) | |
tree | feebf1f71afe6ac42f313772433ac5c848097c37 | |
parent | adc01378b03e6f47536a2a3215ce717628516455 (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.
-rw-r--r-- | src/obu.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); |