-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These improve suitability for parsing H.265 as well as H.264. The changes to `ByteReader` construction are because H.265 has two-byte NAL headers, so automatically skipping one byte is super confusing. Arguably it was confusing even with H.264. Make the skip explicit. Additionally, `BitRead::read_to` is nice for loading stuff directly into primitives such as `[u8; 11]`. That's the representation that makes the most sense for the H.265 profile (as defined in section 7.3.3, `profile_tier_level`, `if( profilePresentFlag )` block). When constructing a `HEVCDecoderConfigurationRecord`, we need that full 11-byte span; when constructing the RFC 6381 codec string, we need a 6-byte span. So parsing the whole thing into individual fields means reconstructing these later. And finally, I renamed methods to more closely match `bitstream-io`, which is what `h264-reader` is using internally now and is overwhelmingly the commonly used crate for bitstream parsing in general.
- Loading branch information
Showing
10 changed files
with
123 additions
and
78 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "h264-reader" | ||
version = "0.7.1-dev" | ||
version = "0.8.0-dev" | ||
authors = ["David Holroyd <[email protected]>"] | ||
license = "MIT/Apache-2.0" | ||
description = "Reader for H264 bitstream syntax" | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ | |
|
||
use std::fmt::Debug; | ||
|
||
pub use bitstream_io; | ||
|
||
pub mod annexb; | ||
pub mod avcc; | ||
pub mod nal; | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.