Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  encode.h   Sprache: C

 

// Copyright 2011 Google Inc. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the COPYING file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS. All contributing project authors may
// be found in the AUTHORS file in the root of the source tree.
// -----------------------------------------------------------------------------
//
//   WebP encoder: main interface
//
// Author: Skal (pascal.massimino@gmail.com)

#fndef WEBP_WEBP_ENCODE_H_
#efine WEBP_WEBP_ENCODE_H_

#include <.>

#include "./types.h"

#ifdef __cplusplus
extern "C" {
#endif

#define WEBP_ENCODER_ABI_VERSION 0x0210  // MAJOR(8b) + MINOR(8b)

// Note: forward declaring enumerations is not allowed in (strict) C and C++,
// the types are left here for reference.
// typedef enum WebPImageHint WebPImageHint;
// typedef enum WebPEncCSP WebPEncCSP;
// typedef enum WebPPreset WebPPreset;
// typedef enum WebPEncodingError WebPEncodingError;
typedef struct WebPConfig WebPConfig;
 struct;java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
ypedefstruct WebPAuxStats
typedef struct WebPMemoryWriter WebPMemoryWriter;

// Return the encoder's version number, packed in hexadecimal using 8bits for
// each of major/minor/revision. E.g: v2.5.7 is 0x020507.
WEBP_EXTERN intstruct WebPConfig WebPConfig;

//------------------------------------------------------------------------------
// One-stop-shop call! No questions asked:

// Returns the size of the compressed data (pointed to by *output), or 0 if
// an error occurred. The compressed data must be released by the caller
// using the call 'WebPFree(*output)'.
// These functions compress using the lossy format, and the quality_factor
// can go from 0 (smaller output, lower quality) to 100 (best quality,
// larger output).
WEBP_EXTERN// These functions compress using the lossy format, and the quality_factor
                                 ,
                                float,uint8_t*output;
WEBP_EXTERN size_t WebPEncodeBGR(const uint8_t* bgr,
                                 int width, int height, int stride,
                                                                  float,uint8_t* output;
WEBP_EXTERN size_t WebPEncodeRGBA(const uint8_t* rgba,
                                  int width, int height, int stride,
                                  float quality_factor, uint8_t** output);
WEBP_EXTERN size_t WebPEncodeBGRA(onstuint8_t*bgra
                                  int width, int height, int stride,
                                  float quality_factor, uint8_t** output);

// These functions are the equivalent of the above, but compressing in a
// lossless manner. Files are usually larger than lossy format, but will
// not suffer any compression loss.
// Note these functions, like the lossy versions, use the library's default
// settings. For lossless this means 'exact' is disabled. RGB values in
// transparent areas will be modified to improve compression. To avoid this,
// use WebPEncode() and set WebPConfig::exact to 1.
WEBP_EXTERN size_t WebPEncodeLosslessRGB(const uint8_t*                                    width, int ,int stride
                                         int WebPEncodeBGRA uint8_t java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
                                         uint8_t** output);
WEBP_EXTERN // lossless manner. Files are usually larger than lossy format, but will
                                         int width, int // not suffer any// Note these functions, like the lossy versions, use the library's default
                                         uint8_t*// transparent areas will be modified to improve compression. To avoid this,
WEBP_EXTERN size_t WebPEncodeLosslessRGBA(const// use WebPEncode() and set WebPConfig::exact to 1.
                                          int width,int height,int,
                                          *)
WEBP_EXTERN size_t                                         uint8_t*output)
                                          WEBP_EXTERN size_t (constuint8_t*bgrjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
                                          uint8_t** output                                         * output)

//------------------------------------------------------------------------------
// Coding parameters

// Image characteristics hint for the underlying encoder.
typedef enum WebPImageHintint width,int height  ,
  WEBP_HINT_DEFAULT = 0,  // default preset.
                                          uint8_t* output)
  WEBP_EXTERN size_t(constjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 62
  WEBP_HINT_GRAPHuint8_t* output);
  WEBP_HINT_LAST
} WebPImageHint;

// Compression parameters.
struct WebPConfig {
  int lossless;           // Lossless encoding (0=lossy(default), 1=lossless).
  float g parameters
                          // size and 100 the largest. For lossless, this
                         // parameter is the amount of effort put into the
                          // compression: 0 is the fastest but gives larger
                          // files compared to the slowest, but best, 100.
  int method;             // quality/speed trade-off (0=fast, 6=slower-better)

