Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bounds checks for many fields #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dholroyd
Copy link
Owner

@dholroyd dholroyd commented Feb 26, 2024

Turns out to be more complicated than I expected due to the need to refer to a table of values from the spec when calculating the max value for max_dec_frame_buffering.

log2_max_mv_length_horizontal and log2_max_mv_length_vertical are not checked to the [0, 15] limits in the most recent spec because older specs said the restriction was [0, 16] and real world test data appears to use the value 16.

Other changes included,

  • Levels 6, 6.1 and 6.2, because the spec doc I'm referring to for "Table A-1 – Level limits" has these levels now
  • some rewiring to thread SPS/PPS info through to code that needs them to perform field validations

Fixes #55 and #58

@dholroyd dholroyd force-pushed the bitstream-restrictions-bounds-checks branch from 549d4e6 to 902104e Compare February 26, 2024 23:04
@dholroyd dholroyd changed the title Bounds checks for bistream_restriction fields Bounds checks for many fields Feb 26, 2024
@dholroyd dholroyd force-pushed the bitstream-restrictions-bounds-checks branch from 902104e to 86a0ff9 Compare February 27, 2024 20:17
@dholroyd dholroyd marked this pull request as ready for review February 27, 2024 20:39
@dholroyd dholroyd force-pushed the bitstream-restrictions-bounds-checks branch from 86a0ff9 to 506ee23 Compare February 29, 2024 21:23
Copy link

github-actions bot commented Feb 29, 2024

🐰Bencher

ReportFri, March 1, 2024 at 07:28:22 UTC
Projecth264-reader
Branch66/merge
Testbedubuntu-22.04
BenchmarkEstimated CyclesEstimated Cycles Results
estimated cycles
InstructionsInstructions Results
instructions
L1 AccessesL1 Accesses Results
accesses
L2 AccessesL2 Accesses Results
accesses
RAM AccessesRAM Accesses Results
accesses
Total AccessesTotal Accesses Results
total-accesses
ci_bench::ci::reader read:setup_video("big_buck_bunny_1080p_24f...➖ (view plot)16653199.000➖ (view plot)8205418.000➖ (view plot)10769774.000➖ (view plot)16841.000➖ (view plot)165692.000➖ (view plot)10952307.000

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

@dholroyd dholroyd force-pushed the bitstream-restrictions-bounds-checks branch from 506ee23 to bacebcc Compare March 1, 2024 07:26
@dholroyd dholroyd force-pushed the bitstream-restrictions-bounds-checks branch from bacebcc to ab5c4cb Compare March 1, 2024 13:56
Copy link

github-actions bot commented Mar 1, 2024

🐰Bencher

ReportFri, March 1, 2024 at 18:56:06 UTC
Projecth264-reader
Branch66/merge
Testbedlocalhost
BenchmarkEstimated CyclesEstimated Cycles Results
estimated cycles | (Δ%)
Estimated Cycles Lower Boundary
estimated cycles | (%)
InstructionsInstructions Results
instructions
L1 AccessesL1 Accesses Results
accesses
L2 AccessesL2 Accesses Results
accesses
RAM AccessesRAM Accesses Results
accesses
Total AccessesTotal Accesses Results
total-accesses
ci_bench::ci::reader read:setup_video("big_buck_bunny_1080p_24f...✅ (view plot)16648266.000 (+0.04%)14976912.000 (89.96%)➖ (view plot)8205445.000➖ (view plot)10771081.000➖ (view plot)15558.000➖ (view plot)165697.000➖ (view plot)10952336.000

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing bounds-checks for VUI Bitstream Restriction Syntax Elements
1 participant