chromium/third_party/pdfium/third_party/lcms/src/cmsalpha.c

//---------------------------------------------------------------------------------
//
//  Little Color Management System
//  Copyright (c) 1998-2023 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the Software
// is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//---------------------------------------------------------------------------------
//

#include "lcms2_internal.h"

// Alpha copy ------------------------------------------------------------------------------------------------------------------

// This macro return words stored as big endian
#define CHANGE_ENDIAN(w)


// Floor to byte, taking care of saturation
cmsINLINE cmsUInt8Number _cmsQuickSaturateByte(cmsFloat64Number d)
{}


// Return the size in bytes of a given formatter
static
cmsUInt32Number trueBytesSize(cmsUInt32Number Format)
{}


// Several format converters

cmsFormatterAlphaFn;


// From 8

static
void copy8(void* dst, const void* src)
{}

static
void from8to16(void* dst, const void* src)
{}

static
void from8to16SE(void* dst, const void* src)
{}

static
void from8toFLT(void* dst, const void* src)
{}

static
void from8toDBL(void* dst, const void* src)
{}

static
void from8toHLF(void* dst, const void* src)
{}

// From 16

static
void from16to8(void* dst, const void* src)
{}

static
void from16SEto8(void* dst, const void* src)
{}

static
void copy16(void* dst, const void* src)
{}

static
void from16to16(void* dst, const void* src)
{}

static
void from16toFLT(void* dst, const void* src)
{}

static
void from16SEtoFLT(void* dst, const void* src)
{}

static
void from16toDBL(void* dst, const void* src)
{}

static
void from16SEtoDBL(void* dst, const void* src)
{}

static
void from16toHLF(void* dst, const void* src)
{}

static
void from16SEtoHLF(void* dst, const void* src)
{}
// From Float

static
void fromFLTto8(void* dst, const void* src)
{}

static
void fromFLTto16(void* dst, const void* src)
{}

static
void fromFLTto16SE(void* dst, const void* src)
{}

static
void copy32(void* dst, const void* src)
{}

static
void fromFLTtoDBL(void* dst, const void* src)
{}

static
void fromFLTtoHLF(void* dst, const void* src)
{}


// From HALF

static
void fromHLFto8(void* dst, const void* src)
{}

static
void fromHLFto16(void* dst, const void* src)
{}

static
void fromHLFto16SE(void* dst, const void* src)
{}

static
void fromHLFtoFLT(void* dst, const void* src)
{}

static
void fromHLFtoDBL(void* dst, const void* src)
{}

// From double
static
void fromDBLto8(void* dst, const void* src)
{}

static
void fromDBLto16(void* dst, const void* src)
{}

static
void fromDBLto16SE(void* dst, const void* src)
{}

static
void fromDBLtoFLT(void* dst, const void* src)
{}

static
void fromDBLtoHLF(void* dst, const void* src)
{}

static
void copy64(void* dst, const void* src)
{}


// Returns the position (x or y) of the formatter in the table of functions
static
int FormatterPos(cmsUInt32Number frm)
{}

// Obtains an alpha-to-alpha function formatter
static
cmsFormatterAlphaFn _cmsGetFormatterAlpha(cmsContext id, cmsUInt32Number in, cmsUInt32Number out)
{}



// This function computes the distance from each component to the next one in bytes. 
static
void ComputeIncrementsForChunky(cmsUInt32Number Format,                                 
                                cmsUInt32Number ComponentStartingOrder[], 
                                cmsUInt32Number ComponentPointerIncrements[])
{}



//  On planar configurations, the distance is the stride added to any non-negative
static
void ComputeIncrementsForPlanar(cmsUInt32Number Format, 
                                cmsUInt32Number BytesPerPlane,
                                cmsUInt32Number ComponentStartingOrder[], 
                                cmsUInt32Number ComponentPointerIncrements[])
{}



// Dispatcher por chunky and planar RGB
static
void  ComputeComponentIncrements(cmsUInt32Number Format,
                                 cmsUInt32Number BytesPerPlane,
                                 cmsUInt32Number ComponentStartingOrder[], 
                                 cmsUInt32Number ComponentPointerIncrements[])
{}



// Handles extra channels copying alpha if requested by the flags
void _cmsHandleExtraChannels(_cmsTRANSFORM* p, const void* in,
                                               void* out,
                                               cmsUInt32Number PixelsPerLine,
                                               cmsUInt32Number LineCount,
                                               const cmsStride* Stride)
{}