diff --git a/libswscale/ops_chain.c b/libswscale/ops_chain.c index e5fbc4f016..2445154186 100644 --- a/libswscale/ops_chain.c +++ b/libswscale/ops_chain.c @@ -184,7 +184,7 @@ static int op_match(const SwsOp *op, const SwsOpEntry *entry, const SwsComps nex score += av_popcount(SWS_MASK_ALL ^ entry->linear_mask); return score; case SWS_OP_SCALE: - return score; + return av_cmp_q(op->c.q, entry->scale) ? 0 : score; case SWS_OP_TYPE_NB: break; } diff --git a/libswscale/ops_chain.h b/libswscale/ops_chain.h index 2f5a31793e..0bc8c01283 100644 --- a/libswscale/ops_chain.h +++ b/libswscale/ops_chain.h @@ -111,6 +111,7 @@ typedef struct SwsOpEntry { uint32_t linear_mask; /* subset of SwsLinearOp */ int dither_size; /* subset of SwsDitherOp */ int clear_value; /* clear value for integer clears */ + AVRational scale; /* scale factor for SWS_OP_SCALE */ }; /* Kernel implementation */