Add BAYER8_GBRG debayering for visualization#246
Open
georges-berenger wants to merge 2 commits into
Open
Conversation
added 2 commits
June 9, 2026 12:14
Summary: Add BAYER8_GBRG (8-bit Bayer GBRG pattern) pixel format to VRS, following the same pattern as existing Bayer formats (BAYER8_RGGB, BAYER8_BGGR). BAYER8_GBRG is 8 bits per pixel stored as single-byte values (1 byte per pixel), same memory layout as GREY8. Changes include: - New `BAYER8_GBRG` enum value (=26) in `RecordFormat.h` - Serialization support, static_assert for enum stability, channel count and bytes-per-pixel in `RecordFormat.cpp` - Normalization path (maps to GREY8) in `PixelFrame.cpp` for correct viewer/player display - Synthetic VRS file generation support in `SyntheticVRS.cpp` - Unit test in `RecordFormatTest.cpp` validating parsing, bytes per pixel, channels, and block size - Python bindings (`PyRecord.cpp`, `PyBuffer.cpp`) and regenerated type stubs (`vrsbindings.pyi`) - Updated test stream count expectations in `FilteredFileReaderTest.cpp` and `CompressAsyncImageFilterTest.cpp` Differential Revision: D102023707
Summary: D102023707 adds `BAYER8_GBRG` as a VRS pixel format and routes it to `RGB8` normalization in FB-internal builds, but vrsplayer still needs an explicit color debayer path for visualization. This mirrors the `BAYER10_GBRG` visualization follow-up in D103575802 by adding `BAYER8_GBRG` handling in `PixelFrame_fb.cpp`. The fast path downsamples each 2x2 GBRG block directly to RGB8 for visualization performance, while the quality path uses `perception::debayerGbrgBilinearToRGB()` for full-resolution RGB8 output. This does not change VRS serialization, pyvrs bindings, or existing MONO/RGB/BAYER formats. Differential Revision: D108072630
Contributor
|
@georges-berenger has exported this pull request. If you are a Meta employee, you can view the originating Diff in D108072630. |
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:
D102023707 adds
BAYER8_GBRGas a VRS pixel format and routes it toRGB8normalization in FB-internal builds, but vrsplayer still needs an explicit color debayer path for visualization.This mirrors the
BAYER10_GBRGvisualization follow-up in D103575802 by addingBAYER8_GBRGhandling inPixelFrame_fb.cpp. The fast path downsamples each 2x2 GBRG block directly to RGB8 for visualization performance, while the quality path usesperception::debayerGbrgBilinearToRGB()for full-resolution RGB8 output.This does not change VRS serialization, pyvrs bindings, or existing MONO/RGB/BAYER formats.
Differential Revision: D108072630