camera_bayerjustify_t

Updated: May 06, 2022

Bayer bit justification

Synopsis:

#include <camera/camera_api.h>
typedef enum {
    CAMERA_BAYERJUSTIFY_RIGHT_BIT0LSB,
    CAMERA_BAYERJUSTIFY_LEFT_BIT0LSB,
    CAMERA_BAYERJUSTIFY_RIGHT_BIT0MSB,
    CAMERA_BAYERJUSTIFY_LEFT_BIT0MSB
} camera_bayerjustify_t;

Data:

CAMERA_BAYERJUSTIFY_RIGHT_BIT0LSB
Bit 0 is the least significant bit, and the bits are right-justified.
CAMERA_BAYERJUSTIFY_LEFT_BIT0LSB
Bit 0 is the least significant bit, and the bits are left-justified.
CAMERA_BAYERJUSTIFY_RIGHT_BIT0MSB
Bit 0 is the most significant bit, and the bits are right-justified.
CAMERA_BAYERJUSTIFY_LEFT_BIT0MSB
Bit 0 is the most significant bit, and the bits are left-justified.

Library:

libcamapi

Description:

The Bayer bit justification indicates whether bit 0 is the least significant or most significant bit of the word, and also whether the bits are justified towards the 0th bit (right-justified) or the Nth bit (left-justified). For example, with these settings:
 le = false
 bpp = 10
 packing = 16
 cadence_length = 16
 pixels_per_cadence = 1
 format = CAMERA_BAYERFORMAT_RGGB
CAMERA_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.