Repository navigation
Encode test data as base64, fix Base64Dec(), add video GOP decode test - #225
Merged
Merged
Conversation
Base64Dec() always removed one byte from the decoded_size() upper bound, which is only correct for input with a single '=' padding. Input without padding lost its last byte, input with '==' padding got an extra garbage byte. Use the number of bytes actually written by decode() instead, and test all padding variants. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The xxd generated { 0x00, 0x01, ... } initializer lists use ~6 source chars per byte. Generate base64 string
literals instead (~1.35 chars per byte), decoded at static init using Base64Dec(). This makes the generated files
~4.5x smaller and faster to compile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add test data with one GOP (I frame + 9 P frames) of H.265 1024x768 video - Decode all frames using software decoding to Y8, RGB24 and GBRP, check that RGB24 and GBRP are the same pixels - Fix PixelFmt::GBRP docu, the plane order is G, B, R (as in FFmpeg), not R, G, B Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rings) Adjacent string literals are concatenated by the compiler, which for hevc_gop.cpp results in a 1.3 MB literal, exceeding the 65536 chars that C++ compilers are required to support (clang -pedantic -Werror fails). Put the base64 lines into an array of separate literals and join them at static init instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.