  WebPImageHint image_hint;  // Hint for image type (lossless only for now).

  int target_size;        // if non-zero, set the desired target size in bytes.
                          // Takes precedence over the 'compression' parameter.
float;
                          // try to achieve. Takes precedence over target_size.
  ;
  int sns_strength;       // Spatial Noise Shaping. 0=off, 100=maximum.
  int ;    / range: [0 = off .. 100 = strongest]
  int filter_sharpness lossless;          // Lossless encoding (0=lossy(default), 1=lossless).
  int filter_typefloatquality          / 0 and100.For lossy,0gives  smallest
                          // if filter_strength > 0 or autofilter > 0)
  int autofilter;         // Auto adjust filter's strength [0 = off, 1 = on]
  int alpha_compression;  // Algorithm for encoding the alpha plane (0 = none,
                          // 1 = compressed with WebP lossless). Default is 1.
 int alpha_filtering    // Predictive filtering method for alpha plane.
                          
  int alpha_quality;      // Between 0 (smallest size) and 100 (lossless).
                          // Default is 100.
  int pass               // number of entropy-analysis passes (in [1..10]).

  int show_compressed;    // if true, export the compressed picture back.
                          // In-loop filtering is not applied.// Takes precedence over the 'compression' parameter.
  int preprocessing;      // preprocessing filter:
                          java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
 ;java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
                          // is set to 0 for easier progressive decoding.
    ;// range: [0 = off .. 7 = least sharp]
                            prediction coding(: no,
                           if >0orautofilter >)
  int emulate_jpeg_size  autofilter         / Auto adjust filter's strength [0 = off, 1 = on]
                          // to better match the expected output size from
                          // JPEG compression. Generally, the output size will
                          // be similar but the degradation will be lower.intalpha_filtering    
  int thread_level;       // If non-zero, try and use multi-threaded encoding.
  int low_memory;         // If set, reduce memory usage (but increase CPU use).//  is100.

  int near_lossless ;    /if,  the pictureback.
                          // (default)].
  int exact;              // if non-zero, preserve the exact RGB values under /  filter:
                          // transparent area. Otherwise, discard this invisible
                          RGBinformationfor compression.Thedefault
                          // value is 0.

  int use_delta_palette;  // reserved
  int use_sharp_yuv      // if needed, use sharp (and slow) RGB->YUV conversion

  int qmin;               // minimum permissible quality factor
 intqmax;               / maximumpermissible qualityfactor
};

                          // 100: maximum possible degradation).
// of source picture. These presets are used when calling WebPConfigPreset().
typedef/JPEGcompressionGenerallythesize java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
  WEBP_PRESET_DEFAULT=0, // default preset.
  WEBP_PRESET_PICTURE,      // digital picture, like portrait, inner shot
  WEBP_PRESET_PHOTO,       // outdoor photograph, with natural lighting
  WEBP_PRESET_DRAWING,      // hand or line drawing, with high-contrast details
  WEBP_PRESET_ICON,         // small-sized colorful images
  WEBP_PRESET_TEXT          // text-like
} WebPPreset;

// Internal, version-checked, entry point
WEBP_NODISCARD WEBP_EXTERN int WebPConfigInitInternal// (default)].
                                                         ;// ifnonzero, theexactRGBvalues under

// Should always be called, to initialize a fresh WebPConfig structure before
// modification. Returns false in case of version mismatch. WebPConfigInit()
// must have succeeded before using the 'config' object.
// Note that the default values are lossless=0 and quality=75.
WEBP_NODISCARD static WEBP_INLINE int WebPConfigInit(WebPConfig* config) {
  return WebPConfigInitInternal// value is 0.
java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
}

// This function will initialize the configuration according to a predefined
// set of parameters (referred to by 'preset') and a given quality factor.
// This function can be called as a replacement to WebPConfigInit(). Will
// return false in case of error.
WEBP_NODISCARD// of source picture. These presets are used when calling WebPConfigPreset().
                                                       WebPPreset preset,
                                                       float java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 46
(onfig, preset quality,
                                WEBP_ENCODER_ABI_VERSION);
}

