[0/3] virtual: colorspace validation fix
mbox series

Message ID 20260121090705.274081-1-uajain@igalia.com
Headers show
Series
  • virtual: colorspace validation fix
Related show

Message

Umang Jain Jan. 21, 2026, 9:07 a.m. UTC
Series to fix the colorspace setting for different frame
generators in the virtual pipeline handler. This has been validated
by studying the internal conversions made by libyuv for different
frame generators.

For MJPEGToNV12: libyuv validates for sYCC colorspace using JPEG header
info

For ARGB<>NV12: libyuv operates with BT.601 colorspace (ycbcr encoding
and range is altered).

The tricky part is to select color primaries for TestPatterns frame
generators. I have used ColorSpace::Primaries::Rec709 as it is widely
used/assumed in RGB domain. I don't have answer to why we still can't
use the SMPTE color primary for those.

Umang Jain (3):
  pipeline: virtual: image_frame_generator: Explicitly include libcamera
    headers
  pipeline: virtual: Implement colorspace() getter for frame generators
  pipeline: virtual: Rectify validation of colorspace

 .../pipeline/virtual/frame_generator.h         |  3 +++
 .../pipeline/virtual/image_frame_generator.cpp |  9 +++++++++
 .../pipeline/virtual/image_frame_generator.h   |  5 +++++
 .../virtual/test_pattern_generator.cpp         | 18 ++++++++++++++++++
 .../pipeline/virtual/test_pattern_generator.h  |  4 ++++
 src/libcamera/pipeline/virtual/virtual.cpp     |  8 ++++----
 6 files changed, 43 insertions(+), 4 deletions(-)