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

Function avifSampleTransformExpressionIsEquivalentTo

src/sampletransform.c:41–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41avifBool avifSampleTransformExpressionIsEquivalentTo(const avifSampleTransformExpression * a, const avifSampleTransformExpression * b)
42{
43 if (a->count != b->count) {
44 return AVIF_FALSE;
45 }
46
47 for (uint32_t t = 0; t < a->count; ++t) {
48 const avifSampleTransformToken * aToken = &a->tokens[t];
49 const avifSampleTransformToken * bToken = &b->tokens[t];
50 if (aToken->type != bToken->type || (aToken->type == AVIF_SAMPLE_TRANSFORM_CONSTANT && aToken->constant != bToken->constant)) {
51 return AVIF_FALSE;
52 }
53 // For AVIF_SAMPLE_TRANSFORM_INPUT_IMAGE_ITEM_INDEX, no need to compare inputImageItemIndex
54 // because these are variables in the expression.
55 }
56 return AVIF_TRUE;
57}
58
59//------------------------------------------------------------------------------
60// Recipe to expression

Callers 2

TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68