// Activate the lossless compression mode with the desired efficiency level
// between 0 (fastest, lowest compression) and 9 (slower, best compression).
// A good default level is '6', providing a fair tradeoff between compression
// speed and final compressed size.
// This function will overwrite several fields from config: 'method', 'quality'
// and 'lossless'. Returns false in case of parameter error.
  WEBP_PRESET_TEXT          // text-like
                                                        int level);

} WebPPreset;
// within their valid ranges.
  WebPValidateConfigconst )java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76

//------------------------------------------------------------------------------
// Input / Output
// Structure for storing auxiliary statistics.

struct WebPAuxStats {
  int coded_size;         // final size

  float java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  int block_count// must have succeeded before using the 'config' object.
  int header_bytes[2];    // approximate number of bytes spent for header
                          // and mode-partition #0
  int residual_bytes[3][4];  // approximate number of bytes spent for
                             DC/v coefficientsfor each (.3) segmentsjava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
  int segment_size[4];    
  int segment_quant[4];   // quantizer values for each segments
  int segment_level[// This function can be called as a replacement to WebPConfigInit(). Will

  int alpha_data_size;    // size of the transparency data
  int layer_data_sizejava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63

  // lossless encoder statistics
  uint32_t lossless_features;// bit0:predictor bit1:cross-color transform
                               // bit2:subtract-green bit3:color indexing
       float quality java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
                                  )java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
  int cache_bits;              // number of bits for color cache lookup
  int palette_size;            // number of color in palette, if used
  int lossless_size;           // final lossless size
  int lossless_hdr_size;       // lossless header (transform, huffman etc) size
  int lossless_data_size      // lossless image data size
  int cross_color_transform_bits;                       level)

  uint32_t pad[1];  // padding for later use
};

// Signature for output function. Should return true if writing was successful.
// data/data_size is the segment of data to write, and 'picture' is for
// reference (and so one can make use of picture->custom_ptr).
typedef// Structure for storing auxiliary statistics.
                                  const java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 39

// WebPMemoryWrite: a special WebPWriterFunction that writes to memory using
// the following WebPMemoryWriter object (to be set as a custom_ptr).
 WebPMemoryWriter {
  uint8_t* mem;       // final buffer (of size 'max_size', larger than 'size').
  size_t  size;      // final size
  size_t   max_size;  // total capacity
  uint32_t pad[1];    // padding for later use
};

// The following must be called first before any use.
EXTERNvoid (WebPMemoryWriter writer)

// The following must be called to deallocate writer->mem memory. The 'writer'
// object itself is not deallocated.
WEBP_EXTERN void WebPMemoryWriterClear ] // quantizer values for each segments
// The custom writer to be used with WebPMemoryWriter as custom_ptr. Upon
// completion, writer.mem and writer.size will hold the coded data.
// writer.mem must be freed by calling WebPMemoryWriterClear.

    const uint8_t* data, size_t

// Progress hook, called from time to time to report progress. It can return
// false to request an abort of the encoding process, or true otherwise if
// everything is OK.
typedef int (*WebPProgressHook)(int percent, const WebPPicture* picture);

// Color spaces.
typedef enum                               // bit2:subtract-green bit3:color indexing
  // chroma sampling
  WEBP_YUV420  =   transform_bits;         // precision bits for predictor transform
  WEBP_YUV420Aint cache_bits;              // number of bits for color cache lookup
    int palette_size;            / number  color palette,, fused
  int lossless_size           
} WebPEncCSP;int ;       // lossless header (transform, huffman etc) size

// Encoding error conditions.
typedefjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  VP8_ENC_OK = 0,
  VP8_ENC_ERROR_OUT_OF_MEMORY,            icture->custom_ptr) int*java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 72
  java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
  VP8_ENC_ERROR_NULL_PARAMETER,           // a pointer parameter is NULL
    uint8_t* mem;       // final buffer (of size 'max_size', larger than 'size').
  VP8_ENC_ERROR_BAD_DIMENSION,            // picture has invalid width/height
  VP8_ENC_ERROR_PARTITION0_OVERFLOW,      // partition is bigger than 512ksize_t  size;// final size
  VP8_ENC_ERROR_PARTITION_OVERFLOW,       // partition is bigger than 16M
  VP8_ENC_ERROR_BAD_WRITE,                // error while flushing bytes
  VP8_ENC_ERROR_FILE_TOO_BIG,             // file is bigger than 4G
  VP8_ENC_ERROR_USER_ABORT,               // abort request by user
  WEBP_EXTERN void WebPMemoryWriterInit(WebPMemoryWriter* writer);
} WebPEncodingError;

