LibTIFF 4.7.2
TIFF library public API and implementation reference
Loading...
Searching...
No Matches
Data Fields
TIFFYCbCrToRGB Struct Reference

Hold lookup-table pointers for 8-bit YCbCr-to-RGB conversion. More...

#include <tiffio.h>

Data Fields

TIFFRGBValue * clamptab
 Biased table pointer for clamping channel results to 0 through 255.
 
int * Cr_r_tab
 256-entry table of Cr contributions to red.
 
int * Cb_b_tab
 256-entry table of Cb contributions to blue.
 
int32_t * Cr_g_tab
 256-entry fixed-point table of Cr contributions to green.
 
int32_t * Cb_g_tab
 256-entry fixed-point table of Cb contributions to green.
 
int32_t * Y_tab
 256-entry table of scaled luminance contributions.
 

Detailed Description

Hold lookup-table pointers for 8-bit YCbCr-to-RGB conversion.

TIFFYCbCrToRGBInit() lays out the tables in caller-provided storage after this structure. Allocating sizeof(TIFFYCbCrToRGB) alone is insufficient. The required byte capacity is:

TIFFroundup_32(sizeof(TIFFYCbCrToRGB), sizeof(long)) +
4 * 256 * sizeof(TIFFRGBValue) + 2 * 256 * sizeof(int) +
3 * 256 * sizeof(int32_t)
#define TIFFroundup_32(x, y)
Round a 32-bit value up to a multiple using the guarded quotient.
Definition tiffiop.h:1102
unsigned char TIFFRGBValue
Represent an 8-bit RGB channel value.
Definition tiffio.h:276
Hold lookup-table pointers for 8-bit YCbCr-to-RGB conversion.
Definition tiffio.h:334

The rounding helper is private; external callers must provide equivalent alignment and capacity. Table pointers borrow storage within the same block; they must not be freed separately. Keep the block valid for every conversion and release it through its matching allocator after the last use.

Definition at line 333 of file tiffio.h.

Field Documentation

◆ Cb_b_tab

int* TIFFYCbCrToRGB::Cb_b_tab

256-entry table of Cb contributions to blue.

Definition at line 343 of file tiffio.h.

Referenced by TIFFYCbCrtoRGB(), and TIFFYCbCrToRGBInit().

◆ Cb_g_tab

int32_t* TIFFYCbCrToRGB::Cb_g_tab

256-entry fixed-point table of Cb contributions to green.

Definition at line 347 of file tiffio.h.

Referenced by TIFFYCbCrtoRGB(), and TIFFYCbCrToRGBInit().

◆ clamptab

TIFFRGBValue* TIFFYCbCrToRGB::clamptab

Biased table pointer for clamping channel results to 0 through 255.

Definition at line 339 of file tiffio.h.

Referenced by TIFFYCbCrToRGBInit().

◆ Cr_g_tab

int32_t* TIFFYCbCrToRGB::Cr_g_tab

256-entry fixed-point table of Cr contributions to green.

Definition at line 345 of file tiffio.h.

Referenced by TIFFYCbCrtoRGB(), and TIFFYCbCrToRGBInit().

◆ Cr_r_tab

int* TIFFYCbCrToRGB::Cr_r_tab

256-entry table of Cr contributions to red.

Definition at line 341 of file tiffio.h.

Referenced by TIFFYCbCrtoRGB(), and TIFFYCbCrToRGBInit().

◆ Y_tab

int32_t* TIFFYCbCrToRGB::Y_tab

256-entry table of scaled luminance contributions.

Definition at line 349 of file tiffio.h.

Referenced by TIFFYCbCrtoRGB(), and TIFFYCbCrToRGBInit().


The documentation for this struct was generated from the following file: