| 39 | } |
| 40 | |
| 41 | avifBool 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 |
no outgoing calls