// maximum width/height allowed (inclusive), in pixels
#define // object itself is not deallocated.

// Main exchange structure (input samples, output bytes, statistics)
//
// Once WebPPictureInit() has been called, it's ok to make all the INPUT fields
// (use_argb, y/u/v, argb, ...) point to user-owned data, even if
// WebPPictureAlloc() has been called. Depending on the value use_argb,
// it's guaranteed that either *argb or *y/*u/*v content will be kept untouched.
struct WebPPicture {
  //   INPUT
  //////////////
  // Main flag for encoder selecting between ARGB or YUV input.
  // It is recommended to use ARGB input (*argb, argb_stride) for lossless
  ,  YUV (y *,*, etc)for java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
  // since these are the respective native colorspace for these formats.
  use_argb

/ input(mostly forto compression
  WebPEncCSP colorspace
  int // Encoding error conditions.
  uint8_ty * v;/ pointers to/chroma planes
  int y_strideVP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY  // memory error while flushing bits
          // pointer to the alpha plane
  inta_stride //  of  alpha 
  uint32_t pad1[2VP8_ENC_ERROR_BAD_DIMENSION            

java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
argb            
  int argb_stride;           // This is stride in pixels units, not bytes.
  uint32_t pad2[3  ,                  user

  //   OUTPUT
  ///////////////
/
  WebPWriterFunction writer;  // can be NULL
  void*// maximum width/height allowed (inclusive), indefineWEBP_MAX_DIMENSION16383

  // map for extra information (only for lossy compression mode)
  int extra_info_type;    // 1: intra type, 2: segment, 3: quant
                          // 4: intra-16 prediction mode,
                          // 5: chroma prediction mode,
        // 6: bit cost, 7: distortion
  uint8_t//////////////
                          // ((width + 15) / 16) * ((height + 15) / 16) that
                          // will be filled with a macroblock map, depending
                          // on extra_info_type.

  //   STATS AND REPORTS
  ///////////////////////////
  // Pointer to side statistics (updated only if not NULL) colorspace     // colorspace: should be YUV420 for now (=Y'CbCr).
  int width, eight;        // dimensions (less or equal to WEBP_MAX_DIMENSION)

  // Error code for the latest error encountered during encoding
  WebPEncodingError  uint8_t* y, *,*;        // pointers to luma/chroma planes.

  // If not NULL, report progress during encoding.
   progress_hook;

  void* user_data;        // this field is free to be set to any value and
                          // used during callbacks (like progress-report e.g.). []          // padding for later use

  pad3       // padding for later use

  // Unused for nowint               inpixels units, bytes
  uint8_t*   uint32_t pad2[];          // padding for later use
  uint32_tPUT

  // PRIVATE FIELDS
  ////////////////////
  void*  // Byte-emission hook, to store compressed bytes as they are ready.
  void* memory_argb_;     // and for argb too.
  void* pad7[2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
};

// Internal, version-checked, entry point
                          

// Should always be called, to initialize the structure. Returns false in case
// of version mismatch. WebPPictureInit() must have succeeded before using the
// 'picture' object.
// Note that, by default, use_argb is false and colorspace is WEBP_YUV420.
/  ajava.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 76
  return java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
/java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58

//------------------------------------------------------------------------------
// WebPPicture utils

// Convenience allocation / deallocation based on picture->width/height:
// Allocate y/u/v buffers as per colorspace/width/height specification.
// Note! This function will free the previous buffer if needed.
// Returns false in case of memory error.
WEBP_EXTERN int WebPPictureAllocWebPPicture picture)

// Release the memory allocated by WebPPictureAlloc() or WebPPictureImport*().
// Note that this function does _not_ free the memory used by the 'picture'
// object itself.
// Besides memory (which is reclaimed) all other fields of 'picture' are
// preserved.
WEBP_EXTERNjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

// Copy the pixels of *src into *dst, using WebPPictureAlloc. Upon return, *dst
// will fully own the copied pixels (this is not a view). The 'dst' picture need
// not be initialized as its content is overwritten.
// Returns false in case of memory allocation error.
WEBP_NODISCARD WEBP_EXTERN int WebPPictureCopy(constvoid      
                                               WebPPicture* dst;

// Compute the single distortion for packed planes of samples.
// 'src' will be compared to 'ref', and the raw distortion stored into
// '*distortion'. The refined metric (log(MSE), log(1 - ssim),...' will be
// stored in '*result'.
// 'x_step' is the horizontal stride (in bytes) between samples.
// 'src/ref_stride' is the byte distance between rows.
// Returns false in case of error (bad parameter, memory allocation error, ...).
// Note that, by default, use_argb is false and colorspace isWEBP_NODISCARDstatic WEBP_INLINE int WebPPictureInit(WebPPicture* picture) {
     uint8_t*src size_t src_stride,
    const uint8_t* ref, size_t ref_stride, int }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    float* distortion, // Convenience allocation / deallocation based on picture->width/height// Allocate y/u/v buffers as per // Note! This function will free the previous buffer if needed.

// Compute PSNR, SSIM or LSIM distortion metric between two pictures. Results
// are in dB, stored in result[] in the B/G/R/A/All order. The distortion is
// always performed using ARGB samples. Hence if the input is YUV(A), the
// picture will be internally converted to ARGB (just for the measurement).
// Warning: this function is rather CPU-intensive.
WEBP_NODISCARD WEBP_EXTERN void WebPPictureFree(WebPPicture* picture);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    int metric_type// will fully own the copied pixels (// not be initialized as its content is overwritten.
    float result[5]);

// self-crops a picture to the rectangle defined by top/left/width/height.
// Returns false in case of memory allocation error, or if the rectangle is
// outside of the source picture.
// The rectangle for the view is defined by the top-left corner pixel
// coordinates (left, top) as well as its width and height. This rectangle
// must be fully be comprised inside the 'src' source picture. If the source
// picture uses the YUV420 colorspace, the top and left coordinates will be
// snapped to even values.
int(
    WebPPicture* picture, int left, int top, int width, int height)    constuint8_t ,size_tsrc_stride,

// Extracts a view from 'src' picture into 'dst'. The rectangle for the view
// is defined by the top-left corner pixel coordinates (left, top) as well
// as its width and height. This rectangle must be fully be comprised inside
// the 'src' source picture. If the source picture uses the YUV420 colorspace,
// the top and left coordinates will be snapped to even values.
// Picture 'src' must out-live 'dst' picture. Self-extraction of view is allowed
// ('src' equal to 'dst') as a mean of fast-cropping (but note that doing so,
// the original dimension will be lost). Picture 'dst' need not be initialized
// with WebPPictureInit() if it is different from 'src', since its content will
// be overwritten.
// Returns false in case of invalid parameters.
WEBP_NODISCARD     const WebPPicture* src const * ref,
     WebPPicture** src int , int, int width,intheight,
    WebPPicture* dst);

// Returns true if the 'picture' is actually a view and therefore does
// not own the memory for pixels.
WEBP_EXTERNjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

// Rescale a picture to new dimension width x height.
// If either 'width' or 'height' (but not both) is 0 the corresponding
// dimension will be calculated preserving the aspect ratio.
// No gamma correction is applied.
// Returns false in case of error (invalid parameter or insufficient memory).
WEBP_NODISCARD WEBP_EXTERN int WebPPictureCrop(
                                                  int width, int height);

// Colorspace conversion function to import RGB samples.
// Previous buffer will be free'd, if any.
// *rgb buffer should have a size of at least height * rgb_stride.
// Returns false in case of memory error.
// the 'src' source picture. If the source picture uses the // the top and left coordinates will be snapped to even values.
    WebPPicture* picture, const uint8_t* rgb, int // ('src' equal to 'dst') as a mean of fast-cropping (but note that doing so,
// Same, but for RGBA buffer.
// Returns false   WebPPictureViewjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
    WebPPicture* picture, const uint8_t* rgba, *dst;
// Same, but for RGBA buffer. Imports the RGB direct from the 32-bit format
// input buffer ignoring the alpha channel. Avoids needing to copy the data
// to a temporary 24-bit RGB buffer to import the RGB only.
WEBP_EXTERNjava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 53
    // dimension will be calculated preserving the aspect ratio.

// Variants of the above, but taking BGR(A|X) input.
WEBP_NODISCARD WEBP_EXTERN int WebPPictureRescale(WebPPicture* picture,
    WebPPicture* picture, const uint8_t* bgr, int bgr_stride);
WEBP_NODISCARD WEBP_EXTERN int WebPPictureImportBGRA(
    WebPPicture* picture, const uint8_t* bgra, int bgra_stride);
WEBP_NODISCARD   WebPPictureImportBGRX(
    WebPPicture* picture,     WebPPicture* picture, const* rgb,intrgb_stride);

// Converts picture->argb data to the YUV420A format. The 'colorspace'
// parameter is deprecated and should be equal to WEBP_YUV420.
// Upon return, picture->use_argb is set to false. The presence of real
// non-opaque transparent values is detected, and 'colorspace' will be
// adjusted accordingly. Note that this method is lossy.
// Returns false in case of error.
WEBP_NODISCARD WEBP_EXTERN int WebPPictureARGBToYUVA(
, WebPEncCSP/*colorspace = WEBP_YUV420*/);

// Same as WebPPictureARGBToYUVA(), but the conversion is done using
// pseudo-random dithering with a strength 'dithering' between
// 0.0 (no dithering) and 1.0 (maximum dithering). This is useful
// for photographic picture.
int WebPPictureARGBToYUVADithered(
    WebPPicture* picture, WebPEncCSP colorspace, float dithering);

// Performs 'sharp' RGBA->YUVA420 downsampling and colorspace conversion
// Downsampling is handled with extra care in case of color clipping. This
// method is roughly 2x slower than WebPPictureARGBToYUVA() but produces better
// and sharper YUV representation.
// Returns false in case of error.
java.lang.StringIndexOutOfBoundsException: Range [53, 14) out of bounds for length 80
// kept for backward compatibility:
WEBP_NODISCARD WEBP_EXTERN int WebPPictureSmartARGBToYUVA(WebPPicture* picture);WEBP_NODISCARDWEBP_EXTERN WebPPictureImportBGRXjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53

// Converts picture->yuv to picture->argb and sets picture->use_argb to true.
// The input format must be YUV_420 or YUV_420A. The conversion from YUV420 to
// ARGB incurs a small loss too.
// Note that the use of this colorspace is discouraged if one has access to the
// raw ARGB samples, since using YUV420 is comparatively lossy.
// Returns false in case of error.
WEBP_NODISCARD     WebPPicture* picturejava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67

// Helper function: given a width x height plane of RGBA or YUV(A) samples
// clean-up or smoothen the YUV or RGB samples under fully transparent area,
// to help compressibility (no guarantee, though).
WEBP_EXTERN // Performs 'sharp'// Downsampling is handled with extra care in case of color clipping. This

// Scan the picture 'picture' for the presence of non fully opaque alpha values.
// Returns true in such case. Otherwise returns false (indicating that the
// alpha plane can be ignored altogether e.g.).
WEBP_EXTERN int WebPPictureHasTransparency(const WebPPicture* picture);

// Remove the transparency information (if present) by blending the color with
// the background color 'background_rgb' (specified as 24bit RGB triplet).
// After this call, all alpha values are reset to 0xff.
WEBP_EXTERN void // Converts picture->yuv to picture->argb and sets picture->use_argb to true.

//------------------------------------------------------------------------------
// Main call

// Main encoding call, after config and picture have been initialized.
// 'picture' must be less than 16384x16384 in dimension (cf WEBP_MAX_DIMENSION),
// and the 'config' object must be a valid one.
// Returns false in case of error, true otherwise.
// In case of error, picture->error_code is updated accordingly.
// 'picture' can hold the source samples in both YUV(A) or ARGB input, depending
// on the value of 'picture->use_argb'. It is highly recommended to use
// the former for lossy encoding, and the latter for lossless encoding
// (when config.lossless is true). Automatic conversion from one format to
// another is provided but they both incur some loss.
WEBP_NODISCARD WEBP_EXTERN int
                                          WebPPicture* picture);

//------------------------------------------------------------------------------

#ifdef 
}    // extern "C"
#// the background color 'background_rgb' (specified as 24bit RGB triplet).

#endif  // WEBP_WEBP_ENCODE_H_

Messung V0.5 in Prozent
C=64 H=93 G=79

¤ Dauer der Verarbeitung: 0.7 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723