sensor_bayerjustify_t

Updated: April 19, 2023

Bayer bit justification

Synopsis:

#include <sensor/sensor_api.h>
typedef enum {
    SENSOR_BAYERJUSTIFY_RIGHT_BIT0LSB,
    SENSOR_BAYERJUSTIFY_LEFT_BIT0LSB,
    SENSOR_BAYERJUSTIFY_RIGHT_BIT0MSB,
    SENSOR_BAYERJUSTIFY_LEFT_BIT0MSB
} sensor_bayerjustify_t;

Data:

SENSOR_BAYERJUSTIFY_RIGHT_BIT0LSB
Bit 0 is the least significant bit, and the bits are right-justified.
SENSOR_BAYERJUSTIFY_LEFT_BIT0LSB
Bit 0 is the least significant bit, and the bits are left-justified.
SENSOR_BAYERJUSTIFY_RIGHT_BIT0MSB
Bit 0 is the most significant bit, and the bits are right-justified.
SENSOR_BAYERJUSTIFY_LEFT_BIT0MSB
Bit 0 is the most significant bit, and the bits are left-justified.

Library:

libsensor

Description:

The Bayer bit justification indicates whether bit 0 is the least significant or most significant bit of the word, and also indicates whether the bits are justified towards the 0th bit (right-justified) or the Nth bit (left-justified). For example:
 le = false
 bpp = 10
 packing = 16
 cadence_length = 16
 pixels_per_cadence = 1
 format = SENSOR_BAYERFORMAT_RGGB
SENSOR_BAYERJUSTIFY_RIGHT_BIT0LSB would represent:
 Bit:          FEDCBA9876543210 FEDCBA9876543210
 Scanline n:   000000RRRRRRRRRR 000000GGGGGGGGGG
 Scanline n+1: 000000GGGGGGGGGG 000000BBBBBBBBBB
Note that the 0th bit in the word represents the least significant bit, and the bits are justified to the right of the word.