MCPcopy Create free account
hub / github.com/AOMediaCodec/libavif / avifRGBImageSetDefaults

Function avifRGBImageSetDefaults

src/avif.c:697–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

695}
696
697void avifRGBImageSetDefaults(avifRGBImage * rgb, const avifImage * image)
698{
699 rgb->width = image->width;
700 rgb->height = image->height;
701 rgb->depth = image->depth;
702 rgb->format = AVIF_RGB_FORMAT_RGBA;
703 rgb->chromaUpsampling = AVIF_CHROMA_UPSAMPLING_AUTOMATIC;
704 rgb->chromaDownsampling = AVIF_CHROMA_DOWNSAMPLING_AUTOMATIC;
705 rgb->avoidLibYUV = AVIF_FALSE;
706 rgb->ignoreAlpha = AVIF_FALSE;
707 rgb->pixels = NULL;
708 rgb->rowBytes = 0;
709 rgb->alphaPremultiplied = AVIF_FALSE; // Most expect RGBA output to *not* be premultiplied. Those that do can opt-in by
710 // setting this to match image->alphaPremultiplied or forcing this to true
711 // after calling avifRGBImageSetDefaults(),
712 rgb->isFloat = AVIF_FALSE;
713 rgb->maxThreads = 1;
714}
715
716avifResult avifRGBImageAllocatePixels(avifRGBImage * rgb)
717{

Callers 15

avif_context_try_loadFunction · 0.85
avif_image_saverFunction · 0.85
RunMethod · 0.85
ChangeBaseFunction · 0.85
avifJPEGReadInternalFunction · 0.85
avifJPEGWriteFunction · 0.85
avifPNGReadImplFunction · 0.85
avifPNGWriteFunction · 0.85
avifRGBImageApplyGainMapFunction · 0.85
avifImageApplyGainMapFunction · 0.85
avifImageComputeGainMapFunction · 0.85

Calls

no outgoing calls

Tested by 3

AvifRgbImageMethod · 0.68
TESTFunction · 0.68
TESTFunction · 0.68