Add AV1 bitstream support (extract, inject, remove)#117
Open
sven-pke wants to merge 2 commits intoquietvoid:mainfrom
Open
Add AV1 bitstream support (extract, inject, remove)#117sven-pke wants to merge 2 commits intoquietvoid:mainfrom
sven-pke wants to merge 2 commits intoquietvoid:mainfrom
Conversation
Introduces an 'av1_parser' workspace crate that owns all generic AV1 OBU parsing and I/O (ObuReader, IvfWriter, ObuWriter, LEB128, IVF container handling). All existing HEVC functionality is preserved. Commands that process bitstreams (extract, inject, remove) now auto-detect the input format: .av1 / .ivf -> new AV1 code path everything else -> existing HEVC code path (unchanged) The hdr10plus library crate gains a new 'av1' module with HDR10+ OBU encoding/decoding (OBU_METADATA T.35, provider_code=0x003C). HDR10+-specific AV1 helpers live in src/core/av1_parser.rs.
- Remove Av1NaluParser and TemporalUnitInfo structs from av1_parser.rs (they were unused dead code suppressed by #![allow(dead_code)]) - Remove unused re-exports (IvfWriter, ObuWriter) from av1_parser.rs - Move inner use blocks to file-level imports in inject.rs and remove.rs - Remove Av1NaluParser usage from extract.rs and inject.rs - Builds with zero warnings Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
This PR adds AV1 bitstream support to
hdr10plus_toolalongside the existing HEVC pipeline -- no HEVC code is removed or modified.av1_parserworkspace crate owns all AV1 I/O:ObuReader,IvfWriter,ObuWriter, and frame-level read/write helpersis_hdr10plus_obu,extract_hdr10plus_t35_bytes) live insrc/core/av1_parser.rshdr10plus/src/av1/mod.rs(encode_hdr10plus_obu/encode_av1_from_json) as part of the library crate.av1/.ivf); IVF vs. raw OBU stream is auto-detected at runtime via magic headerCommands extended
extract.jsoninjectOBU_TEMPORAL_DELIMITER)removeDesign
av1_parsercrate is responsible for all AV1 I/ORelates to #50