Encoder  4.4
VC-5 Sample Encoder
bayer.h File Reference

Go to the source code of this file.

Functions

CODEC_ERROR UnpackImageRowBYR3 (uint8_t *input, DIMENSION width, PIXEL *buffer[], PRECISION bits_per_component[], int channel_count, ENABLED_PARTS enabled_parts)
 Unpack the Bayer BYR3 format into an unpacked representation. More...
 
CODEC_ERROR UnpackImageRowBYR4 (uint8_t *input, DIMENSION width, PIXEL *buffer[], PRECISION bits_per_component[], int channel_count, ENABLED_PARTS enabled_parts)
 Unpack the rows of Bayer components. More...
 

Detailed Description

Declaration of routines for unpacking a row of pixels in a Bayer frame into separate rows for each channel. Note that the unpacking routines for non-Bayer formats are defined in other files.

(c) 2013-2017 Society of Motion Picture & Television Engineers LLC and Woodman Labs, Inc. All rights reserved–use subject to compliance with end user license agreement.

Function Documentation

◆ UnpackImageRowBYR3()

CODEC_ERROR UnpackImageRowBYR3 ( uint8_t *  input,
DIMENSION  width,
PIXEL buffer[],
PRECISION  bits_per_component[],
int  channel_count,
ENABLED_PARTS  enabled_parts 
)

Unpack the Bayer BYR3 format into an unpacked representation.

The Bayer BYR3 format is unpacked into the row-oriented format that is used internally by the codec as an intermediate representation.

Todo:
Add a vector of offsets to each component so that the layout of the components can accommodate requirements on memory alignment.

◆ UnpackImageRowBYR4()

CODEC_ERROR UnpackImageRowBYR4 ( uint8_t *  input,
DIMENSION  width,
PIXEL buffer[],
PRECISION  bits_per_component[],
int  channel_count,
ENABLED_PARTS  enabled_parts 
)

Unpack the rows of Bayer components.

This routine unpacked that Bayer components into component arrays without applying a component transform which is not defined in VC-5 Part 1.

This routine applies the component transform for Bayer images defined in VC-5 Part 3: Image Formats.

The Bayer image format assigns component arrays to channel numbers in the following order: G sum, G difference, R difference, B difference

This routine unpacked that Bayer components into component arrays without applying a component transform which is not defined in VC-5 Part 1.